Back to case studies

CineMatch AI

Local-first movie recommendation chatbot with cloud fallback and five safety checks (outcomes not measured yet)

For people who want conversational movie recommendations without sending their chats to a third-party AI by default.

CineMatch AI site screenshot

At a glance

Role
Creator and technical lead (solo)
Team
Solo
Users
No user numbers published
Status
Live project showcase at cinematch.online; repo private
Stack
Flask, PostgreSQL + pgvector, Redis, Ollama, LangChain, Tailwind, Gunicorn, Nginx

Problem and stakes

Movie recommendation chat usually means sending every conversation to a hosted LLM, paying per token, and having little control over the model. Cinematch keeps the conversation local by default.

Constraints

Privacy-first: conversations stay on the server by default, with no PII stored server-side for age verification. Predictable cost, with no per-token fees on the default path.

Options considered

Cloud-only LLM APIs vs. a locally hosted model. The build settles on local-first with a priority-ordered fallback chain rather than a single provider.

Decision

Route every request through a LangChain provider chain: local Ollama first, then Claude, OpenAI, and Gemini, with a template fallback so the bot always answers. Run every response through a multi-layer safety pipeline before it reaches the user.

Program plan

Four build phases (from the live showcase): (1) PostgreSQL/pgvector data layer and Flask app with SQLAlchemy and Alembic, (2) the AI provider chain, (3) the recommendation engine with Couples Mode, (4) safety and production hardening.

Technical system

Flask behind Gunicorn and Nginx. PostgreSQL with B-tree and full-text indexes and pgvector for embedding similarity. Redis for rate limiting.

Chat streams over SSE, keeps per-session context, and lets users adjust temperature and top-k to see how sampling changes the answers.

Couples Mode scores titles so that neither viewer gets stuck with something they dislike.

The data pipeline scrapes TMDB, IMDb, Rotten Tomatoes, Metacritic, and Wikipedia with validation and deduplication (Playwright, Scrapy, Celery).

Safety: five independent checks (age-appropriate content, violence, profanity, domain restriction, content filter) with a safe fallback. Also an 18+ date-of-birth gate, CSRF protection, Google OAuth, and Prometheus/Grafana monitoring.

Outcome

Outcomes not measured yet.

Reflection

Planned next steps from the architecture doc: user-selectable models, voice input/output, collaborative filtering on anonymous usage, and a Redis cache for frequent queries.

Proof links