{"id":13821718,"url":"https://github.com/gaganpreet/fastapi-starter","last_synced_at":"2025-05-15T05:06:47.741Z","repository":{"id":36958171,"uuid":"398072998","full_name":"gaganpreet/fastapi-starter","owner":"gaganpreet","description":"A FastAPI based low code starter/boilerplate: SQLAlchemy 2.0 (async), Postgres, React-Admin, pytest and cypress","archived":false,"fork":false,"pushed_at":"2025-04-08T08:34:05.000Z","size":2807,"stargazers_count":485,"open_issues_count":22,"forks_count":51,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-14T08:10:28.998Z","etag":null,"topics":["cookiecutter","cookiecutter-fastapi","cookiecutter-template","docker","docker-compose","fastapi","fastapi-boilerplate","fastapi-template","fastapi-users","openapi-generator","postgres","python","python3","react","react-admin","sqlalchemy","typescript"],"latest_commit_sha":null,"homepage":"https://demo-project-fastapi-starter.fly.dev","language":"TypeScript","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/gaganpreet.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":"2021-08-19T20:59:42.000Z","updated_at":"2025-04-08T18:08:14.000Z","dependencies_parsed_at":"2023-02-19T07:45:50.467Z","dependency_job_id":"be6adc8b-bd12-4db0-aaeb-4d495ab056e9","html_url":"https://github.com/gaganpreet/fastapi-starter","commit_stats":{"total_commits":534,"total_committers":8,"mean_commits":66.75,"dds":0.3258426966292135,"last_synced_commit":"429c98130a477f6481081d34d1a7a7645cc8ae85"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gaganpreet%2Ffastapi-starter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gaganpreet%2Ffastapi-starter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gaganpreet%2Ffastapi-starter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gaganpreet%2Ffastapi-starter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gaganpreet","download_url":"https://codeload.github.com/gaganpreet/fastapi-starter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254276447,"owners_count":22043867,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["cookiecutter","cookiecutter-fastapi","cookiecutter-template","docker","docker-compose","fastapi","fastapi-boilerplate","fastapi-template","fastapi-users","openapi-generator","postgres","python","python3","react","react-admin","sqlalchemy","typescript"],"created_at":"2024-08-04T08:01:26.701Z","updated_at":"2025-05-15T05:06:44.345Z","avatar_url":"https://github.com/gaganpreet.png","language":"TypeScript","readme":"# FastAPI-Starter\n\n\u003c!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section --\u003e\n[![All Contributors](https://img.shields.io/badge/all_contributors-6-orange.svg?style=flat-square)](#contributors-)\n\u003c!-- ALL-CONTRIBUTORS-BADGE:END --\u003e\n![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/gaganpreet/fastapi-starter/cookiecutter-project-test.yml)\n![GitHub last commit (branch)](https://img.shields.io/github/last-commit/gaganpreet/fastapi-starter/main)\n\nA FastAPI based starter that relies heavily on existing plugins/frameworks. Integrates with OpenAPI Generator for a Typescript client, FastAPI Users for authentication, async-first with SQLAlchemy 2.0.\n\n---\n\n## Features\n\n- Uses **best practices**: Factory pattern and environment variables for configuration\n- User registration, models, authentication using [**FastAPI Users**](https://github.com/fastapi-users/fastapi-users)\n- Modern admin interface using [**React-Admin**](https://marmelab.com/react-admin/)\n- **Github Action** for building docker images and running automated tests\n- **Dependabot** config to keep project dependencies up to date\n- Create Typescript bindings for front-end automatically from OpenAPI spec using [**OpenAPI-Generator**](https://github.com/OpenAPITools/openapi-generator/), no need to write/update code when backend changes\n- Async-first codebase with **SQLAlchemy 2.0** and Alembic for database migrations\n- **pytest** with example tests included\n- Integration tests with **Cypress**\n- Docker images for frontend and backend\n- Includes extra Dockerfile (backend serves frontend) for straightforward production deployment\n- Pre-commit hooks with [Black](https://github.com/psf/black), [autoflake](https://github.com/PyCQA/autoflake), [isort](https://github.com/pycqa/isort), [flake8](https://github.com/PyCQA/flake8), [prettier](https://github.com/prettier/prettier), [eslint](https://github.com/eslint/eslint) for consistent code standards\n\n\n## How to use\n\nYou need Python 3 and pip installed locally. Run the [cookiecutter](https://cookiecutter.readthedocs.io) command (at least 1.7) and you'll be asked a few prompts.\n\n```bash\npip3 install cookiecutter\ncookiecutter https://github.com/gaganpreet/fastapi-starter\n```\n\n### Input variables\n\nThe generator (cookiecutter) will ask you for some data, you might want to have at hand before generating the project.\n\nThe input variables, with their default values [default value], are:\n\n* `project_name`: The name of the project\n* `project_slug`: The development-friendly name of the project. By default, based on the project name.\n* `backend_port`: The backend port on the localhost.\n* `front_end_port`: The frontend port on the localhost.\n\n\nIf you want to keep up to date with upstream changes (i.e. changes in this template), then it's better to use [Cruft](https://cruft.github.io/cruft/), which is fully compatible with Cookiecutter.\n\n```bash\npip3 install cruft\ncruft create https://github.com/gaganpreet/fastapi-starter\n```\n\nUsing cruft will generate a metadata file named `.cruft.json` (don't delete it). Later on you can update to the current version of this cookiecutter and import the changes to your generated project by running this command:\n\n```bash\ncruft update\n```\n\n## Objectives\n\n- Sane defaults with few prompts\n- Secure\n- KISS principle\n\n## Preview\n\n#### View [live demo](https://demo-project-fastapi-starter.fly.dev) here.\n\n![Login page](assets/login.png)\n\n![Item page](assets/items.png)\n\n\n## Features not included\n\nThe following features were left out in favour of simplicity:\n\n- Celery/Flower/Redis - Not needed for simple projects, Celery can be easily replaced with [background tasks](https://fastapi.tiangolo.com/tutorial/background-tasks/).\n- Traefik configuration - I prefer [NGINX Proxy automation](https://github.com/evertramos/nginx-proxy-automation)\n\n### Things to do\n\n- [ ] Migrate to Ruff\n- [ ] Email templates\n\n\n## Contributors ✨\n\nThanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --\u003e\n\u003c!-- prettier-ignore-start --\u003e\n\u003c!-- markdownlint-disable --\u003e\n\u003ctable\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://github.com/nadavof\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/93834717?v=4?s=100\" width=\"100px;\" alt=\"nadavof\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003enadavof\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/gaganpreet/fastapi-starter/commits?author=nadavof\" title=\"Documentation\"\u003e📖\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"http://dustindavis.me/\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/177353?v=4?s=100\" width=\"100px;\" alt=\"Dustin Davis\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eDustin Davis\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/gaganpreet/fastapi-starter/commits?author=djedi\" title=\"Documentation\"\u003e📖\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://www.linkedin.com/in/hugo-tinoco/\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/43675476?v=4?s=100\" width=\"100px;\" alt=\"Hugo Tinoco\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eHugo Tinoco\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/gaganpreet/fastapi-starter/commits?author=h4ndzdatm0ld\" title=\"Documentation\"\u003e📖\u003c/a\u003e \u003ca href=\"https://github.com/gaganpreet/fastapi-starter/commits?author=h4ndzdatm0ld\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://mixedneeds.com/\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/158175?v=4?s=100\" width=\"100px;\" alt=\"Michael Bunsen\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eMichael Bunsen\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/gaganpreet/fastapi-starter/commits?author=mihow\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://github.com/alexey-sveshnikov\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/447089?v=4?s=100\" width=\"100px;\" alt=\"Alexey Sveshnikov\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eAlexey Sveshnikov\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/gaganpreet/fastapi-starter/commits?author=alexey-sveshnikov\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://github.com/javi-aranda\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/24555230?v=4?s=100\" width=\"100px;\" alt=\"Javier Aranda Santos\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eJavier Aranda Santos\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/gaganpreet/fastapi-starter/commits?author=javi-aranda\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n  \u003ctfoot\u003e\n    \u003ctr\u003e\n      \u003ctd align=\"center\" size=\"13px\" colspan=\"7\"\u003e\n        \u003cimg src=\"https://raw.githubusercontent.com/all-contributors/all-contributors-cli/1b8533af435da9854653492b1327a23a4dbd0a10/assets/logo-small.svg\"\u003e\n          \u003ca href=\"https://all-contributors.js.org/docs/en/bot/usage\"\u003eAdd your contributions\u003c/a\u003e\n        \u003c/img\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tfoot\u003e\n\u003c/table\u003e\n\n\u003c!-- markdownlint-restore --\u003e\n\u003c!-- prettier-ignore-end --\u003e\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:END --\u003e\n\nThis project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!\n","funding_links":[],"categories":["TypeScript","FastAPI"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgaganpreet%2Ffastapi-starter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgaganpreet%2Ffastapi-starter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgaganpreet%2Ffastapi-starter/lists"}