{"id":35030771,"url":"https://github.com/ivan-borovets/fastapi-starter","last_synced_at":"2026-04-06T05:31:00.830Z","repository":{"id":287079269,"uuid":"963462197","full_name":"ivan-borovets/fastapi-starter","owner":"ivan-borovets","description":"Interactive FastAPI project generator — answer a few questions and get exactly what you need instead of cleaning up existing projects. Features scalable src-layout, modular migrations, env-based config, and Docker. Powered by Copier, a smarter alternative to Cookiecutter","archived":false,"fork":false,"pushed_at":"2025-06-01T14:33:50.000Z","size":49,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-14T04:11:48.324Z","etag":null,"topics":["alembic","boilerplate","clean-architecture","cli","cookiecutter","copier","copier-template","docker","docker-compose","fastapi","fastapi-boilerplate","fastapi-template","hexagonal-architecture","onion-architecture","postgres","project-template","python","sqlalchemy","uv"],"latest_commit_sha":null,"homepage":"","language":"Jinja","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ivan-borovets.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2025-04-09T18:06:47.000Z","updated_at":"2025-07-27T10:24:18.000Z","dependencies_parsed_at":"2025-04-09T21:37:38.062Z","dependency_job_id":"564589a7-60c2-4225-9df7-eaabbcad17f2","html_url":"https://github.com/ivan-borovets/fastapi-starter","commit_stats":null,"previous_names":["ivan-borovets/fastapi-starter"],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/ivan-borovets/fastapi-starter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivan-borovets%2Ffastapi-starter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivan-borovets%2Ffastapi-starter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivan-borovets%2Ffastapi-starter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivan-borovets%2Ffastapi-starter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ivan-borovets","download_url":"https://codeload.github.com/ivan-borovets/fastapi-starter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivan-borovets%2Ffastapi-starter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31461527,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-05T21:22:52.476Z","status":"online","status_checked_at":"2026-04-06T02:00:07.287Z","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":["alembic","boilerplate","clean-architecture","cli","cookiecutter","copier","copier-template","docker","docker-compose","fastapi","fastapi-boilerplate","fastapi-template","hexagonal-architecture","onion-architecture","postgres","project-template","python","sqlalchemy","uv"],"created_at":"2025-12-27T06:59:11.156Z","updated_at":"2026-04-06T05:31:00.825Z","avatar_url":"https://github.com/ivan-borovets.png","language":"Jinja","funding_links":[],"categories":[],"sub_categories":[],"readme":"# About\n\nFastAPI Starter is a self-bootstrapping template that saves you from copying old projects and deleting stuff you don’t\nneed.\nYou answer a few questions and get a clean `src/`-layout, working migrations, env-based config, and ready-to-run\nDocker.\nNo boilerplate hell — just a setup that works.\nPowered by [Copier](https://copier.readthedocs.io/en/stable/) —\nlike [Cookiecutter](https://github.com/cookiecutter/cookiecutter), but smarter.\n\nWhat will the result look like?\nRoughly like this: [fastapi-clean-example](https://github.com/ivan-borovets/fastapi-clean-example) — a\nframework-agnostic backend using FastAPI, implementing Clean Architecture and CQRS with DDD-inspired patterns, DIP (low\ncoupling), DI (no globals), hierarchical RBAC with permissions, and session-based authentication (cookies).\n\n# What's included\n\n- ⚙️ Scalable [src-layout](https://packaging.python.org/en/latest/discussions/src-layout-vs-flat-layout/) with proper\n  packaging — works for both minimal apps and modular monoliths (modules can share a kernel and support common\n  entrypoint)\n- 🚀 [FastAPI](https://fastapi.tiangolo.com/) — included by default, easy to replace\n- 🧩 [SQLAlchemy](https://www.sqlalchemy.org/) + [Alembic](https://alembic.sqlalchemy.org/en/latest/) — preconfigured,\n  module-aware migrations (each module can manage its own database)\n- 🐘 [Docker](https://www.docker.com/) \u0026 [Docker Compose](https://docs.docker.com/compose/) — environment-aware setup\n  with PostgreSQL\n- 📦 [Toml Config Manager](https://github.com/ivan-borovets/toml-config-manager) — structured `.toml` config, `.env`\n  generation, multi-env support via `Makefile`\n- 🗃️ Optional: [Dishka](https://github.com/reagento/dishka) DI — enables scoped DI with FastAPI; the project is\n  structured to support it\n- ✅ Optional: [pre-commit](https://pre-commit.com/) hooks and [GitHub Actions](https://github.com/features/actions) —\n  basic checks and CI out-of-the-box\n\n# How to generate a project\n\n1. Install Copier\n\n```shell\n# sudo apt update\n# sudo apt install pipx\n# pipx ensurepath\npipx install copier\n# or see https://copier.readthedocs.io/en/stable/\n```\n\n2. Run the generator\n\n```shell\ncopier copy https://github.com/ivan-borovets/fastapi-starter \u003cdesired project path\u003e\n```\n\nThe project will be generated based on an interactive prompt — no guessing required.\n\nAnd that’s it! ✨\n\n\u003e For first steps, see the generated `README.md` — it explains how to run the app, add modules, and manage config.\n\n# What the generator asks you\n\nWhen you run the generator, you'll be asked a few questions.\n\nHere's what they mean — and what your answers will affect:\n\n## `author_name`\n\n* **Prompt**: What is your full name? (e.g. John Smith)\n* **Affects**: `LICENSE`, `pyproject.toml`\n\n## `project_name`\n\n* **Prompt**: What is your project name?\n* **Constraints**: Must start with a lowercase letter and contain only lowercase letters, digits or dashes\n* **Affects**: `pyproject.toml`, `docker-compose.yaml` (if `use_toml_cfg_mgr` is enabled)\n\n## `module_name`\n\n* **Prompt**: What is the name of the first module?\n* **Tip**: Typically derived from the project name, but you can override it\n* **Affects**: The name of the first module in src-layout (`src/\u003cmodule_name\u003e`). Used for Alembic setup\n\n## `use_dishka`\n\n* **Prompt**: Do you need [Dishka](https://github.com/reagento/dishka)?\n* **Affects**: Whether Dishka DI with helper plotter script is included\n* **Say yes if**: You want scoped DI and plan to use Dishka’s integration with FastAPI\n\n## `use_toml_cfg_mgr`\n\n* **Prompt**: Do you need [Toml Config Manager](https://github.com/ivan-borovets/toml-config-manager)?\n* **Affects**: Adds a structured config system (`config/` directory, `.env` generator, `settings.py` preconfigured,\n  `Makefile` commands with `Dockerfile` and `docker-compose.yaml`)\n* **Say yes if**: You want per-environment TOML configs, generated `.env` files, and `Docker` setup\n\n## `use_pre_commit`\n\n* **Prompt**: Do you need Pre-commit?\n* **Visible only if**: `use_toml_cfg_mgr` is enabled\n* **Affects**: Adds `.pre-commit-config.yaml` with basic checks\n* **Say yes if**: You want checks before every commit\n\n## `use_github_actions`\n\n* **Prompt**: Do you need GitHub Actions?\n* **Affects**: Adds a test workflow to `.github/workflows/ci.yml`\n* **Say yes if**: You use GitHub and want basic CI out of the box\n\n# Structure\n```\n.\n├── config/...                               # configuration files and scripts, includes Docker\n├── Makefile                                 # shortcuts for setup and common tasks\n├── scripts/...                              # helper scripts\n├── pyproject.toml                           # tooling and environment config (uv)\n├── ...\n└── src/\n    ├── fastapi_starter/                     # first module\n    │   ├── application/...                  # application logic (interactors, ports, etc.)\n    │   ├── infrastructure/...               # adapters (e.g. SQLAlchemy, alembic setup)\n    │   │   └── sqla_persistence/alembic/... # per-module alembic config and versions\n    │   └── main/cli.py                      # entrypoint for CLI (`fastapi_starter alembic ...`)\n    │\n    ├── main/run.py                          # run script (e.g. uvicorn entrypoint)\n    │\n    ├── setup/\n    │   ├── app_factory.py                   # app builder\n    │   ├── config/...                       # app settings\n    │   └── ioc/...                          # dependency injection setup\n    │\n    ├── shared/...                           # cross-module helpers or shared interfaces\n    └── ...\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fivan-borovets%2Ffastapi-starter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fivan-borovets%2Ffastapi-starter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fivan-borovets%2Ffastapi-starter/lists"}