{"id":19750154,"url":"https://github.com/lqmanh/fastapi-app","last_synced_at":"2025-04-30T10:30:43.473Z","repository":{"id":55521458,"uuid":"312612698","full_name":"lqmanh/fastapi-app","owner":"lqmanh","description":"Fastapi-app is an opinionated modular FastAPI app boilerplate inspired by NestJS and Flask's Blueprint.","archived":false,"fork":false,"pushed_at":"2021-10-19T18:30:35.000Z","size":144,"stargazers_count":18,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"main","last_synced_at":"2023-03-02T09:06:45.048Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lqmanh.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}},"created_at":"2020-11-13T15:27:16.000Z","updated_at":"2022-12-02T18:53:23.000Z","dependencies_parsed_at":"2022-08-15T02:20:28.650Z","dependency_job_id":null,"html_url":"https://github.com/lqmanh/fastapi-app","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lqmanh%2Ffastapi-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lqmanh%2Ffastapi-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lqmanh%2Ffastapi-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lqmanh%2Ffastapi-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lqmanh","download_url":"https://codeload.github.com/lqmanh/fastapi-app/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224206018,"owners_count":17273377,"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":["boilerplate","fastapi","python"],"created_at":"2024-11-12T02:30:53.214Z","updated_at":"2024-11-12T02:33:01.180Z","avatar_url":"https://github.com/lqmanh.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fastapi-app\n\nFastapi-app is an opinionated modular FastAPI app boilerplate inspired by [NestJS](https://nestjs.com) and Flask's [Blueprint](https://flask.palletsprojects.com/blueprints). It is suitable for small to medium sized API oriented microservices.\n\n## Features\n\n- ASGI server with [Uvicorn](https://github.com/encode/uvicorn)\n- Active record ORM with [Tortoise](https://github.com/tortoise/tortoise-orm) and database migration with [Aerich](https://github.com/tortoise/aerich)\n- Authentication with OAuth2\n- Access control with [Casbin](https://github.com/casbin/pycasbin)\n- Job scheduling with [Arq](https://github.com/samuelcolvin/arq)\n- CLI with [Typer](https://github.com/tiangolo/typer)\n- Built-in pagination support\n- Preconfigured logger\n\n## Usage\n\n```sh\ncookiecutter https://github.com/lqmanh/fastapi-app\n```\n\n## Project Structure\n\n```sh\n{{cookiecutter.project_slug}}        #\n├── {{cookiecutter.package_name}}    #\n│   ├── common                       # Common components\n│   │   ├── constants.py             # Constants\n│   │   ├── types.py                 # Classes, enums, type aliases,...\n│   │   └── utils.py                 # Helper functions, decorators,...\n│   ├── modules                      # Where magic happens\n│   │   ├── ac                       # Access control module\n│   │   │   ├── ac_deps.py           #\n│   │   │   ├── ac_model.conf        # Access control model\n│   │   │   └── ac_policies.csv      # Policies\n│   │   ├── arq                      # Arq module\n│   │   │   ├── arq_deps.py          #\n│   │   │   └── arq_jobs.py          #\n│   │   ├── logging                  # Logging module\n│   │   │   └── logging_deps.py      #\n│   │   ├── pagination               # Pagination module\n│   │   │   ├── pagination_deps.py   #\n│   │   │   ├── pagination_dtos.py   #\n│   │   │   └── pagination_types.py  #\n│   │   └── users                    # User management module\n│   │       ├── users_cli.py         # CLI sub-app\n│   │       ├── users_controller.py  # Controller in NestJS, class-based view in Django\n│   │       ├── users_deps.py        # Injectable dependencies\n│   │       ├── users_dtos.py        # DTOs, view models\n│   │       ├── users_mapper.py      # Mapper that maps domain models to DTOs\n│   │       ├── users_models.py      # Domain models\n│   │       ├── users_module.py      # Module class\n│   │       ├── users_service.py     # Business logic, also a special kind of dependencies\n│   │       └── users_types.py       # Classes, enums, type aliases,...\n│   ├── cli.py                       # Root CLI app\n│   ├── config.py                    # Global configurations\n│   └── server.py                    # HTTP server\n├── LICENSE                          #\n├── README.md                        #\n├── aerich.ini                       # Aerich configurations\n├── poetry.toml                      #\n└── pyproject.toml                   #\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flqmanh%2Ffastapi-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flqmanh%2Ffastapi-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flqmanh%2Ffastapi-app/lists"}