Scaffold a full-stack Flask + React starter project with auth, PostgreSQL, and Docker.
uvx create-flask-react my-app
cd my-app
make devThen open http://localhost:5173 — you'll see a login page, register an account, and land on an authenticated dashboard.
- 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
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
| 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 |
Swagger UI is available at http://localhost:5000/api/docs when the backend is running.
MIT