Skip to content

jsphfrntz/create-flask-react

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 up for 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

About

Flask-React Starter Pack

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors