A clean and modern FastAPI starter template that includes JWT authentication, user profile management, and modular architecture.
This project is perfect for anyone building a backend for:
- β MVPs or SaaS platforms
- β Mobile app APIs
- β Secure admin dashboards
- β Learning how to structure FastAPI applications
- π User signup & login (
/auth/signup,/auth/login) - π‘οΈ JWT authentication with token-based protection
- π€ User profile support (
/profile/me) - π§± SQLite database (easily swappable with PostgreSQL)
- π Password hashing (
bcrypt) - π Modular file structure for scalability
- π Fully commented in English & French
fastapi-auth-snippet/
βββ app/
β βββ core/ # Config & security
β βββ crud/ # DB access logic
β βββ models/ # SQLAlchemy models
β βββ routes/ # API routes
β βββ schemas/ # Pydantic schemas
β βββ main.py # API entry point
β βββ database.py # DB connection
βββ README.md
Example response from
/auth/login
{
"access_token": "eyJhbGciOiJIUzI1NiIsInR...",
"token_type": "bearer"
}Example request to
/profile/me
{
"bio": "FastAPI lover",
"image": "https://example.com/photo.jpg"
}This is just a preview!
π Get the complete source code + documentation + real usage demo here:
π¦ Buy on Selar
Includes:
- Full commented code
- SQLite setup
- Auth routes, profile routes
- Bilingual documentation (FR/EN)
- Ready to deploy or extend
Developed with β€οΈ by SENA DOMONHEDO
π§ Email: [email protected]
β If you find this useful, give it a star and share it with others!