{"id":48314229,"url":"https://github.com/krytos/fastapi-production-template","last_synced_at":"2026-04-09T04:00:52.103Z","repository":{"id":348695085,"uuid":"1199391357","full_name":"Krytos/fastapi-production-template","owner":"Krytos","description":"Production-ready FastAPI template with clean architecture, async SQLAlchemy, strict quality gates, Docker/Terraform foundations, and automated PyPI publishing.","archived":false,"fork":false,"pushed_at":"2026-04-02T14:39:45.000Z","size":127,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-08T03:02:55.226Z","etag":null,"topics":["api","async","backend","docker","fastapi","github-actions","pypi","python","sqlalchemy","templates","terraform","testing"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/fastapi-production-template/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Krytos.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-02T09:56:07.000Z","updated_at":"2026-04-02T14:39:49.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/Krytos/fastapi-production-template","commit_stats":null,"previous_names":["krytos/fastapi-production-template"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Krytos/fastapi-production-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Krytos%2Ffastapi-production-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Krytos%2Ffastapi-production-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Krytos%2Ffastapi-production-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Krytos%2Ffastapi-production-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Krytos","download_url":"https://codeload.github.com/Krytos/fastapi-production-template/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Krytos%2Ffastapi-production-template/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31584816,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T14:31:17.711Z","status":"online","status_checked_at":"2026-04-09T02:00:06.848Z","response_time":112,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","async","backend","docker","fastapi","github-actions","pypi","python","sqlalchemy","templates","terraform","testing"],"created_at":"2026-04-05T00:27:17.850Z","updated_at":"2026-04-09T04:00:51.898Z","avatar_url":"https://github.com/Krytos.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n# ⚡ FastAPI Production Template\n\n**Battle-tested Python backend architecture — ready to ship.**\n\n*By [Kevin Meinon](mailto:kevin@meinon.de) · Freelance Backend Engineer*\n\n\u003cbr/\u003e\n\n[![CI](https://img.shields.io/github/actions/workflow/status/Krytos/fastapi-production-template/ci.yml?branch=main\u0026label=CI%2FCD\u0026style=for-the-badge)](https://github.com/Krytos/fastapi-production-template/actions/workflows/ci.yml)\n[![Tests](https://img.shields.io/github/actions/workflow/status/Krytos/fastapi-production-template/tests.yml?branch=main\u0026label=Tests\u0026style=for-the-badge)](https://github.com/Krytos/fastapi-production-template/actions/workflows/tests.yml)\n[![Coverage](https://img.shields.io/badge/Coverage-100%25-brightgreen?style=for-the-badge)](https://github.com/Krytos/fastapi-production-template/blob/main/pyproject.toml)\n[![PyPI](https://img.shields.io/pypi/v/fastapi-production-template?style=for-the-badge\u0026label=PyPI)](https://pypi.org/project/fastapi-production-template/)\n\n\u003cbr/\u003e\n\n[![Python 3.14](https://img.shields.io/badge/Python-3.14-3776AB?style=flat-square\u0026logo=python\u0026logoColor=white)](https://python.org)\n[![FastAPI](https://img.shields.io/badge/FastAPI-009688?style=flat-square\u0026logo=fastapi\u0026logoColor=white)](https://fastapi.tiangolo.com/)\n[![Flask](https://img.shields.io/badge/Flask-000000?style=flat-square\u0026logo=flask\u0026logoColor=white)](https://flask.palletsprojects.com/)\n[![Django](https://img.shields.io/badge/Django-092E20?style=flat-square\u0026logo=django\u0026logoColor=white)](https://www.djangoproject.com/)\n[![PostgreSQL](https://img.shields.io/badge/PostgreSQL-336791?style=flat-square\u0026logo=postgresql\u0026logoColor=white)](https://www.postgresql.org/)\n[![Docker](https://img.shields.io/badge/Docker-2496ED?style=flat-square\u0026logo=docker\u0026logoColor=white)](https://www.docker.com/)\n[![Terraform](https://img.shields.io/badge/Terraform-844FBA?style=flat-square\u0026logo=terraform\u0026logoColor=white)](https://www.terraform.io/)\n[![AWS](https://img.shields.io/badge/AWS-232F3E?style=flat-square\u0026logo=amazonaws\u0026logoColor=white)](https://aws.amazon.com/)\n[![Azure](https://img.shields.io/badge/Azure-0078D4?style=flat-square\u0026logo=microsoftazure\u0026logoColor=white)](https://azure.microsoft.com/)\n[![GCP](https://img.shields.io/badge/GCP-4285F4?style=flat-square\u0026logo=googlecloud\u0026logoColor=white)](https://cloud.google.com/)\n[![uv](https://img.shields.io/badge/uv-DE5FE9?style=flat-square\u0026logo=astral\u0026logoColor=white)](https://github.com/astral-sh/uv)\n[![Ruff](https://img.shields.io/badge/Ruff-46a758?style=flat-square)](https://github.com/astral-sh/ruff)\n\n\u003cbr/\u003e\n\n**→ [Available for freelance projects](mailto:kevin@meinon.de?subject=FastAPI%20Freelance%20Inquiry) ←**\n\n\u003c/div\u003e\n\n---\n\n## About\n\nI'm **Kevin Meinon**, a freelance backend engineer specialising in Python and production-grade API systems — primarily **FastAPI**, but equally at home with **Flask** and **Django** depending on what the project calls for.\n\nThis template is a living showcase of the architecture patterns and engineering standards I bring to every engagement — not boilerplate to fill in, but a reference for what production-ready actually looks like.\n\n**What I build:**\n- High-throughput REST \u0026 async APIs with clean domain separation\n- End-to-end CI pipelines with strict quality gates (lint, types, coverage)\n- Cloud-portable infrastructure baselines (AWS / Azure / GCP)\n- Systems that are easy for your team to own after I'm done\n\nIf your team needs a backend that ships fast and holds up — [let's talk](mailto:kevin@meinon.de).\n\n---\n\n## What this demonstrates\n\n| Concern | Approach |\n|---|---|\n| **Architecture** | App factory, versioned routes, repository pattern, domain layer separation — framework-agnostic patterns that port cleanly to Flask or Django |\n| **Data layer** | SQLAlchemy async ORM + asyncpg + dependency-injected sessions |\n| **Auth** | API key middleware (`X-API-Key`) with per-route enforcement |\n| **Observability** | Structured JSON logging, request ID propagation, Prometheus-style metrics |\n| **Quality** | 100% coverage gate, Ruff linting, Ty type checking, pre-commit hooks |\n| **Infrastructure** | Terraform modules for ECR (AWS), ACR (Azure), GAR (GCP) |\n| **Dev experience** | Docker Compose with hot-reload dev profile, full local parity |\n\n---\n\n## Tech stack\n\n- **Runtime:** Python 3.14\n- **Framework:** FastAPI + Pydantic v2 · Flask · Django\n- **Database:** PostgreSQL · SQLAlchemy async · asyncpg\n- **Tooling:** uv · Ruff · Ty · pytest · tox\n- **Infrastructure:** Docker · Docker Compose · Terraform (AWS / Azure / GCP)\n- **CI/CD:** GitHub Actions\n\n\u003e The FastAPI layer is intentionally thin and architecturally isolated — swapping it for Flask or Django is a configuration change, not a rewrite.\n\n---\n\n## API surface\n```\nGET    /api/v1/health                       # public\nGET    /api/v1/metrics                      # public\nPOST   /api/v1/documents/analyze            # requires X-API-Key\nPOST   /api/v1/documents                    # requires X-API-Key\nGET    /api/v1/documents                    # requires X-API-Key\nGET    /api/v1/documents/{document_id}      # requires X-API-Key\nPUT    /api/v1/documents/{document_id}      # requires X-API-Key\nDELETE /api/v1/documents/{document_id}      # requires X-API-Key\n```\n\n---\n\n## Local development\n```bash\nuv sync --all-groups\nuv run uvicorn fastapi_production_template.main:app --reload\n```\n```bash\ncurl -H \"X-API-Key: dev-api-key\" http://localhost:8000/api/v1/documents\n```\n\n## Quality gates\n```bash\nuv run pytest          # tests + coverage\nuv run ruff check .    # linting\nuv run ty check .      # type checking\nuv run tox             # full gate\n```\n```bash\nuv run pre-commit install\nuv run pre-commit run --all-files\n```\n\n## Docker\n```bash\ndocker compose up --build\n\n# Dev profile with hot reload\ndocker compose --profile dev up --build --watch api-dev postgres\n```\n\n## Terraform\n```bash\nterraform -chdir=infra/terraform-aws   init \u0026\u0026 validate\nterraform -chdir=infra/terraform-azure init \u0026\u0026 validate\nterraform -chdir=infra/terraform-gcp   init \u0026\u0026 validate\n```\n\n---\n\n\u003cdiv align=\"center\"\u003e\n\n## Hire me\n\n**I'm available for backend contracts and freelance projects.**\n\nBackend feature delivery · API performance \u0026 reliability · CI quality gates · Cloud deployment\n\n[kevin@meinon.de](mailto:kevin@meinon.de?subject=Backend%20Project%20Inquiry)\n\n\u003c/div\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrytos%2Ffastapi-production-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkrytos%2Ffastapi-production-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrytos%2Ffastapi-production-template/lists"}