r/FastAPI • u/Lucapo01 • Dec 25 '24
Tutorial Scalable and Minimalistic FastAPI + PostgreSQL Template
Hey ! π I've created a modern template that combines best practices with a fun superhero theme π It's designed to help you kickstart your API projects with a solid foundation! π
Features:
- ποΈ Clean architecture with repository pattern that scales beautifully
- π Built-in async SQLAlchemy + PostgreSQL integration
- β‘οΈ Automatic Alembic migrations that just work
- π§ͺ Complete CI pipeline and testing setup
- βCustom Error Handling and Logging
- π Pre-configured Railway deployment (one click and you're live!)
The template includes a full heroes API showcase with proper CRUD operations, authentication, and error handling. Perfect for learning or starting your next project! πͺ
Developer experience goodies: π οΈ
- π» VS Code debugging configurations included
- π UV package manager for lightning-fast dependency management
- β¨ Pre-commit hooks for consistent code quality
- π Comprehensive documentation for every feature
Check it out: https://github.com/luchog01/minimalistic-fastapi-template π
I'm still not super confident about how I structured the logging setup and DB migrations π Would love to hear your thoughts on those! Also open to any suggestions for improvements. I feel like there's always a better way to handle these things that I haven't thought of yet! Let me know what you think!
View all comments
Show parent comment
1
u/idkwhatimdoing069 Dec 26 '24
DDD adds extra complexity, yes. But when you need to refactor code to adapt to new features, having the separation of domains makes making those changes easier with less headache.
This is how Iβve built all my APIs over the past year, even little basic ones