Tech Stack¶
This document provides a comprehensive overview of the technologies, tools, and infrastructure powering the FastAPI Enterprise Backend Template.
๐๏ธ Core Architecture¶
- ๐ Python 3.12+ โ High-performance interpreter with advanced language features.
- โก FastAPI โ High-performance, production-ready web framework for building APIs.
- ๐ Pydantic v2 โ Modern data validation and settings management using type hints.
- ๐ข FastAPI-Pagination โ Uniform pagination support for clean and consistent list responses.
๐๏ธ Persistence & Data¶
- ๐ PostgreSQL 18 โ The world's most advanced open-source relational database.
- ๐งฌ SQLModel โ Elegant unification of SQLAlchemy and Pydantic for data modeling.
- ๐ ๏ธ Alembic โ Robust database migration management for versioned schema updates.
- ๐ psycopg3 โ Modern, high-performance PostgreSQL adapter for Python.
๐ก๏ธ Security & Health¶
- ๐ OAuth2 + JWT โ Industry-standard secure authentication and authorization.
- ๐ Argon2 โ State-of-the-art password hashing for maximum credential security.
- ๐ฆ SlowAPI โ Advanced rate limiting to protect endpoints from automated abuse.
- ๐ก๏ธ Bandit โ Automated security linting to identify and mitigate vulnerabilities.
๐ Observability¶
- ๐ชต Structlog โ High-performance structured logging for deep system visibility.
- ๐ Prometheus โ Real-time metrics instrumentation for monitoring system health.
- ๐ฏ Sentry SDK โ Proactive error tracking and performance monitoring with native FastAPI integration.
- ๐ญ OpenTelemetry โ Distributed tracing for requests and SQL queries, exported over OTLP.
- โจ Rich โ Beautiful console formatting and traceback visualization for local development.
- ๐ฅ๏ธ psutil โ Host CPU, memory, disk and uptime figures for the SUPER dashboard.
๐ง Email & Templating¶
- โ๏ธ Emails โ Simplifies sending emails with custom headers and attachments.
- ๐จ Jinja2 โ Modern and designer-friendly templating engine for Python.
- ๐ Email-Validator โ Robust validation for email addresses to ensure data integrity.
๐ ๏ธ Tooling & Infrastructure¶
- ๐ฆ uv โ Next-generation, lightning-fast Python package and project manager.
- ๐ณ Docker & Compose โ Full-stack container orchestration for environmental parity.
- ๐งญ Traefik โ Reverse proxy with health-checked routing (stable
.testURLs locally). - ๐ฅ Mailpit โ SMTP server and web UI for capturing and inspecting emails during development.
- ๐ฆ Zensical โ Ultra-fast, Rust-powered documentation generator for this project.
- ๐ค AI coding assistants โ Gemini CLI, Google Antigravity, Claude Code, Codex, Copilot and others, all following
AGENTS.md.
โ๏ธ AWS Deployment (Optional)¶
Used only by the AWS free-tier deployment; the Docker Compose stack needs none of them.
- โ๏ธ AWS Lambda + Lambda Web Adapter โ Runs the API and the worker with the normal Uvicorn server.
- ๐ CloudFront + S3 โ One address for the React app and the API.
- ๐ฌ SQS (boto3) โ Email queue with a dead-letter queue.
- โฐ EventBridge Scheduler โ Daily audit-record purge.
- ๐ Neon โ Hosted PostgreSQL.
- ๐๏ธ Terraform โ Infrastructure as code (
infra/aws).
๐งช Quality Assurance¶
- ๐งช Pytest & Coverage โ Mature testing framework with detailed coverage reporting.
- ๐ณ Testcontainers โ Isolated, containerized integration testing against real PostgreSQL and real migrations.
- ๐งช Schemathesis โ Property-based API fuzzing from the OpenAPI schema (CI).
- ๐ง Hypothesis โ Advanced property-based testing for edge-case identification.
- ๐ py-spy & Scalene โ Advanced performance profiling for CPU and memory optimization.
- ๐งน Ruff โ Extremely fast, all-in-one Python linter and code formatter.
- ๐ Mypy โ Strict static type checking to eliminate runtime type errors.
- โ Prek โ Ultra-fast, Rust-powered Git hook manager for automated code quality checks.