-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Daniil Manukian edited this page Jul 28, 2025
·
2 revisions
This FastAPI template is a production-ready web application starter built with Clean Architecture principles. It provides a solid foundation for building scalable, maintainable, and testable REST APIs.
- ποΈ Clean Architecture: Proper separation of concerns with Domain, Application, and Infrastructure layers
- β‘ FastAPI: Modern, fast web framework with automatic API documentation
- ποΈ PostgreSQL: Robust relational database with SQLAlchemy ORM
- π³ Docker Ready: Complete containerization with Docker Compose
- π Observability: Custom logging with trace IDs and request timing
- π Security: Built-in authentication and authorization
- π§ͺ Testing: Unit and integration testing setup
- π Documentation: Auto-generated API docs with Swagger UI
- Quick Start Guide - Get up and running in 5 minutes
- Installation - Detailed setup instructions
- Environment Setup - Configure your development environment
- Docker Setup - Run with Docker and Docker Compose
- Clean Architecture Guide - Understanding the project architecture
- Project Structure - Directory layout and organization
- Design Patterns - Patterns used in the project
- Dependency Injection - DI container and service registration
- API Development - Creating new endpoints and routes
- Database Operations - Working with SQLAlchemy and migrations
- Business Logic - Implementing domain services and use cases
- Error Handling - Exception handling and custom errors
- Validation - Request/response validation with Pydantic
- Testing Guide - Writing and running tests
- Unit Testing - Testing individual components
- Integration Testing - End-to-end testing
- Test Data - Fixtures and test database setup
- Production Deployment - Deploy to production environments
- Docker Deployment - Container-based deployment
- Environment Variables - Configuration management
- Monitoring - Logging, metrics, and health checks
- API Documentation - Complete API reference
- Authentication - JWT tokens and security
- Rate Limiting - API rate limiting configuration
- CORS - Cross-Origin Resource Sharing setup
- README.md - Project overview and setup
- API Documentation - Live Swagger UI (when running)
- Contributing Guidelines - How to contribute to the project
- Code of Conduct - Community guidelines
- Code Quality - Linting, formatting, and type checking
- Pre-commit Hooks - Automated code quality checks
- IDE Setup - Configure your development environment
- Debugging - Debugging tips and techniques
- Troubleshooting - Common issues and solutions
- FAQ - Frequently asked questions
- Changelog - Version history and changes
- Migration Guide - Upgrading between versions
-
Clone the repository
git clone <your-repo-url> cd fastapi-template
-
Setup environment
cp .env.example .env # Edit .env with your configuration -
Run with Docker
docker-compose up -d
-
Access the application
- API: http://localhost:8000
- Docs: http://localhost:8000/docs
- Health: http://localhost:8000/ping
π Full Setup Guide
βββββββββββββββββββββββββββββββββββββββββββ
β Presentation Layer β β FastAPI routes, middleware
β (HTTP, REST API) β
βββββββββββββββββββββββββββββββββββββββββββ€
β Application Layer β β Business logic, use cases
β (Services, DTOs) β
βββββββββββββββββββββββββββββββββββββββββββ€
β Domain Layer β β Core business rules
β (Entities, Value Objects) β
βββββββββββββββββββββββββββββββββββββββββββ
β
Infrastructure Layer (Database, External APIs)
π Learn more about Clean Architecture
| Category | Technology |
|---|---|
| Framework | FastAPI 0.116+ |
| Language | Python 3.12+ |
| Database | PostgreSQL 17+ |
| ORM | SQLAlchemy 2.0 |
| Migration | Alembic |
| Server | Granian ASGI |
| Container | Docker & Docker Compose |
| Validation | Pydantic 2.0 |
| Testing | Pytest |
| Code Quality | Ruff, MyPy, Bandit |
| Documentation | Swagger UI, ReDoc |
We welcome contributions! Here's how to get started:
- Read the guidelines: Contributing Guide
- Setup development environment: Development Setup
- Follow code standards: Code Quality Guide
- Write tests: Testing Guide
- Submit a PR: Follow our PR Template
- Troubleshooting Guide - Common issues and solutions
- FAQ - Frequently asked questions
- Discussions - Community discussions
- Issues - Bug reports and feature requests
- Author: Noloquideus
- Email: daniilmanukian@gmail.com
- GitHub: @noloquideus
This project is licensed under the MIT License - see the LICENSE file for details.
If this project helped you, please consider:
- β Starring the repository
- π Reporting bugs in Issues
- π‘ Suggesting features in Discussions
- π€ Contributing with Pull Requests
- π’ Sharing with your network
Made with β€οΈ by Noloquideus
Happy Coding! π