https://github.com/kazi-naimul/fastapi-boilerplate
FastAPI boilerplate for industry level application
https://github.com/kazi-naimul/fastapi-boilerplate
backend-api boilerplate boilerplate-template fastapi python
Last synced: about 2 months ago
JSON representation
FastAPI boilerplate for industry level application
- Host: GitHub
- URL: https://github.com/kazi-naimul/fastapi-boilerplate
- Owner: kazi-naimul
- Created: 2023-12-25T19:18:43.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-01-07T11:54:19.000Z (over 2 years ago)
- Last Synced: 2025-09-11T07:27:57.002Z (10 months ago)
- Topics: backend-api, boilerplate, boilerplate-template, fastapi, python
- Language: Python
- Homepage:
- Size: 1.79 MB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Welcome to FastAPI Boilerplate
Ready to kickstart your FastAPI project? Look no further! This boilerplate offers you a robust foundation for building powerful applications.
## Key Highlights
✅ Docker Compose for seamless production setup. \
✅ Local Dockerized database for convenient development. \
✅ PgAdmin Docker container for easy database inspection. \
✅ Migrations, Serializers, and ORM configurations ready to roll. \
✅ Token Authentication for secure endpoints. \
✅ Logging Mechanism for effective debugging. \
✅ Pytest for Test-Driven Development (TDD). \
✅ Separate SQLite database and mock sessions for testing. \
✅ Poetry for hassle-free dependency management and packaging.
## Powered by These Technologies
- **Alembic:** Simplifying database migrations.
- **SQLAlchemy:** Trustworthy ORM capabilities.
- **Pydantic:** Handling typing and serialization with ease.
- **Pytest:** Empowering Test-Driven Development (TDD).
- **Poetry:** The smarter choice for dependency management.
- **Docker & docker-compose:** Virtualization for efficient development.
- **PostgreSQL:** A robust relational database system.
- **PgAdmin:** Your ally for efficient database management.
- **Loguru:** The simplest logging solution.
## Quick Setup
1. Create a `.env` file in the root folder (`fastapi-boilerplate/.env`):
```env
DATABASE_URL=postgresql+psycopg2://postgres:password@db:5432/boiler_plate_db
DB_USER=postgres
DB_PASSWORD=password
DB_NAME=boiler_plate_db
PGADMIN_EMAIL=admin@admin.com
PGADMIN_PASSWORD=admin
X_TOKEN=12345678910
```
2. Launch Docker Compose:
```bash
docker-compose up
```
## 🎉 Get started with your FastAPI CRUD backend at `localhost:8000`.
- Discover Swagger docs at `localhost:8000/docs`.
- Dive into PgAdmin at `localhost:5050`.
Feel free to tailor and tweak this boilerplate to suit your FastAPI project needs!
# Acknowledgments
A big shoutout to the original rawheel/fastapi-boilerplate for providing the initial inspiration. The foundation laid by the original repository has been instrumental in shaping this customized boilerplate.