🚀 Fastplate
Fastplate is a CLI tool that scaffolds production-ready FastAPI projects with Tailwind CSS, DaisyUI, and Jinja2 templates in seconds.
✨ Features
- 🏗️ FastAPI backend with async support and automatic OpenAPI docs
- 🎨 Tailwind CSS v4 + DaisyUI for beautiful, responsive UIs
- 📄 Jinja2 server-side templating with component-based structure
- 📦 uv for fast Python dependency management
- 🐳 Docker & docker-compose ready for deployment
- ⚡ Hot reload for both backend and CSS during development
- 🔧 Makefile with common development commands
📦 Installation
With uv (recommended)
uv add fastplate
With pip
pip install fastplate
With pipx (global install)
pipx install fastplate
🚀 Quick Start
Using uv (recommended)
# Create a new project directory and add fastplate
mkdir my-app && cd my-app
uv init
uv add fastplate
# Initialize the project
uv run fastplate init --name "My App"
# Start development
make dev # FastAPI server at http://localhost:8000
make npm-watch # Tailwind CSS watcher (in another terminal)
Using pip/pipx
# Create in a new directory
fastplate init ./my-app --name "My App"
cd my-app
# Start development
make dev
make npm-watch
📖 CLI Reference
Fastplate uses a command-based CLI structure.
Commands
| Command | Description |
|---|---|
init |
Initialize a new FastAPI + Tailwind CSS project |
fastplate init
Scaffolds a new project with the full FastAPI + Tailwind CSS stack.
fastplate init [OPTIONS] [PATH]
# or with uv
uv run fastplate init [OPTIONS] [PATH]
Arguments
| Argument | Description | Default |
|---|---|---|
PATH |
Directory to create the project in | . (current directory) |
Options
| Option | Short | Description |
|---|---|---|
--name TEXT |
-n |
Project name (prompts if not provided) |
--skip-install |
Skip automatic dependency installation | |
--force |
-f |
Overwrite existing project files |
--help |
Show help message and exit |
Examples
# Interactive mode - prompts for project name
uv run fastplate init
# Specify project name directly
uv run fastplate init --name "My Awesome App"
# Create in a specific directory
uv run fastplate init ./projects/my-app --name my-app
# Skip automatic dependency installation
uv run fastplate init --skip-install
# Overwrite existing project files
uv run fastplate init --force
# Short flags
uv run fastplate init -n "My App" -f
What it does
- Copies template - Scaffolds the full project structure into the target directory
- Replaces placeholders - Injects your project name into config files (
pyproject.toml, templates, etc.) - Installs Python deps - Runs
uv syncto install FastAPI and dependencies - Installs npm deps - Runs
npm installinfrontend/for Tailwind CSS
Use --skip-install if you want to handle dependency installation manually.
📁 Generated Project Structure
my-app/
├── app/
│ ├── __init__.py
│ ├── main.py # FastAPI application entry point
│ ├── api/ # API routes (REST endpoints)
│ ├── core/
│ │ ├── config.py # Settings & configuration
│ │ └── middleware.py # Custom middleware
│ ├── models/ # Database models (SQLAlchemy, etc.)
│ ├── schemas/ # Pydantic schemas for validation
│ ├── services/ # Business logic layer
│ └── views/ # HTML view routes (Jinja2)
│ └── index.py
├── frontend/
│ ├── package.json # npm dependencies (Tailwind)
│ ├── static/
│ │ └── css/
│ │ ├── input.css # Tailwind source
│ │ └── output.css # Compiled CSS
│ └── templates/
│ ├── base.html # Base template with layout
│ ├── components/ # Reusable Jinja2 components
│ │ ├── card.html
│ │ └── navbar.html
│ └── pages/ # Page templates
│ └── index.html
├── Dockerfile
├── docker-compose.yml
├── Makefile # Development commands
├── pyproject.toml # Python project config
└── README.md # Project-specific docs
🛠️ Development Commands
The generated project includes a Makefile with these commands:
make dev # Start FastAPI dev server with hot reload
make run # Start production server
make npm-watch # Watch & compile Tailwind CSS
make npm-build # Build minified CSS for production
make docker-up # Start with Docker Compose
make docker-down # Stop Docker containers
make clean # Remove generated files
🎨 Styling with Tailwind & DaisyUI
The template uses Tailwind CSS v4 with DaisyUI components.
Edit frontend/static/css/input.css to customize your styles:
@import "tailwindcss";
@plugin "daisyui";
/* Your custom styles here */
Run make npm-watch during development to auto-compile CSS changes.
🐳 Docker Deployment
# Build and run with Docker Compose
make docker-up
# Or manually
docker build -t my-app .
docker run -p 8000:8000 my-app
📋 Requirements
- Python 3.12+
- Node.js 18+ (for Tailwind CSS)
- uv (recommended) or pip
🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
📄 License
MIT License - see LICENSE for details.
Metadata
Release files for fastplate 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| fastplate-0.1.0.tar.gz | 74.5 kB | Without provenance | Details for fastplate-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| fastplate-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for fastplate-0.1.0-py3-none-any.whl |
Total release size: 118.2 kB
Release files / fastplate-0.1.0.tar.gz
| Download URL | fastplate-0.1.0.tar.gz |
|---|---|
| Size | 74.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0c79222faf3e55e7aa6820ef5c91cfdf1aa44ed13968f25342453be10604864c
|
|
BLAKE2b-256 checksum How to use checksums |
2d9fe427a917fca27a3e41781e36ecd5bcb1a06ed869e48bfc76827b43af255f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.5.10
|
Release files / fastplate-0.1.0-py3-none-any.whl
| Download URL | fastplate-0.1.0-py3-none-any.whl |
|---|---|
| Size | 43.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4f31688723173282f11d0e66855aa8aad3fe2cb5f12272cfe62c1ed2d2966790
|
|
BLAKE2b-256 checksum How to use checksums |
a5f7ffa261ff1c3db226042c29c1ef63ea890d6f1a93f6ce6cff7980faf83074
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.5.10
|
Security for fastplate 0.1.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.