CMS API
A production-ready REST API built with FastAPI, PostgreSQL, and SQLAlchemy, featuring JWT authentication and a full Role-Based Access Control (RBAC) system.
Features
- 🔐 JWT authentication with access and refresh tokens
- 👥 User management (CRUD)
- 🛡️ Role-Based Access Control (RBAC)
- 🔄 Token versioning for secure logout-all
- 🗄️ PostgreSQL with Alembic migrations
- 🐳 Docker + Docker Compose setup
- 📖 Auto-generated Swagger UI at
/docs
Quick Start
git clone <repo>
cp .env.example .env
docker compose up -d
docker compose exec api python -m app.core.seed
API is available at http://localhost:8100
Documentation is available at http://localhost:8200
Tech Stack
| Layer | Technology |
|---|---|
| Framework | FastAPI |
| Database | PostgreSQL 16 |
| ORM | SQLAlchemy 2.x |
| Migrations | Alembic |
| Auth | JWT (PyJWT) |
| Validation | Pydantic v2 |
| Password hash | bcrypt |
| Docs | MkDocs Material |
| Container | Docker + Docker Compose |