Metadata-Version: 2.4
Name: movie-narrator-web
Version: 1.0.0
Summary: Web UI (FastAPI + React) for movie-narrator — install separately from the core engine.
Author-email: zcbacxc <zcbacxc@users.noreply.github.com>
License: AGPL-3.0
Project-URL: Homepage, https://github.com/zcbacxc/movie-narrator-web
Project-URL: Repository, https://github.com/zcbacxc/movie-narrator-web
Project-URL: Issues, https://github.com/zcbacxc/movie-narrator-web/issues
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: movie-narrator>=0.5.0
Requires-Dist: fastapi>=0.104.0
Requires-Dist: uvicorn[standard]>=0.24.0
Requires-Dist: python-multipart>=0.0.6
Provides-Extra: dev
Requires-Dist: pytest>=8.0; extra == "dev"
Dynamic: license-file

# movie-narrator-web

Web UI (FastAPI + React) for [movie-narrator](https://github.com/zcbacxc/movie-narrator).

> **Versioning**: This package uses an **independent version line** (starting at v1.0.0),
> separate from the core engine (`movie-narrator`). Compatibility is guaranteed by the
> `CONTRACT_VERSION` check at import time — you do not need to match version numbers
> between the two packages.

This is a separate package from the core engine. Install it only if you need
the web interface:

```bash
pip install movie-narrator-web
```

This automatically pulls in `movie-narrator` (core engine) and all web
dependencies (FastAPI, uvicorn).

## Prerequisites

- Python >= 3.10
- ffmpeg (required by the core engine for audio/video processing)

## Usage

```bash
mn-web --host 127.0.0.1 --port 8760
```

For development with auto-reload:

```bash
mn-web --reload
```

### CLI Options

| Option | Default | Description |
|--------|---------|-------------|
| `--host` | `127.0.0.1` | Bind address |
| `--port` | `8760` | Port to listen on |
| `--reload` | off | Enable auto-reload (development mode) |

Or programmatically:

```python
from movie_narrator_web import launch_web_api

launch_web_api(host="127.0.0.1", port=8760)
```

## Development

The frontend source is in `webui/` (React + Vite + TypeScript + shadcn/ui).
Build the SPA before packaging:

```bash
cd webui
npm ci
npm run build
```

The build output lands in `src/movie_narrator_web/static/` and is served
by FastAPI in production mode.

## Architecture

This package depends on `movie-narrator` exclusively through the public
contract layer (`movie_narrator.contract`). No internal module imports.
