A production-ready FastAPI boilerplate with async SQLAlchemy, Pydantic v2, and Docker. This template provides a solid foundation for building scalable RESTful APIs with best practices in mind.
- FastAPI for high-performance API development
- Async SQLAlchemy 2.0 with PostgreSQL support
- Pydantic v2 for data validation
- Docker and Docker Compose ready
- Unit & Integration Tests with pytest
- Testing with pytest-asyncio
- Docker and Docker Compose
- Python 3.10+
- UV package manager (recommended)
-
Clone the repository:
git clone https://github.com/ahdhani/boilerplate.git cd boilerplate -
Copy and configure environment variables:
cp .env.example .env # Edit .env as needed -
Start the services:
docker-compose up --build app
-
Access the application:
- API Docs: http://localhost:8000/docs
- Health Check: http://localhost:8000/health
Run tests using Docker:
docker-compose up pytest