Metadata-Version: 2.4
Name: create-flask-react
Version: 0.1.0
Summary: Scaffold a full-stack Flask + React starter project with auth, PostgreSQL, and Docker
License-Expression: MIT
Project-URL: Homepage, https://github.com/jsphfrntz/create-flask-react
Project-URL: Repository, https://github.com/jsphfrntz/create-flask-react
Project-URL: Issues, https://github.com/jsphfrntz/create-flask-react/issues
Keywords: flask,react,starter,scaffold,docker,fullstack
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Software Development :: Code Generators
Classifier: Framework :: Flask
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# create-flask-react

Scaffold a full-stack Flask + React starter project with auth, PostgreSQL, and Docker.

## Quick Start

```bash
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
