Production-style Task Management REST API — the hands-on project for the Backend with FastAPI learning guides.
Learning? Start with the Learning Guide, not this file.
python3 -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
cp .env.example .env
make dev
| Command |
Action |
make dev |
Start dev server (SQLite) |
make test |
Run pytest (15 tests) |
make migrate |
Apply Alembic migrations |
make docker-up |
Start API + Postgres |
| Concept |
Guide |
Code |
| Project structure |
03 |
app/factory.py, app/api/ |
| Database |
04 |
app/db/, app/models/ |
| Auth & JWT |
05 |
app/core/security.py, app/api/v1/endpoints/auth.py |
| RBAC |
06 |
app/core/rbac.py, app/services/task_service.py |
| Rate limiting |
07 |
app/core/limiter.py |
| Errors & logging |
08 |
app/core/exceptions.py |
| Testing |
09 |
tests/ |
| Docker |
10 |
Dockerfile, docker-compose.yml |
| API reference |
11 |
all endpoints |
task-api/
├── app/
│ ├── main.py / factory.py
│ ├── api/v1/endpoints/ # HTTP routes
│ ├── core/ # config, security, rbac, errors
│ ├── db/ # SQLAlchemy sessions
│ ├── models/ # User, Task
│ ├── schemas/ # Pydantic validation
│ ├── services/ # Business logic
│ └── middleware/ # Request logging
├── alembic/ # Migrations
├── tests/
├── Dockerfile
└── docker-compose.yml
| Method |
Path |
Auth |
| GET |
/api/v1/health |
No |
| GET |
/api/v1/ready |
No |
| POST |
/api/v1/auth/register |
No |
| POST |
/api/v1/auth/login |
No |
| GET |
/api/v1/auth/me |
Yes |
| CRUD |
/api/v1/tasks |
Yes |
| GET |
/api/v1/users |
Admin |
Full reference: docs/11-api-reference.md