A production-ready FastAPI boilerplate with authentication, user management, and profile handling.
Built with modern Python packaging (hatchling
) and a clean src/
layout.
- 🔑 JWT Authentication (login, signup, refresh tokens)
- 👤 User Profiles (CRUD operations)
- 🔒 Password Hashing with
passlib[bcrypt]
- 🗂️ SQLAlchemy ORM + Alembic migrations
- 📖 Interactive API Docs (Swagger UI & ReDoc)
- 🐳 Optional Docker support for deployment
- 📂 Modern
src/
folder layout - 🧪 Pytest setup for testing
backend/
├── pyproject.toml
├── requirements/
│ ├── base.txt
│ ├── prod.txt
│ └── dev.txt
├── src/
│ └── fastapi_starter_kit/
│ ├── __init__.py
│ ├── main.py
│ ├── api/
│ ├── core/
│ ├── models/
│ ├── schemas/
│ └── db.py
└── tests/
└── test_auth.py
git clone https://github.com/ticatwolves/FastApiBasicAuth
cd FastApiBasicAuth
Using prod requirements:
pip install -r requirements/prod.txt
Or install in editable mode:
pip install -e .
alembic upgrade head
uvicorn fastapi_basic_auth.main:app --reload
API available at → http://localhost:8000/docs
This project uses hatchling with hatch-requirements-txt
.
Dependencies are dynamically loaded from requirements/prod.txt
.
hatch build
hatch publish
Install dev dependencies:
pip install -r requirements/dev.txt
Run tests:
pytest
- Social login (Google/GitHub)
- Role-based access control (RBAC)
- Multi-tenant support (for SaaS)
- WebSocket notifications
- Docker + CI/CD workflows
Contributions are welcome!
- Fork the repo
- Create a feature branch
- Submit a PR 🚀
This project is licensed under the MIT License.
See LICENSE for details.