# Prototype UI

Internal FastAPI UI for running and reviewing the screenplay-to-webbook prototype.

## Run

```bash
python3 -m uvicorn prototype_ui.app:app --host 127.0.0.1 --port 8765
```

Open:

```text
http://127.0.0.1:8765
```

## Features

- pick an existing screenplay PDF
- upload a new screenplay PDF into `screenplay/uploads`
- launch the current `prototype_episode_novel.py` pipeline
- auto-discover existing outputs under `prototype/*`
- review generated scene images and save `approved` / `needs_fix` notes in SQLite
- regenerate only the saved `needs_fix` scenes while reusing the existing package/output
- open generated long-page webbook PDFs directly from the UI

## Storage

- UI database: `prototype_ui/prototype_ui.sqlite3`
- generated assets: existing `prototype/*`
