Scaffold a full-stack Flask + React starter project with auth, PostgreSQL, and Docker
Project description
create-flask-react
Scaffold a full-stack Flask + React starter project with auth, PostgreSQL, and Docker.
Quick Start
uvx create-flask-react my-app
cd my-app
make dev
Then open http://localhost:5173 — you'll see a login page, register an account, and land on an authenticated dashboard.
What You Get
- Backend: Flask with Flask-RESTX (auto-generated Swagger docs at
/api/docs) - Auth: Flask-Login with session-based authentication
- Database: PostgreSQL with Flask-SQLAlchemy + Flask-Migrate
- Frontend: React 18 + TypeScript + Vite
- UI: Tailwind CSS + shadcn/ui components
- Docker: Single
docker compose upfor the full stack
Project Structure
my-app/
├── docker-compose.yml # Dev: Flask + Vite + Postgres
├── Makefile # Convenience commands
├── backend/
│ ├── app/
│ │ ├── __init__.py # App factory
│ │ ├── config.py # Config from env vars
│ │ ├── extensions.py # SQLAlchemy, Migrate, LoginManager
│ │ ├── models/user.py # User model
│ │ └── routes/auth.py # Auth API (Flask-RESTX)
│ ├── migrations/ # Alembic migrations
│ └── pyproject.toml # Python deps (managed by uv)
└── frontend/
└── src/
├── api/client.ts # Typed API client
├── context/AuthContext # Auth state management
├── components/ui/ # shadcn/ui components
└── pages/ # Login, Register, Dashboard
Make Targets
| Command | Description |
|---|---|
make dev |
Start dev environment |
make stop |
Stop containers |
make logs |
Tail container logs |
make db-migrate |
Generate a new migration |
make db-upgrade |
Apply migrations |
make shell |
Flask shell |
make clean |
Stop containers and remove volumes |
API Docs
Swagger UI is available at http://localhost:5000/api/docs when the backend is running.
License
MIT
Project details
Release history Release notifications | RSS feed
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 create_flask_react-0.1.0.tar.gz.
File metadata
- Download URL: create_flask_react-0.1.0.tar.gz
- Upload date:
- Size: 57.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.29
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
66a890f4adfebb14e706e67452d0055ad2853dc401a69894989228620635654e
|
|
| MD5 |
1cd11a3a762ca50c77d85ad513b8821c
|
|
| BLAKE2b-256 |
b74910d48be3a2ae1393281447e7d67f0c60b5678bb53b2992dcb4e39fb33a98
|
File details
Details for the file create_flask_react-0.1.0-py3-none-any.whl.
File metadata
- Download URL: create_flask_react-0.1.0-py3-none-any.whl
- Upload date:
- Size: 71.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.29
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
925ff7844b2eaa6b8e963da55ac05f8bae16ac6272132a04434a948488abeb25
|
|
| MD5 |
d553c7b4279eee703902bd31f0ac4407
|
|
| BLAKE2b-256 |
f4fc43bcac540d607b7df9080921d227730f570efa2f44f70557b82975cc55fa
|