Scaffold a complete FastAPI project with Postgres, Redis, auth, Alembic migrations, Docker, and tests. Run bfx dev and start building.
Install the CLI
$ uv tool install bluefox-cli # provides: bluefox (or bfx for short)
Create a project
$ bluefox init myapp
Generate migrations and start developing
$ cd myapp $ bfx db migrate initial # spins up Postgres, generates migration, stops Postgres $ bfx dev # Postgres + Redis start, migrations run, app reloads on changes
A complete project structure with everything wired together. Every file is ready to use — no boilerplate to fill in.
welcome=Truebluefox-test fixturesbfx dev starts Postgres + Redis via Docker Compose, runs Alembic migrations, and launches the app with --reload. Nothing to install manually.
Multi-stage Dockerfile with uv. Production compose uses dokploy-network, dev overrides with a local bridge. Same pattern, two environments.
Alembic configured with configure_alembic() from bluefox-core. Run bfx db migrate add_users to generate — it spins up Postgres, auto-detects model changes, and stops.
Health check, public endpoints, and auth-protected routes tested out of the box. Real Postgres via testcontainers, SAVEPOINT isolation. Run make test.
bluefox-core finds your */api.py routers and */models.py models automatically. Create a module directory and start coding — no registration needed.
Templates are plain Python strings. No Jinja, no cookiecutter. Easy to read, easy to maintain, zero extra dependencies.
bluefox-auth wired out of the box — JWT tokens, cookie sessions, user registration, login, and Redis-backed token storage. The welcome page has a working sign-up form.
One command: bluefox init myapp. No interactive prompts, no plugin system, no config files. Opinionated and complete.
The app factory and models are minimal — just enough to start. Add your routes, models, and business logic on top.
from bluefox_auth import BluefoxAuth from bluefox_components import setup_components from bluefox_core import BluefoxSettings, create_bluefox_app def create_app() -> object: settings = BluefoxSettings() app = create_bluefox_app(settings, welcome=True) BluefoxAuth(app, settings) setup_components(app) return app app = create_app()
from fastapi import APIRouter, Depends from bluefox_auth import BluefoxUser, current_active_user router = APIRouter() @router.get("/") async def list_items(): return {"items": []} @router.get("/me") async def my_items(user: BluefoxUser = Depends(current_active_user)): return {"items": [], "owner": user.email} # auto-mounted at /items — no registration needed
from bluefox_test import bluefox_test_setup from bluefox_core import BluefoxBase globals().update(bluefox_test_setup(base=BluefoxBase, app_factory="main:create_app"))
from alembic import context from bluefox_core.migrations import configure_alembic configure_alembic(context)