{"id":39425836,"url":"https://github.com/firdavsdev/fullstack_fastapi_template","last_synced_at":"2026-01-18T04:00:09.363Z","repository":{"id":179102936,"uuid":"656726548","full_name":"firdavsDev/fullstack_fastapi_template","owner":"firdavsDev","description":"My FastAPI project template React + FastAPI","archived":false,"fork":false,"pushed_at":"2024-05-06T03:22:58.000Z","size":617,"stargazers_count":1,"open_issues_count":13,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-05-06T04:29:18.786Z","etag":null,"topics":["fastapi","template"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/firdavsDev.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}},"created_at":"2023-06-21T14:08:33.000Z","updated_at":"2023-07-13T12:05:25.000Z","dependencies_parsed_at":null,"dependency_job_id":"e00b63e4-ce83-4ea9-bbdd-8f1e310ab516","html_url":"https://github.com/firdavsDev/fullstack_fastapi_template","commit_stats":null,"previous_names":["firdavsdev/fullstack_fastapi_template"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/firdavsDev/fullstack_fastapi_template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firdavsDev%2Ffullstack_fastapi_template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firdavsDev%2Ffullstack_fastapi_template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firdavsDev%2Ffullstack_fastapi_template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firdavsDev%2Ffullstack_fastapi_template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/firdavsDev","download_url":"https://codeload.github.com/firdavsDev/fullstack_fastapi_template/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firdavsDev%2Ffullstack_fastapi_template/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28529455,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T00:39:45.795Z","status":"online","status_checked_at":"2026-01-18T02:00:07.578Z","response_time":98,"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":["fastapi","template"],"created_at":"2026-01-18T04:00:08.640Z","updated_at":"2026-01-18T04:00:09.339Z","avatar_url":"https://github.com/firdavsDev.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fastapi_template\n\n## Features\n\n- FastAPI\n- React Admin\n- SQLAlchemy and Alembic\n- Pre-commit hooks (black, autoflake, isort, flake8, prettier)\n- Github Action\n- Dependabot config\n- Docker images\n\n## Good to know\n\nThe frontend of this project uses React Admin. Follow the quick tutorial to understand how [React Admin](https://marmelab.com/react-admin/Tutorial.html) works.\n\n## Step 1: Getting started\n\nStart a local development instance with docker-compose\n\n```bash\ndocker-compose up -d\n\n# Run database migration\ndocker-compose exec backend alembic upgrade head\n\n```\n\nNow you can navigate to the following URLs:\n\n- Backend OpenAPI docs: http://localhost:8000/docs/\n- Frontend: http://localhost:3000\n\n### Step 2: Setup pre-commit hooks and database\n\nKeep your code clean by using the configured pre-commit hooks. Follow the [instructions here to install pre-commit](https://pre-commit.com/). Once pre-commit is installed, run this command to install the hooks into your git repository:\n\n```bash\npre-commit install\n```\n\n### Local development\n\nThe backend setup of docker-compose is set to automatically reload the app whenever code is updated. However, for frontend it's easier to develop locally.\n\n```bash\ndocker-compose stop frontend\ncd frontend\nyarn\nyarn start\n```\n\nIf you want to develop against something other than the default host, localhost:8000, you can set the `REACT_APP_API_BASE` environment variable:\n\n```bash\nexport REACT_APP_API_BASE=http://mydomain.name:8000\nyarn start\n```\n\nDon't forget to edit the `.env` file and update the `BACKEND_CORS_ORIGINS` value (add `http://mydomain:3000` to the allowed origins).\n\n### Rebuilding containers\n\nIf you add a dependency, you'll need to rebuild your containers like this:\n\n```bash\ndocker-compose up -d --build\n```\n\n### Regenerate front-end API package\n\nInstead of writing frontend API client manually, OpenAPI Generator is used. Typescript bindings for the backend API can be recreated with this command:\n\n```bash\nyarn genapi\n```\n\n### Database migrations\n\nThese two are the most used commands when working with alembic. For more info, follow through [Alembic's tutorial](https://alembic.sqlalchemy.org/en/latest/tutorial.html).\n\n```bash\n# Auto generate a revision\ndocker-compose exec backend alembic revision --autogenerate -m 'message'\n\n# Apply latest changes\ndocker-compose exec backend alembic upgrade head\n```\n\n### Backend tests\n\nThe `Backend` service uses a hardcoded database named `apptest`. First, ensure that it's created\n\n```bash\ndocker-compose exec postgres createdb apptest -U postgres\n```\n\nThen you can run tests with this command:\n\n```bash\ndocker-compose run backend pytest --cov --cov-report term-missing\n```\n\n### Single docker image\n\nThere's a monolith/single docker image that uses FastAPI to serve static assets. You can use this image to deploy directly to Heroku, Fly.io or anywhere where you can run a Dockerfile without having to build a complicated setup out of separate frontend and backend images.\n\n## Recipes\n\n#### Build and upload docker images to a repository\n\nConfigure the [**build-push-action**](https://github.com/marketplace/actions/build-and-push-docker-images) in `.github/workflows/test.yaml`.\n\n## Credits\n\nCreated with [FastAPI Starter](https://github.com/gaganpreet/fastapi-starter)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffirdavsdev%2Ffullstack_fastapi_template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffirdavsdev%2Ffullstack_fastapi_template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffirdavsdev%2Ffullstack_fastapi_template/lists"}