REST API for task management built with FastAPI, focusing on backend engineering practices, automated testing, and continuous integration.
Live API Docs (Swagger) https://todo-api-latest-82ru.onrender.com/docs
- Python 3.11
- FastAPI
- SQLAlchemy
- PostgreSQL
- Pytest
- Docker
- GitHub Actions (CI)
- Codecov
- Alembic (database migrations)
app/
├── routes/ # FastAPI route definitions (API endpoints)
├── services/ # Business logic and application services
├── models/ # Database models
├── schemas/ # Pydantic schemas for request/response validation
├── database/ # Database configuration and session management
├── exceptions/ # Custom exception handling
└── main.py # FastAPI application entry point
tests/
├── unit/ # Unit tests
└── integration/ # Integration tests
The project includes two types of automated tests:
- Unit Tests: fast, isolated and use SQLite in-memory
- Integration Tests: use a real PostgreSQL database and run in an isolated Docker environment
pytest -m unit
pytest -m integrationpytest --cov=appTest coverage is automatically monitored using Codecov.
- Minimum required coverage: 70%
- Pull Requests fail if coverage drops below the threshold.
A CI pipeline runs automatically using GitHub Actions on:
- Push to
mainordevelop - Pull Requests
Pipeline steps:
- Install dependencies
- Run unit tests
- Run integration tests
- Generate coverage report
- Upload coverage to Codecov
The API and PostgreSQL database run in containers using Docker Compose.
Start the environment:
docker compose up -dThe interactive API documentation will be available at:
The application is deployed using Docker containers on Render.
During container startup:
- Database migrations run automatically via Alembic
- The FastAPI application is started with Uvicorn
This project was developed for learning and portfolio purposes.