2026-06-28 23:45:49 -04:00
|
|
|
|
# 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
|
feat: timeline links, network error handling, Tailscale access, mobile fixes
Backend / dev:
- Bind dev server to 0.0.0.0 and allow Tailscale MagicDNS + tailnet-IP origins
in ALLOWED_HOSTS / CORS / CSRF so the app is reachable over Tailscale
- Unified, idempotent dev launcher (Django + media + shadow watch), hot reload,
no manual compiles
Frontend:
- Migrate fetches to re-frame :http-xhrio with failure handling; surface
network / load / save errors where the user expects them
- Extract markdown + link formatting into tl.md: parse/serialize round-trip
(recursive chip serialization fix), block markdown (headings/lists/paragraphs)
- Timeline-opening links: navigate the stack to any reachable timeline;
autocomplete lists all timelines (root included, orphans dropped) with a live
preview that pushes the stack and reverts on commit/cancel
- Annotation pane shows the current context's description with edit-in-context
(drops into the parent timeline for marks, pops back when done) + root content
- Fixes: deep-link playhead seek, replay-from-end, mobile input zoom, notch
safe-area insets, autofocus the content field, freeze form to snapshot context
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-29 19:24:40 -04:00
|
|
|
|
.venv/bin/python manage.py runserver 0.0.0.0:9001 # 0.0.0.0 so it's reachable over Tailscale/LAN
|
2026-06-28 23:45:49 -04:00
|
|
|
|
```
|
|
|
|
|
|
|
2026-06-29 02:01:06 -04:00
|
|
|
|
Admin: <http://127.0.0.1:9001/admin/> (admin / admin). Upload OTIO and inspect
|
2026-06-28 23:45:49 -04:00
|
|
|
|
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 |
|
2026-06-29 00:12:13 -04:00
|
|
|
|
| GET | `/api/projects/<id>/revisions/` | save history (who / when / summary) |
|
|
|
|
|
|
|
|
|
|
|
|
### Attribution
|
|
|
|
|
|
|
|
|
|
|
|
Annotations are the authored unit, so that's what's attributed — and the server
|
|
|
|
|
|
is the authority (client-sent stamps are ignored, so authorship can't be
|
|
|
|
|
|
forged). On each scene `PUT` the server diffs incoming annotation groups against
|
|
|
|
|
|
the stored ones and stamps `createdBy`/`editedBy` (+ timestamps) from
|
|
|
|
|
|
`request.user`; it also writes a `Revision` (user, time, `+N ~N −N` summary,
|
|
|
|
|
|
snapshot of the annotation layer). A project is editable by its `owner` and any
|
|
|
|
|
|
`collaborators` (managed in the admin), so different users get distinct stamps.
|
2026-06-28 23:45:49 -04:00
|
|
|
|
|
|
|
|
|
|
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).
|