Skip to content

rollokd/tv4me

Repository files navigation

TV4Me

Personal app for tracking TV shows and episodes, built for Vercel with Neon Postgres.

Tech stack

  • Next.js (App Router)
  • Better Auth (email/password) with Drizzle ORM on Neon
  • The Movie Database (TMDB) for TV metadata and images

Environment variables

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)

Database migrations

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 Studio

Development

pnpm install
pnpm dev

Open http://localhost:3000.

Marathon CSV import

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-run

You 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.

Attribution

This product uses the TMDB API but is not endorsed or certified by TMDB. See the in-app footer for the official attribution link.

Screenshots

TV4Me screenshot

Contributors

rollo-img
Rollo Kennedy-Dyson
💻 🤔 👀 🎨 🚧

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors