Skip to content

ticatwolves/FastApiBasicAuth

Repository files navigation

🚀 FastAPI Starter Kit

A production-ready FastAPI boilerplate with authentication, user management, and profile handling.
Built with modern Python packaging (hatchling) and a clean src/ layout.


📦 Features

  • 🔑 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

🛠️ Project Structure

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

⚡ Installation

Clone the repo

git clone https://github.com/ticatwolves/FastApiBasicAuth
cd FastApiBasicAuth

Install dependencies

Using prod requirements:

pip install -r requirements/prod.txt

Or install in editable mode:

pip install -e .

Run migrations

alembic upgrade head

Start the server

uvicorn fastapi_basic_auth.main:app --reload

API available at → http://localhost:8000/docs


🐍 Packaging & Publishing

This project uses hatchling with hatch-requirements-txt.
Dependencies are dynamically loaded from requirements/prod.txt.

Build

hatch build

Publish to PyPI

hatch publish

🧪 Testing

Install dev dependencies:

pip install -r requirements/dev.txt

Run tests:

pytest

🛣️ Roadmap

  • Social login (Google/GitHub)
  • Role-based access control (RBAC)
  • Multi-tenant support (for SaaS)
  • WebSocket notifications
  • Docker + CI/CD workflows

🤝 Contributing

Contributions are welcome!

  • Fork the repo
  • Create a feature branch
  • Submit a PR 🚀

📜 License

This project is licensed under the MIT License.
See LICENSE for details.

About

No description or website provided.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages