This repository is maintained by me, Anton Bolychev, for educational purposes, specifically for the Async Architecture course.
This repository is organized into multiple microservices, designed as API-only applications. The microservices included are:
The primary programming language is Python, with Postgres as the database and Nats Jetstream serving as the message broker.
The project heavily relies on the following Python packages:
- FastAPI: A web framework for building APIs with Python 3.8+, utilizing standard Python type hints.
- FastStream simplifies the creation of producers and consumers for message queues, providing automatic parsing, networking, and documentation generation.
- SQLModel is a library for interacting with SQL databases from Python code, with Python objects and designed to be compatible with FastAPI, Pydantic, and SQLAlchemy.
These packages are well-integrated between each other, allowing the main logic to be written in a single file and the application to be launched with a single command:
cd servicename/app
uvicorn --port=YOUR_PORT main:api --reload
The Auth Service implements authentication using JWT tokens.
auth/
: The primary directory for the Auth Service.auth/app/main.py
: The main application file containing the core logic.auth/auth
: Directory containing configurations, database models, password hashing functions, and request schemas.
The Task Tracker manages tasks and their tracking.
tasktracker/
: The primary directory for the Task Tracker.tasktracker/app/main.py
: The main application file with the core logic.tasktracker/tasktracker/
: Directory containing configurations and database models.
A separate library is included to provide shared functionality across all services. Currently, it is utilized for authorization and decoding JWT tokens.
common/common/authorizer.py
: The single file in the common library responsible for authorization.