fastapi-deck
Interactive TUI scaffold generator for FastAPI projects — think create-next-app
but for FastAPI. Answer a few questions and get a complete, runnable project with
.env, requirements.txt, SQL database wiring, auth, optional services folder,
Docker and tests.
Install
python -m pip install -e .
This registers fastapi-deck as a command on your system.
Usage
fastapi-deck
The wizard asks:
- Project name
- Template: beginner (single file) / standard (layered) / production (domain-driven)
- Database (SQL only for now; MongoDB will be added later):
- PostgreSQL — async SQLAlchemy + Alembic migrations
- SQLite — async SQLAlchemy (easiest local dev)
- None — bare REST skeleton
- Optional features, Next.js style:
- JWT authentication (python-jose + passlib/bcrypt)
- A
services/business-logic folder - Docker (Dockerfile + docker-compose.yml)
- pytest smoke tests
Then it generates the project under a directory named after your project.
How it's built (modular architecture)
Everything is pluggable so new templates, databases and features drop in easily:
src/fastapi_deck/
├── cli.py # interactive wizard (questions)
├── config.py # ProjectConfig dataclass
├── builder.py # merges core + layout + provider + features, writes files
├── prompts.py # rich prompt helpers
├── layouts/ # beginner.py / standard.py / production.py / common.py
├── providers/ # base.py + postgres.py / sqlite.py / nonedb.py
│ # -> add MongoDB later by subclassing DBProvider
└── features/ # services.py / docker.py / tests.py (+ registry)
- Layouts decide folder structure and wiring.
- Providers own everything database-specific (requirements,
.env, models, routers, migrations). Addproviders/mongodb.py+ one registry entry later. - Features are optional, gated additions (Docker, tests, services folder).
Development
python -m pip install -e .
fastapi-deck
Build a distributable package
python -m pip install build
python -m build
The wheel/sdist land in dist/.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fastapi_deck-0.2.0.tar.gz.
File metadata
- Download URL: fastapi_deck-0.2.0.tar.gz
- Upload date:
- Size: 17.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a123590ad0ec5dd350b4f10b062d957643ff13ad61ceea642e8a1baec1a4ac49
|
|
| MD5 |
d0ee1c858bdb03197f9d52d8172af95a
|
|
| BLAKE2b-256 |
dbe67f1621b4b1f044636b79267416203c45bf1680be2d86c018707a3b9c9e03
|
File details
Details for the file fastapi_deck-0.2.0-py3-none-any.whl.
File metadata
- Download URL: fastapi_deck-0.2.0-py3-none-any.whl
- Upload date:
- Size: 24.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4210830ae4f653ab92d80cf6b12954c039007f8e594299120fa05ff4d8fa9512
|
|
| MD5 |
3edb679a17ef88ff4ee9e37934f6165c
|
|
| BLAKE2b-256 |
ea9e98c9d967f7fc2e7044efc370ddf6fcd505050ec7f6eaac1dfa99dc1190d9
|