Metadata-Version: 2.4
Name: fastapi-deck
Version: 0.3.0
Summary: Interactive TUI scaffold generator for production-ready FastAPI projects (like create-next-app)
Author: fastapi-deck contributors
License: MIT
Project-URL: Homepage, https://github.com/BazilSuhail/fastapi-deck
Project-URL: Repository, https://github.com/BazilSuhail/fastapi-deck
Project-URL: Bug Tracker, https://github.com/BazilSuhail/fastapi-deck/issues
Keywords: fastapi,scaffold,scaffolding,codegen,cli,tui,generator,uvicorn,sqlalchemy,alembic
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Code Generators
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: rich>=13.0.0
Dynamic: license-file

# fastapi-deck

**Interactive scaffold generator for FastAPI projects** — like *create-next-app*
but for FastAPI. Run one command, answer a few questions with your arrow keys,
and get a complete, runnable project with `.env`, `requirements.txt`, SQL
database wiring, optional auth, services folder, Docker and tests.

**Author:** Bazil Suhail · [PyPI](https://pypi.org/user/BazilSuhail/)

## What you get

A generated project includes:

- `.env` + `.env.example`, `requirements.txt`, `requirements-dev.txt`, `.gitignore`, `README.md`
- Typed configuration via `pydantic-settings` (no raw `os.getenv`)
- Async SQLAlchemy 2.0 database layer + session dependency
- CORS middleware, `/` and `/health` endpoints
- **PostgreSQL**: Alembic migrations pre-configured · **SQLite**: zero-setup local dev
- Optional **JWT authentication** (python-jose + passlib/bcrypt)
- Three templates:
  - `beginner` — single-file app
  - `standard` — layered (`config`, `database`, `models`, `schemas`, `routers`)
  - `production` — domain-driven (`app/core/` + `app/modules/` with models → schemas → services → routers)

## Questions the wizard asks

1. **Project name**
2. **Template** — Beginner / Standard / Production
3. **Database** (SQL only for now; MongoDB comes later) — PostgreSQL / SQLite / None
4. **Optional features** (toggle with the space bar):
   - JWT authentication
   - `services/` business-logic folder
   - Docker (Dockerfile + docker-compose.yml)
   - pytest smoke tests

Navigate menus with **Up/Down arrow keys** (or W/S), press **Enter** to select,
**Space** to toggle optional features, and **Q** to go back.

## Requirements

- Python **3.9+** to run the tool
- Python **3.10+** for generated projects (they use modern type syntax)

## Install

```bash
pip install fastapi-deck
```

This registers the `fastapi-deck` command on your system.

## Usage

```bash
fastapi-deck
```

or

```bash
python -m fastapi_deck
```

From the main menu choose **Create new project**, answer the questions, and the
project is written into a new folder named after your project. Then:

```bash
cd myproject
python -m venv venv
.\venv\Scripts\activate      # Windows (PowerShell: .\venv\Scripts\Activate.ps1)
pip install -r requirements.txt
Copy .env.example to .env and adjust values
uvicorn app.main:app --reload
```

Open http://localhost:8000/docs for the interactive Swagger UI.

## CLI options

```bash
fastapi-deck --help       # help, including author info
fastapi-deck --version    # show the version
```

## Guides

- **[GUIDE.md](GUIDE.md)** — full setup & configuration guide for generated projects:
  environment, `.env`, database setup, migrations, running, auth, adding modules, tests and Docker.

## How the tool is built

Modular and extensible so new templates, databases and features drop in easily:

- `layouts/` — project templates (`beginner`, `standard`, `production`)
- `providers/` — pluggable database backends (`postgres`, `sqlite`, `none`)
- `features/` — gated optional additions (services, docker, tests)
- `ui.py` — reusable arrow-key menu components

Adding MongoDB later is just a new `providers/mongodb.py` plus one registry entry —
layouts and features need no changes.
