Skip to content

forge-stack/fastapi-scaffold

Repository files navigation

FastAPI Scaffold

🚀 Production-ready FastAPI project generator with best practices baked in

Python 3.11+ License: Appache 2.0

FastAPI Scaffold is a powerful CLI tool that generates production-ready FastAPI projects with sensible defaults, best practices, and modern development workflows. Stop spending days on boilerplate setup and start building features in minutes.

✨ Features

  • 🎯 Smart Project Structure - Modular, scalable architecture following FastAPI best practices
  • 💾 Database Ready - PostgreSQL, MySQL, SQLite, or MongoDB with async ORM support
  • 🔐 Authentication Built-in - JWT, OAuth2, or API Key authentication out of the box
  • 🐳 Docker Ready - Dockerfile and docker-compose with optimized multi-stage builds
  • 🧪 Testing Setup - Pytest configuration with example tests and fixtures
  • 🔄 CI/CD Pipelines - GitHub Actions, GitLab CI, or Jenkins workflows
  • Background Tasks - Optional Celery/ARQ integration for async job processing
  • 🎨 Code Quality - Pre-configured linting (Ruff), formatting (Black), and type checking (Mypy)
  • 📚 Auto Documentation - Enhanced Swagger UI and ReDoc
  • 🔧 Presets - Quick start templates: minimal, api-only, saas, microservice

🚀 Quick Start

Installation

Use the Github Link to install it, copy it and paste it inside the pyproject.toml dependencies "fastapi-scaffold @ git+https://github.com/forge-stack/fastapi-scaffold.git"

uv sync

boom install and you can use it Install using uv (recommended) or pip:

# Using uv (fast!)
uv tool install fastapi-scaffold

# Or using pip
pip install fastapi-scaffold

Create Your First Project

Interactive Mode (Recommended)

fastapi-scaffold create

The CLI will guide you through configuration with smart defaults.

Quick Start with Presets

# Minimal setup (no database, no auth)
fastapi-scaffold create my-api --preset minimal

# API-only (SQLite + API key auth)
fastapi-scaffold create my-api --preset api-only

# Full-featured SaaS (Postgres + JWT + Redis + Celery)
fastapi-scaffold create my-api --preset saas

# Microservice (Lightweight with monitoring)
fastapi-scaffold create my-api --preset microservice

Run Your Project

cd my-api
uv sync                              # Install dependencies
uv run uvicorn app.main:app --reload # Start server

Visit:

🤝 Contributing

We welcome contributions! This is an open-source project under the forge-stack organization.

📄 License

Appache 2.0 License


Built with ❤️ by the forge-stack team

About

FastAPI CLI tool help to create structures easily

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages