Inspiration

Independent film has a funding gap: directors have ideas but no easy way to turn them into a fundable plan, and producers have capital but no easy way to discover promising projects before they're already fully packaged. We wanted to see what happens when an AI agent pipeline sits in the middle — reading a raw idea or screenplay, deciding what analysis it actually needs, and producing a real production plan a producer could act on immediately.

What it does

CineFlow AI is a two-sided platform. Directors register, submit a project (an idea or a full screenplay), and watch a live agent pipeline run in real time: a Gemini Coordinator reads the input and decides which specialist agents to invoke — Script, Budget, Producer-Match, Scheduling, Risk, and Analytics agents — each streaming its status and output back to the browser over Server-Sent Events as it works. Producers register separately, browse a real marketplace of published projects, and can invest directly, updating a real funding total instantly. Every account starts at zero — there's no seeded demo data on the user side, and nothing is visible to anyone who isn't logged in.

Underneath, every agent run, budget breakdown, producer-match score, and risk assessment is written to a real ClickHouse Cloud database, and the platform's Analytics page reads that data back live — real charts, not mock numbers. We also built a natural-language ClickHouse query feature: ask a plain-English question about the data, and Gemini itself writes and executes the SQL through the official mcp-clickhouse MCP server, live, and returns a grounded answer.

How we built it

Backend: FastAPI (Python), with a real relational layer (SQLAlchemy/SQLite, upgradeable to Postgres via one env var) for accounts, projects, and connections, and JWT-based auth with bcrypt password hashing. AI pipeline: A Gemini Coordinator agent dynamically plans which specialist agents to run per project, rather than following a fixed pipeline. Each specialist agent (Script, Budget, Producer-Match, Scheduling, Risk, Analytics) streams progress back to the client via SSE. ClickHouse: Every agent writes structured output to ClickHouse Cloud (projects, agent_runs, budget_breakdowns, producer_matches, production_schedule, risks, investment_events, workflow_metrics). On top of that, we built a second, distinct integration path: a Google ADK–powered agent that connects to ClickHouse through the official mcp-clickhouse MCP server, letting Gemini query the database live in response to natural-language questions. Frontend: A single-page dashboard app (vanilla JS + Chart.js) covering director and producer dashboards, a producer marketplace, a directors' workplace, real-time investment/funding UI, and an analytics page driven entirely by live ClickHouse queries. Deployment: Backend on Render, frontend on Vercel, database on ClickHouse Cloud — three independent, real, publicly reachable services.

Challenges we ran into

Getting google-adk's dependency tree (which pulls in a large chunk of the Google Cloud SDK ecosystem) to resolve cleanly alongside google-genai, clickhouse-connect, and FastAPI took several rounds of loosening version pins and letting pip's resolver do its job instead of guessing exact versions ourselves. Render's free tier has no persistent disk, so our SQLite-backed accounts and producer directory were wiped on every redeploy — we fixed this by making the producer directory auto-reseed (idempotently) on every app startup. CORS between the Vercel-hosted frontend and Render-hosted backend needed to be configured explicitly rather than left open. Google's Gemini free-tier quota (20 requests/day per model) meant we had to budget testing carefully and treat quota as a real constraint, not just a config detail.

Built With

Share this project:

Updates

Submission history