FastAPI + PostgreSQL (UUID v7) + Docker (User Management & Auth Core)
High-performance, architecturally clean REST API core designed based on Clean Architecture principles to serve as a foundation (User Management & Auth) for high-load projects (CRM, SaaS, mobile backends). The project is fully containerized (Docker) and ready for production deployment.
Architectural Features and Technologies
1. Clean Architecture & Pydantic v2: Clear separation of responsibilities: SQLAlchemy models, CRUD in repositories, validation through Pydantic.
2. UUID v7: The use of time-ordered identifiers provides protection against enumeration and speeds up indexing in PostgreSQL compared to UUID v4.
3. Advanced Auth: JWT Bearer (OAuth2) with a role model (Admin/User) and route protection.
4. DevOps Ready: Automatic application of Alembic migrations and seeding upon starting the Docker container.
Key Endpoints
Auth (/token): Issuance of secure JWT tokens.
Users (POST /users): Registration with UUID v7 generation.
Admin (GET /users): List of users with pagination (admin access only).
Moderation (PATCH /users/{id}/toggle-active): Blocking/unblocking accounts.
Healthcheck (GET /health): Service availability check.
#Python #FastApi #Docker #Docker-compose #OAuth2
High-performance, architecturally clean REST API core designed based on Clean Architecture principles to serve as a foundation (User Management & Auth) for high-load projects (CRM, SaaS, mobile backends). The project is fully containerized (Docker) and ready for production deployment.
Architectural Features and Technologies
1. Clean Architecture & Pydantic v2: Clear separation of responsibilities: SQLAlchemy models, CRUD in repositories, validation through Pydantic.
2. UUID v7: The use of time-ordered identifiers provides protection against enumeration and speeds up indexing in PostgreSQL compared to UUID v4.
3. Advanced Auth: JWT Bearer (OAuth2) with a role model (Admin/User) and route protection.
4. DevOps Ready: Automatic application of Alembic migrations and seeding upon starting the Docker container.
Key Endpoints
Auth (/token): Issuance of secure JWT tokens.
Users (POST /users): Registration with UUID v7 generation.
Admin (GET /users): List of users with pagination (admin access only).
Moderation (PATCH /users/{id}/toggle-active): Blocking/unblocking accounts.
Healthcheck (GET /health): Service availability check.
#Python #FastApi #Docker #Docker-compose #OAuth2