| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
A comprehensive, production-ready blueprint for implementing Clean Architecture in FastAPI projects. This template provides a modular, scalable foundation for building modern web applications following SOLID principles and separation of concerns.
┌─────────────────────────────────────────┐
│ Presentation Layer (API) │
│ - FastAPI routes, dependencies │
│ - Request/response schemas │
└──────────────┬──────────────────────────┘
│
┌──────────────▼──────────────────────────┐
│ Application Layer │
│ - Use cases, application services │
│ - Business orchestration │
└──────────────┬──────────────────────────┘
│
┌──────────────▼──────────────────────────┐
│ Domain Layer (Core Business Logic) │
│ - Entities, value objects │
│ - Domain rules & invariants │
└──────────────┬──────────────────────────┘
│
┌──────────────▼──────────────────────────┐
│ Infrastructure Layer │
│ - Database, repositories │
│ - External services, adapters │
└─────────────────────────────────────────┘
FastAPIBluePrint/ ├── src/ │ ├── domain/ # Core business logic (entities, interfaces) │ ├── application/ # Use cases and application services │ ├── infrastructure/ # Database, external services, repositories │ ├── presentation/ # FastAPI routes, schemas, dependencies │ ├── config/ # Configuration management │ └── main.py # Application entry point ├── tests/ │ ├── unit/ # Unit tests for use cases │ ├── integration/ # Integration tests for adapters │ └── conftest.py # Pytest fixtures and configuration ├── docs/ # Documentation files ├── config/ # Runtime configuration ├── pyproject.toml # Project metadata and dependencies ├── requirements.txt # Python dependencies ├── .env.example # Environment variables template └── pytest.ini # Pytest configuration
This blueprint is suitable for:
See Development Guide for detailed scaling strategies.
# Run all tests
pytest
# Run with coverage
pytest --cov=src
# Run specific test file
pytest tests/unit/test_example.py
# Run tests matching pattern
pytest -k "test_user"To add a new feature:
See Development Guide for detailed examples.
This blueprint is provided as-is for educational and commercial use.
Last Updated: December 2025
Version: 1.0.0
Python: 3.10+
| Back | FazBrowse Home | New Git URL |