CineWorm is a production-sensible MVP for tracking movies and TV series. It uses Next.js 16, React 19, Tailwind CSS, shadcn-style UI primitives, Supabase Auth/Postgres, TMDB metadata, and an OpenNext Cloudflare deployment target.
- Next.js 16 App Router
- React 19
- TypeScript
- pnpm
- Tailwind CSS v4
- shadcn-style component setup with Radix primitives
- Supabase Auth + Postgres
- Zod validation
- TMDB metadata API
- Cloudflare Workers via
@opennextjs/cloudflare
- Email/password auth with Supabase
- TMDB-backed search and detail pages for movies and TV series
- Personal library with only two states: watchlist and watched
- Fast watchlist / watched actions for movies and series
- Series episode progress with per-episode persistence
- Private note per title
- Dashboard with watchlist and simple stats
- Library filtering by type, status, genre, year, and text search
- Library sorting and grid/list view
- Poster-heavy details page with inline management controls
- Install dependencies:
pnpm install- Copy
.env.exampleto.env.localand fill in:
NEXT_PUBLIC_SUPABASE_URL=
NEXT_PUBLIC_SUPABASE_ANON_KEY=
TMDB_API_READ_TOKEN=
NEXT_PUBLIC_APP_URL=http://localhost:3000-
Create a Supabase project.
-
Run the SQL migration from supabase/migrations/001_init.sql.
-
supabase/seed.sqlis intentionally empty by default because library data is user-owned and keyed by TMDB IDs. -
Start the app:
pnpm dev- Enable Email auth in Supabase Authentication.
- If you require email confirmation, keep the callback URL pointed at
/auth/callback. - Add your local origin and Cloudflare production URL to Supabase redirect URLs.
- The schema relies on RLS. No service role key is required for the MVP.
- Create a TMDB developer account.
- Generate a read access token.
- Set
TMDB_API_READ_TOKENin.env.localand Cloudflare secrets.
This MVP does not need TVMaze because TMDB season endpoints already cover the episode-tracking flow. If you later hit gaps for certain long-running TV metadata cases, TVMaze can be added behind the existing TMDB service layer.
pnpm dev
pnpm lint
pnpm typecheck
pnpm test
pnpm build
pnpm build:worker
pnpm preview
pnpm deploy- Log in to Wrangler:
pnpm wrangler login- Set production secrets:
pnpm wrangler secret put NEXT_PUBLIC_SUPABASE_URL
pnpm wrangler secret put NEXT_PUBLIC_SUPABASE_ANON_KEY
pnpm wrangler secret put TMDB_API_READ_TOKEN
pnpm wrangler secret put NEXT_PUBLIC_APP_URL-
Update
wrangler.jsoncworker name if needed. -
Build and deploy:
pnpm deploy- If you want to preview the production worker locally:
pnpm previewapp/: routes, layouts, API handlersactions/: server actions for auth and library updatescomponents/: reusable product UI and base UI primitiveslib/: auth, Supabase, TMDB, formatting, validators, and data accesssupabase/: SQL migration and seed SQLtypes/: typed app and database shapes
- Library filtering is done in memory after loading the current user’s entries. That keeps the MVP simple, but a larger collection should move filters into SQL or an RPC.
- Search uses TMDB only.
- Library entries store only a small snapshot for filtering and posters. Rich media details come from TMDB at render time.
- User profile editing is intentionally minimal.
- Move library filtering/sorting to SQL for larger collections
- Add magic link auth as an alternative sign-in method
- Add richer dashboard summaries and completion history
- Add watch provider links if they are useful for your audience
- Add optimistic updates and toasts for faster perceived interactions