Skip to content
Daniil Manukian edited this page Jul 28, 2025 · 2 revisions

Welcome to FastAPI Template Wiki! πŸš€

FastAPI Python PostgreSQL Docker Clean Architecture


πŸ“– About This Project

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.

🎯 Key Features

  • πŸ—οΈ 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

πŸ—ΊοΈ Wiki Navigation

πŸš€ Getting Started

πŸ—οΈ Architecture & Design

πŸ’» Development

πŸ§ͺ Testing

πŸš€ Deployment

πŸ“š API Reference


⚑ Quick Links

πŸ”— Essential Resources

πŸ› οΈ Development Tools

πŸ“‹ Reference


πŸš€ Getting Started in 5 Minutes

  1. Clone the repository

    git clone <your-repo-url>
    cd fastapi-template
  2. Setup environment

    cp .env.example .env
    # Edit .env with your configuration
  3. Run with Docker

    docker-compose up -d
  4. Access the application

πŸ‘‰ Full Setup Guide


πŸ—οΈ Architecture Overview

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚           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


πŸ› οΈ Technology Stack

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

🀝 Contributing

We welcome contributions! Here's how to get started:

  1. Read the guidelines: Contributing Guide
  2. Setup development environment: Development Setup
  3. Follow code standards: Code Quality Guide
  4. Write tests: Testing Guide
  5. Submit a PR: Follow our PR Template

πŸ“ž Support & Community

πŸ†˜ Need Help?

πŸ“¬ Contact


πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


⭐ Show Your Support

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! πŸš€