Personal app for tracking TV shows and episodes, built for Vercel with Neon Postgres.
- Next.js (App Router)
- Better Auth (email/password) with Drizzle ORM on Neon
- The Movie Database (TMDB) for TV metadata and images
Create a .env.local (see envConfig.ts — Next loads it automatically):
| Variable | Purpose |
|---|---|
DATABASE_URL |
Neon Postgres connection string |
TMDB_READ_TOKEN |
TMDB API read access token (getting started) |
BETTER_AUTH_SECRET |
Long random secret for Better Auth |
BETTER_AUTH_URL |
Public origin of the app (e.g. http://localhost:3000 in dev) |
SQL migrations live in drizzle/. Apply them to your Neon branch (e.g. with Drizzle Kit, Neon console, or your usual migration runner).
pnpm db:generate # alias: pnpm drizzle-kit generate — after schema changes
pnpm db:migrate # alias: pnpm drizzle-kit migrate — apply SQL to DATABASE_URL
pnpm db:studio # optional Drizzle Studiopnpm install
pnpm devOpen http://localhost:3000.
If you have a marathon-tv-exports folder (from Marathon TV), you can import shows.csv and history-*.csv into Postgres. Series ID is treated as a TMDB TV id.
pnpm import:marathon -- --user-id <better-auth-user-id>
# optional:
pnpm import:marathon -- --export-dir ./marathon-tv-exports --user-id <better-auth-user-id> --dry-runYou must pass --user-id or set MARATHON_IMPORT_USER_ID. The importer validates Series ID, skips malformed history rows, and writes inside a transaction so partial imports are not committed.
This product uses the TMDB API but is not endorsed or certified by TMDB. See the in-app footer for the official attribution link.
![]() Rollo Kennedy-Dyson 💻 🤔 👀 🎨 🚧 |

