tl/README.md
Your Name 57ef570539 Add Django backend: users, admin, OTIO + scene persistence
A Project (owner, OTIO file, fps, scene JSON) persists the timeline. Session
API: list projects, GET/PUT scene, serve OTIO. Admin manages users/projects;
seed_demo creates a project from the bundled one_two_three.otio.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-28 23:45:49 -04:00

37 lines
1.5 KiB
Markdown

# scene_analysis
- `tl/` — the lumet frontend (ClojureScript / reagent / re-frame). See `tl/`.
- Django backend (this folder) — users, admin, and persistence of OTIO + the
timeline scene.
## Backend
The backend stores one `Project` per editing session: the uploaded **OTIO**
source file, the playback **fps**, and the live **scene** (the `{:tracks
:groups}` mark-group map the frontend keeps in app-db) as a JSON dump.
### Run
```bash
python -m venv .venv && .venv/bin/pip install -r requirements.txt
.venv/bin/python manage.py migrate
DJANGO_SUPERUSER_PASSWORD=admin .venv/bin/python manage.py createsuperuser --noinput --username admin --email admin@example.com
.venv/bin/python manage.py seed_demo # demo project from tl/.../one_two_three.otio
.venv/bin/python manage.py runserver
```
Admin: <http://127.0.0.1:8000/admin/> (admin / admin). Upload OTIO and inspect
the scene JSON there.
### API (session auth; 401 if not logged in)
| Method | Path | Purpose |
| --- | --- | --- |
| GET | `/api/projects/` | the current user's projects |
| GET | `/api/projects/<id>/scene/` | `{fps, scene}` |
| PUT | `/api/projects/<id>/scene/` | replace `scene` and/or `fps` (JSON body) |
| GET | `/api/projects/<id>/otio/` | serve the uploaded OTIO file |
The frontend currently loads `/one_two_three.otio` and persists annotations to
localStorage; pointing it at `/api/projects/<id>/otio/` and the scene endpoints
is the next wiring step (CORS/credentials needed across the dev ports).