Skip to content

About

A Next.js app for using AI to understand box office performances.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

Cinelytics

Cinelytics is a movie intelligence app that combines TMDB + Box Office Mojo data with an AI analyst named Kowalski. Instead of only showing raw movie stats, it helps users quickly understand how a title performed and why.

image image image

(Screenshots from build based on main-ollama branch)

What the App Does

  • Search movies by title.
  • View a dedicated title page with key metrics (rating, votes, release date, budget, and revenue).
  • Get a concise AI analysis generated by Kowalski for the selected movie.

User Flow

  1. Open the home page and search for a movie.
  2. Browse results in the search view.
  3. Open a movie details page at /title/[titleId].
  4. See TMDB metadata and Kowalski's analysis in one place.

Tech Stack

  • Next.js 16 (App Router)
  • React 19 + TypeScript
  • Tailwind CSS v4
  • Zod for API response validation
  • Ollama for local LLM inference (Qwen models)

Architecture Overview

  • app/
    • page.tsx: Landing page with search.
    • search/page.tsx: Search result listing.
    • title/[titleId]/page.tsx: Movie detail + analysis view.
  • components/
    • ui/: Shared primitives (button, form, label).
    • layout/: Page chrome used across routes (background, back button).
    • search/: Discovery UI (search box, result cards, poster mosaic).
    • title/: Movie detail UI (stats, overview, analysis).
  • lib/tmdb/
    • api.ts: TMDB requests for search, single-movie fetch, and reviews.
    • schemas.ts / types.ts: Zod schemas and inferred TMDB types.
  • lib/analyzer/
    • api.ts: Orchestrates the full analysis pipeline (fetches reviews, runs LLM chains).
    • chains.ts: LLM chains — review sentiment summarization and structured box office analysis.
    • utils.ts: Helpers for review stringification, performance classification, and the system prompt.
    • schemas.ts / types.ts: Zod schemas and inferred analyzer types.

Environment Variables

Create a .env.local file in the project root:

API_URL=https://api.themoviedb.org/3
API_KEY=your_tmdb_api_key_or_bearer_token

Notes:

  • API_URL should point to the TMDB base URL.
  • API_KEY is used as the Bearer token when calling TMDB endpoints.

Analysis is performed locally via Ollama. Ensure Ollama is running and the qwen3.5:0.8b and qwen3.5:2b models are pulled before starting the app.

Getting Started

npm install
npm run dev

Then open http://localhost:3000.

Available Scripts

  • npm run dev: Start local development server.
  • npm run build: Build for production.
  • npm run start: Run the production build.
  • npm run lint: Run ESLint.

About

A Next.js app for using AI to understand box office performances.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages