Skip to main content

backend-dash

A CLI that generates ready-to-code FastAPI backend projects with SQLAlchemy, SQLite, PostgreSQL, MySQL, Alembic migrations, CRUD examples, tests, and optional JWT + Google OAuth authentication.

Features

  • Scaffold a complete FastAPI backend in seconds.
  • Supports --db=sqlite|postgres|mysql with SQLite as the default.
  • Generates a working SQLAlchemy setup and DB session wiring.
  • Adds an example CRUD resource so you can start from real code, not boilerplate.
  • Includes tests for the generated project.
  • Adds Alembic migrations for PostgreSQL and MySQL.
  • Keeps SQLite simple with create_all for zero-config local development.
  • Optional --auth mode adds JWT + Google OAuth auth support.
  • Clear validation for unsupported database values.
  • Clean .env.example setup for local development and migrations.

Installation

One-off usage

uvx backend-dash init "My API"

Install locally

pip install backend-dash
backend-dash init "My API"

Editable install for development

git clone https://github.com/prathamdmehta/backend-dash.git
cd backend-dash
pip install -e . --break-system-packages

Usage

Create a new project:

backend-dash init "Demo Project"

Create a project with auth:

backend-dash init "Demo Project Auth" --auth

Choose a database:

backend-dash init "My API" --db=sqlite
backend-dash init "My API" --db=postgres
backend-dash init "My API" --db=mysql

Combine database and auth:

backend-dash init "My API" --db=postgres --auth

Add Docker support:

backend-dash init "My API" --db=postgres --docker

This generates a Dockerfile, docker-compose.yml, and .dockerignore. For --db=postgres/--db=mysql, the compose file includes the database service too (with a healthcheck, so the app waits for the DB to actually be ready), and Alembic migrations run automatically on container start. For the SQLite default, it's just the app container with the DB file mounted as a volume.

cd my_api
cp .env.example .env
docker compose up --build

What gets generated

Base project

  • FastAPI app structure.
  • SQLAlchemy session and base model wiring.
  • Example item resource with CRUD routes.
  • Pydantic schemas and models.
  • Pytest test setup.

With --auth

  • Repository layer with a generic BaseRepository and UserRepository.
  • Auth service for registration, login, JWT issuance, and Google token exchange.
  • Validation with proper schema constraints.
  • Centralized error handling with a consistent error response shape.
  • Auth routes for register, login, me, Google login, and Google callback.

Database support

SQLite

SQLite is the default and uses create_all for a simple local setup.

PostgreSQL

For PostgreSQL, the scaffold uses Alembic migrations and real schema management.

MySQL

For MySQL, the scaffold also uses Alembic migrations and the correct MySQL driver setup.

Migrations

For PostgreSQL and MySQL, the project generates Alembic configuration and an env.py wired to DATABASE_URL and your app metadata.

Typical workflow:

alembic revision --autogenerate -m "create initial tables"
alembic upgrade head

The generated .env.example includes the right migration flow so you can move from scaffold to production-style schema management quickly.

Project structure

my_api/
├── app/
├── tests/
├── alembic/
├── alembic.ini
└── .env.example

If --auth is enabled, additional auth-related modules are included inside the app structure.

Example

Generate a new API project:

backend-dash init "Orders API" --db=postgres --auth

This creates a FastAPI backend with database wiring, migrations, tests, and authentication already in place, so you can start on business logic immediately.

Development

git clone https://github.com/prathamdmehta/backend-dash.git
cd backend-dash
pip install -e . --break-system-packages

Then run the CLI locally:

backend-dash init "Demo Project"

License

MIT

Metadata

Release files for backend-dash 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for backend-dash 0.2.0
File Size Uploaded Provenance Actions
backend_dash-0.2.0.tar.gz 18.5 kB Without provenance Details for backend_dash-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for backend-dash 0.2.0
File Interpreter ABI Platform Actions
backend_dash-0.2.0-py3-none-any.whl Python 3 none any Details for backend_dash-0.2.0-py3-none-any.whl

Total release size: 52.7 kB

Release files / backend_dash-0.2.0.tar.gz

Download URL backend_dash-0.2.0.tar.gz
Size 18.5 kB
Tags Source
SHA-256 checksum
How to use checksums
5e225f24ddec022443d0cbfc1fbd506e2fda8491aa59bf64da2184c381c29d9b
BLAKE2b-256 checksum
How to use checksums
eeeb2129c2c9ceb3f355ec7cd3abfb5c3b50e9ca4f6b421e741d50564aa9813f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.11

Release files / backend_dash-0.2.0-py3-none-any.whl

Download URL backend_dash-0.2.0-py3-none-any.whl
Size 34.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a24b6d9852230db7dee4e86eab504b39ea822ae712d092dee0a60853dfc96875
BLAKE2b-256 checksum
How to use checksums
c448f5e202566175dc054cd1c21350778679f618864256fd08566acd18c7729b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.11

Security for backend-dash 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page