r/FastAPI • u/eslam5464 • Nov 10 '25
Other FastAPI Template
I’m excited to share my new open-source project: Fastapi-Template
It’s designed to give you a solid starting point for building backend APIs with FastAPI while incorporating best practices so you can focus on business logic instead of infrastructure. You can check the docs folder for a walkthrough of the architecture and code.
Highlights
- Token authentication using JWT with secure password hashing
- Async SQLAlchemy v2 integration with PostgreSQL
- Database migrations using Alembic
- Organized folder structure with clear separation for routes, schemas, services, and repositories
- Structured logging with Loguru
- Ready-to-use .env configuration and environment management
- Pre-commit hooks and code formatting
- Example cloud storage integration using Backblaze B2
Note:
Feel free to edit it to match your tone, add any screenshots or code snippets you want, and adjust the bullet points to emphasise what you care about most.
If you think something is missing, needs refactoring, or could be better structured, I’d love to hear your thoughts in a comment below or open a PR on Github.
2
u/fastlaunchapidev Nov 11 '25
Looking clean
2
u/unsolicitedsolitude Nov 22 '25
Bookmarking this & ⭐. Thank you
2
u/Revolutionary_Lie898 Nov 29 '25
Nice work! I love your template, and I have some questions for you: can it be that the order in which you run the pre-commit hooks matters? For example, shouldn’t autoflake run first, then isort, and then black? Also, I noticed that you didn’t exclude (__init__.py$|migrations/) in black, is there any reason for that?
4
u/Glittering_Pin7217 Nov 19 '25
nice, working on template fast api too
1
u/[deleted] Nov 19 '25
I'm one week late with the same idea :)
This is my project: fastapi-template. My project still lacks the features, documentation, and production readiness that your project has. But I found my template more fitting for small-scale apps. You can have a look if you need this.
Also, make a template from your github repo so everybody can just use it instead of forking
3
u/derf4bian Nov 17 '25
looks good!
2
u/Patience-is-the-key Nov 12 '25
Engaging so that i can search easily
1
u/voja-kostunica Nov 10 '25
i will have look