{"id":38129778,"url":"https://github.com/jujumilk3/fastapi-clean-architecture","last_synced_at":"2026-01-16T22:36:16.187Z","repository":{"id":37544032,"uuid":"494041998","full_name":"jujumilk3/fastapi-clean-architecture","owner":"jujumilk3","description":"Base FastAPI Project to create general api.","archived":false,"fork":false,"pushed_at":"2024-11-03T12:08:42.000Z","size":578,"stargazers_count":272,"open_issues_count":0,"forks_count":59,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-11-03T13:18:13.647Z","etag":null,"topics":["boilerplate","fastapi","python"],"latest_commit_sha":null,"homepage":"","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/jujumilk3.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":"2022-05-19T11:25:58.000Z","updated_at":"2024-11-03T12:08:47.000Z","dependencies_parsed_at":"2024-11-03T13:17:55.544Z","dependency_job_id":"a47d27aa-4808-42ec-9638-d97a8445cf69","html_url":"https://github.com/jujumilk3/fastapi-clean-architecture","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jujumilk3/fastapi-clean-architecture","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jujumilk3%2Ffastapi-clean-architecture","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jujumilk3%2Ffastapi-clean-architecture/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jujumilk3%2Ffastapi-clean-architecture/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jujumilk3%2Ffastapi-clean-architecture/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jujumilk3","download_url":"https://codeload.github.com/jujumilk3/fastapi-clean-architecture/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jujumilk3%2Ffastapi-clean-architecture/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28485425,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["boilerplate","fastapi","python"],"created_at":"2026-01-16T22:36:16.097Z","updated_at":"2026-01-16T22:36:16.176Z","avatar_url":"https://github.com/jujumilk3.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fastapi-clean-architecture\n\n## description\nBase FastAPI project for applying general RestAPI Application cases.\n![openapi-docs](./doc/images/openapi-docs-v2.png)\n\n## concept\n1. Minimal functionality.\n2. Convincing architecture.\n3. Easy to read.\n4. Compatibility.\n5. Versatility.\n\n## base models\n1. user\n2. post [user (1 : n) post]\n3. tag [post (n : n) tag]\n\n## integrated with\n1. Python3.9+\n2. Fastapi 0.78.0\n3. Database\n   1. MySQL5.7+\n   2. Migration with alembic\n   3. pytest with real DB\n   4. Load with two ways (eager, lazy)\n   5. Modeling with schema (1:1, 1:n, n:n)\n4. dependency-injector\n   1. service-repository pattern\n5. JWT authentication\n   1. role separation each endpoint\n6. Deployment\n   1. container environment(k8s, docker)\n   2. raw WAS(Web Application Server)\n\n## commands\n1. db(alembic)\n   1. `alembic upgrade head`: apply every migrations\n   2. `alembic downgrade base`: rollback every migrations\n   3. `alembic revision --autogenerate -m \"revision_name\"`: create new migration \n   4. `alembic history`: get alembic revision history\n2. How to migration\n   1. Create or modify models from `app/model/*.py`\n   2. `alembic -x ENV=[dev|stage|prod] revision --autogenerate -m \"revision_name\"`\n   3. Check auto generated migration file from `app/migrations/versions/*.py`\n   4. `alembic -x ENV=[dev|stage|prod] upgrade head`  \n      If ENV does not exist, it will be applied to the test.\n3. server\n   1. `uvicorn app.main:app --reload`: base\n   2. options\n      1. host: `--host 0.0.0.0`\n      2. port: `--port 8000`\n4. test\n   1. `pytest`: base \n   2. `pytest --cov=app --cov-report=term-missing`: coverage with stdout\n   3. `pytest --cov=app --cov-report=html`: coverage with html\n\n## sample env\n```dotenv\n# mysql case\nENV=dev\nDB=mysql\nDB_USER=root\nDB_PASSWORD=qwer1234\nDB_HOST=localhost\nDB_PORT=3306\n\n# postgres case\nENV=dev\nDB=postgresql\nDB_USER=gyu\nDB_PASSWORD=\nDB_HOST=localhost\nDB_PORT=5432\n```\n\n## references\n1. [FastAPI official docs](https://fastapi.tiangolo.com/)\n2. [alembic official tutorial](https://alembic.sqlalchemy.org/en/latest/tutorial.html)\n3. [Dependency Injector](https://python-dependency-injector.ets-labs.org/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjujumilk3%2Ffastapi-clean-architecture","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjujumilk3%2Ffastapi-clean-architecture","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjujumilk3%2Ffastapi-clean-architecture/lists"}