Add plays from photos (OpenRouter or Claude), library, editor, compose; full-page PDF #2
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/library-uploads"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
A reader for play scripts, with a library that people can add their own plays to from photos of the pages.
What's in it
Reading. A library of plays, then for each play: choice of font, size and colours; pick your character to highlight your lines and jump between them; running text or the original typescript lines; reading mode; PDF export of your own copy.
Adding plays (needs the shared
UPLOAD_PASSWORD):OPENROUTER_API_KEYis set (defaultgoogle/gemini-3.1-flash-lite, about $0.0015 a page, any image model viaOPENROUTER_MODEL). Otherwise it uses the Anthropic API withANTHROPIC_API_KEY(claude-haiku-5-5). The pages are then stitched together:[?]readings, names that appear only once, failed pages. Then publish.PDF export fix. Text now flows from one original page to the next and prints at the on-screen size (19 px ≈ 14 pt). A4 sheets are full instead of half empty, and there are page numbers in the footer. The 1931 play is now 19 full pages, where before it was 24 half-empty pages at ~10 pt.
Deploy.
docker-compose.yml+.env.example. A named volumeplaysholds the data and is seeded with the 1931 play on first start. Ports are on loopback by default.Safety / cost
DAILY_PAGE_LIMIT(default 300 pages a day across all users) caps API spend if the password leaks.Tested
npm test: 20 tests covering the parser, transcription assembly, both providers (OpenRouter through a fakefetch, including retries and error messages), and the API end to end with a stub provider.ANTHROPIC_BASE_URL:/?postava=link;podman-compose up -d --buildon the box: healthcheck OK and the volume is seeded.Not tested:
🤖 Generated with Claude Code
https://claude.ai/code/session_01HA82gVRDXpoukzgMFumoJt
Add plays from photos (Claude), library, editor, compose; full-page PDFto Add plays from photos (OpenRouter or Claude), library, editor, compose; full-page PDFA Claude subscription can't be used by the app, so let it use any cheap vision model on OpenRouter instead (default google/gemini-3.1-flash-lite, OPENROUTER_MODEL to change). The Anthropic API stays available as the second choice. Both providers share the prompt and live behind one { name, model, transcribe } interface in server/providers.mjs; OpenRouter retries 408/429/5xx and network errors and turns 401/402/404 into messages the editor can show. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HA82gVRDXpoukzgMFumoJt