Inspiration

Film and TV productions still break down screenplays largely by hand — reading scene-by-scene to extract locations, cast, props, and safety hazards before a schedule or budget can even be built. We wanted to see how far an agentic Gemini pipeline could take that first, most time-consuming step.

What it does

ProductionMate AI lets a production team upload a screenplay (PDF, DOCX, or pasted text) and automatically extracts scenes, scene headings, INT/EXT and time-of-day, cast and characters, props, costumes, vehicles, special equipment, VFX, stunts, and safety requirements. From that structured breakdown, it generates a shooting schedule and a Gemini-powered risk and safety assessment — reasoning over the actual script content rather than a static checklist — and feeds a production task board for follow-up work, all tracked per-production with budgets in GBP/USD/EUR.

How we built it

The frontend is React with a dark, cinematic UI; the backend is an Express API with a PostgreSQL database via Drizzle ORM, with generated Zod schemas and React API clients from an OpenAPI spec.

Screenplay extraction and risk assessment are both powered by Gemini via Vertex AI (Google Cloud), called directly through the official @google/genai SDK — the service requests structured JSON output which is validated server-side, with a local rule-based fallback if Gemini is unavailable. Uploaded screenplay files (PDF/DOCX) are parsed client-side (PDF.js / Mammoth), and the original files are persisted using Replit Object Storage via @replit/connectors-sdk, so a production's source screenplay is never lost and can be retrieved later.

The extraction endpoint is hardened with IP-based rate limiting, input validation, and sanitized error responses that never leak stack traces or credentials.

Challenges we ran into

Getting real file uploads (not just pasted text) working end-to-end — parsing PDFs/DOCX client-side, handling corrupted or scanned/image-only files with clear errors instead of silently failing, and persisting the originals reliably to Object Storage. We also discovered our risk assessment was still a placeholder rule-based function (not actually calling Gemini) late in development — tracing that down to a response-schema mismatch (Gemini returning a plain array where our validator expected a wrapped object) and fixing it end-to-end, including on the live deployment, was our biggest last-mile challenge.

Accomplishments that we're proud of

A real, working pipeline from raw screenplay file to structured production plan — not a mockup. Both extraction and risk assessment are genuinely tested against real files and live Gemini calls, with security hardening (rate limiting, validation) verified end-to-end on the actual published deployment.

What's next for ProductionMate AI

Authentication and per-production access control for real multi-user teams, background job processing for longer screenplays, and extraction history/version comparison.

Built With

Share this project:

Updates

Submission history