Skip to content

About

Upcoming TV & streaming premieres month by month (US, UK, AU, Nordics, FR) — static site, nightly TVmaze/TMDB snapshot, optional account sync. Accessible, mobile-first.

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

146 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Upcoming TV Shows

A lightweight web app that lists upcoming TV and streaming premieres, month by month. Browse US broadcast/cable and streaming platforms, flagship channels from the UK, Australia and the Nordics, plus French channels (Canal+, Arte, TF1, M6, France 2/3) — follow only the ones you care about, and filter by genre. A static site with no framework and no npm dependencies; an optional account keeps your settings on every device.

CI version vanilla static data

🔗 Live preview: jmicaux.github.io/upcoming-tv-shows

Upcoming TV Shows — upcoming TV & streaming premieres, month by month

If you enjoy this app, you can support it:

Buy Me A Coffee

The hosted preview covers US, UK, Australian and Nordic channels out of the box — only the French channels need a TMDB key (see below).

Features

  • Month feed — starts on the current month, loads the next one on its own, then one more month per "Load " button (no endless scroll, so the footer stays reachable), with a sticky heading for each month.
  • Broadcast, cable and streaming in one place — ABC, CBS, NBC, FOX, AMC, FX, HBO… plus Netflix, Prime Video, Hulu, Disney+, Max, Apple TV+, Peacock, Paramount+ and more.
  • UK, Australia & Nordic flagships — BBC, ITV, Channel 4, Sky; ABC, Seven, Nine, Network 10, SBS; SVT, NRK, DR, Yle, RÚV — pulled keyless from TVMaze country schedules (flagship channels only).
  • French channels Canal+, Arte, TF1, M6 and France 2/3, sourced from TMDB for reliable FR coverage.
  • Pick-and-choose channels — check the networks/platforms you follow; your selection is saved in the browser and applies across every month. An empty selection shows nothing.
  • Genre filter, title search, a Premieres only toggle (season & series premieres) and a Series premieres only toggle (brand-new shows), all combinable, with a one-click Reset filters.
  • A page per country (/country/united-kingdom, /country/france…) and per channel (/network/netflix…), shareable and indexable.
  • "Watch on " links on every card and in the detail view — jump straight to the platform's search (or JustWatch as a fallback) to start watching. Optional watch settings (⚙) let you remap a channel to a provider you already subscribe to (e.g. a show on Apple TV → "Watch on Canal+").
  • Detail view per show: poster, channel, air date, season/episode, genres, summary.
  • Favorites & Watchlist — star any show; a dedicated Watchlist view lists your followed shows with their next upcoming episode.
  • Optional account — sign in with Google or GitHub to find the same channels, watchlist and settings on every device. See Accounts.
  • One page per channel (/network/netflix, /network/bbc-one…) listing its upcoming shows, and a clean /watchlist address.
  • Mobile-first layout — bottom tab bar, filter chips, show details as a bottom sheet.
  • Accessible — keyboard and screen-reader friendly, WCAG 2.2 AA contrast, reduced motion respected (see QUALITY.md).
  • Export / import preferences (Settings) — save your favorites, followed channels and theme to a JSON file and load them on another machine. Point it at a cloud-synced folder (OneDrive/Dropbox/Drive) for cross-device sync without a backend.
  • Dark / light theme toggle that persists and overrides the OS preference.
  • Local caching so revisited months load instantly, with request throttling to stay within the TVMaze rate limit.

Install & usage

The app is fully static. TVMaze sends permissive CORS headers, so in most browsers you can just open index.html directly. If your browser blocks fetch on file://, serve the folder:

cd tv-us-upcoming
python -m http.server 8000
# then open http://localhost:8000

Any static server works (npx serve, VS Code Live Server, etc.).

Hosting on your own server

node tools/build-dist.js assembles dist/: only the files the site needs (pages, scripts, styles, generated channel and country pages, sitemap). Add --data data/schedule to bake the upcoming shows into the pages and ship the schedule snapshot (get one with node tools/fetch-schedule.js data/schedule 3, or reuse the published one with node tools/pull-snapshot.js https://jmicaux.github.io/upcoming-tv-shows/ data/schedule). The GitHub Pages workflow deploys the same dist/. Upload its content; the server must:

  • serve /network/netflix from network/netflix.html (extensionless URLs, as GitHub Pages does), same for /country/… and /watchlist;
  • answer unknown addresses with 404.html.

The pages assume the site lives at /upcoming-tv-shows/ (the <base> of 404.html, the canonical URLs and the sitemap): change SITE_URL in networks.js and the canonical link in index.html to host it elsewhere.

Enabling the French channels (optional)

The French channels (Canal+, Arte, TF1, M6, France 2/3) need a free TMDB API key:

cp config.example.js config.js   # then paste your key into config.js

config.js is git-ignored, so your key stays out of the repo. Without it, the app runs fine and simply omits the French channels.

Alternatively, paste the key directly in the app via ⚙ Settings → French channels — it's stored only in your browser's localStorage (never in the repo), which is how the hosted preview can enable Canal+ / Arte without shipping a key.

Accounts (optional)

Click 👤 in the header (on mobile: More → Account) and Continue with Google or Continue with GitHub. From then on your followed channels, watchlist, watch redirects and theme are stored with your account and restored on any device you sign in from. Details:

  • Everything keeps working without an account; signing in is purely for sync.
  • Preferences are merged item by item: each favorite, channel and setting keeps its most recent change, whichever device made it, so nothing is lost or resurrected. Changes are saved about a second after you make them (and when you leave the page).
  • Your TMDB key is never synced — it stays on the device where you typed it.
  • Sign out keeps your preferences on the device. Delete account removes the account and its stored preferences, with an option to clear the device too.
  • Email sign-in (magic link + 6-digit code) exists but is off until a custom email sender is configured (EMAIL_LOGIN in supabase-config.js).
  • What is stored and why: privacy.html.

Project structure

tv-us-upcoming/
├── index.html          # markup: header, filters, grid, detail modal
├── styles.css          # theming (dark/light via data-theme), responsive grid
├── app.js              # data fetching, caching, filtering, rendering, routing
├── networks.js         # channel lists + URL slugs (shared with tools/make-pages.js)
├── feed-core.js        # TVmaze/TMDB fetching + snapshot plan (shared with the nightly script)
├── auth.js             # optional account: Supabase sign-in + preference sync
├── sync-core.js        # merge rules + sync engine (pure, unit-tested)
├── supabase-config.js  # public Supabase URL + anon key (safe to commit)
├── supabase/schema.sql # table, RLS policies, delete_my_account()
├── privacy.html        # what an account stores and why
├── about.html          # what the site is, data sources, terms, contact
├── config.example.js   # template for your TMDB key
├── config.js           # your real key (git-ignored, create from the example)
├── tests/              # node --test unit tests (run in CI)
├── tests/e2e/          # Playwright: the app in a real browser, fixed date, fixture data
├── playwright.config.js
├── package.json        # dev tooling only (Playwright); nothing ships to the browser
├── tools/serve.js      # local server that behaves like GitHub Pages
├── tools/build-dist.js # dist/: only what a server needs
├── tools/make-pages.js # fills index.html's generated regions and builds the pages below
├── tools/fetch-schedule.js # nightly schedule snapshot → data/schedule/
├── tools/pull-snapshot.js  # code deploys: reuse the published snapshot
└── README.md

Generated, not committed (built by the deploy workflow, or locally with the tools):
├── watchlist.html      # <site>/watchlist
├── network/*.html      # <site>/network/<slug>, one per major channel
├── country/*.html      # <site>/country/<slug>, one per country
├── 404.html            # any other address (rare channels)
├── sitemap.xml         # feed, About and channel pages
└── data/schedule/      # nightly snapshot: one JSON file per channel and month

After editing index.html or networks.js, run node tools/make-pages.js: it refreshes the generated regions of index.html (the tests fail if they are stale) and writes the pages above, which you also need to browse /watchlist or /network/… locally.

Nightly schedule snapshot

.github/workflows/pages.yml deploys the site every night and on every push. The nightly run calls node tools/fetch-schedule.js (one pass over TVmaze, about 8 minutes for 3 months); a push only reuses the snapshot already published on the site with node tools/pull-snapshot.js (a few seconds), unless it is missing or older than 36 h. Then node tools/make-pages.js --data data/schedule, which bakes each channel's upcoming shows into its page as plain HTML. The app reads data/schedule/ first and only calls TVmaze for what it does not cover. Setup: Settings → Pages → Source: GitHub Actions; add a TMDB_KEY repository secret to include the French channels. Without a snapshot (local development, or a failed night) the app simply fetches everything live, as before.

.github/workflows/watchdog.yml keeps an eye on it: after each run of the nightly update, the Supabase keep-alive and CI, and once a day, it opens an issue labelled watchdog (GitHub then notifies the owner) when a run failed or raised warnings, a scheduled workflow was disabled, or the published snapshot is older than 36 h. It comments on new problems and closes the issue once everything is back to normal.

No runtime npm dependency: the app runs in the browser as is, and the deploy only runs the small Node scripts above. package.json holds development tooling only (Playwright). The only runtime dependency is a pinned supabase-js loaded from jsDelivr with Subresource Integrity.

Tests

npm install                      # once: Playwright (dev only)
npx playwright install chromium  # once: the test browser
npm run test:unit                # pure modules (node --test)
npm run test:e2e                 # the app in a real browser, desktop + phone
npm run test:visual              # screenshot comparison, before/after a refactor

The end-to-end tests freeze the date, replace the schedule snapshot with a small fixture and answer every external request locally (tests/e2e/fixtures.js): they never touch TVmaze or TMDB, so they are deterministic and run offline. Any uncaught page error fails a test. CI runs the unit and end-to-end tests on every push. test:visual is a local refactoring aid: its first run records reference screenshots (light and dark, desktop and phone) in a git-ignored folder, and later runs fail on any visible change.

A test marked test.fail() documents a known bug: it passes while the bug exists and fails once it is fixed, as a reminder to remove the mark.

Data sources

US, UK, Australia & Nordics — the free TVMaze API (no key required):

  • Broadcast / cable — GET /schedule?country=US&date=YYYY-MM-DD (items with a network).
  • Streaming — GET /schedule/web?date=YYYY-MM-DD (queried worldwide, because platforms like Netflix and Prime Video are global in TVMaze), filtered to a US-available allow-list.
  • UK / Australia / Nordics — GET /schedule?country=CC&date=YYYY-MM-DD per followed country, filtered to a flagship-channel allow-list (FLAGSHIP_RE). A country is only fetched when you follow at least one of its channels.

A month is built by aggregating the needed calls per day, then grouping client-side.

French channels (Canal+, Arte) — TMDB discover/tv, whose FR coverage is far better than TVMaze's. One pass per month resolves each show's episodes that air in the window. Requires a free TMDB API key in TMDB_KEY (see below).

Customization

Everything configurable lives at the top of app.js:

Constant Purpose
SEED_NETWORKS Channels shown in the picker before any month is browsed.
STREAMING_ALLOWLIST Regex of streaming platforms kept from the worldwide web schedule.
COUNTRY_NETWORKS / FLAGSHIP_RE Per-country flagship channels (UK/AU/Nordics) and the regex that keeps only them from each country schedule.
TMDB_KEY Your free TMDB API key (v3), required for the Canal+ / Arte data.
TMDB_NETWORKS Pipe-separated TMDB network IDs to pull (Canal+ = 285, ARTE = 1628).
FUTURE_TTL_MS Cache lifetime for today/future days (past days are cached permanently).
REQUEST_GAP_MS Delay between live TVMaze calls (throttle).

Limitations

  • The next 3 months come from the nightly snapshot and load instantly. Beyond that (or for a rare channel), a cold month makes ~2 TVMaze calls per day (~60/month → ~24s); cached months are instant.
  • TVMaze streaming coverage is less complete than its broadcast/cable data.
  • Some daily news/talk shows use odd episode numbering; they're naturally excluded while "Premieres only" is on.
  • The TMDB key ships in client-side JS (no server), so it is publicly visible. Fine for a personal deployment; a public one should proxy TMDB behind a small backend to hide the key.
  • Export/import uses the File System Access API on Chrome/Edge (over https/localhost) and remembers the chosen file for one-click re-sync; other browsers fall back to a plain download / file upload.

Versioning

The app version is defined once as APP_VERSION at the top of app.js and shown next to the title (and logged to the console). Bump it on each release following semver — patch for fixes, minor for features, major for breaking changes.

On every release, update the version in three places so browsers pick up fresh assets:

  1. APP_VERSION in app.js
  2. the ?v= cache-busting query on the stylesheet and every script in index.html (then run node tools/make-pages.js)
  3. the version badge above

The ?v= query forces browsers to re-download the CSS/JS after a deploy instead of serving a stale cached copy.

Then add a CHANGELOG.md entry and publish a GitHub release for the new tag, e.g. gh release create v1.29.2 --target main --title "Upcoming TV Shows 1.29.2" --notes-file notes.md.

Quality

This project follows a documented quality review process covering accessibility, security, performance and code quality.

See QUALITY.md.

License

Licensed under the PolyForm Noncommercial License 1.0.0: you are free to fork, modify and share this project for noncommercial purposes, as long as you keep the attribution (Required Notice: Copyright jmicaux). Commercial use is not permitted.

Credits

Data by TVMaze and TMDB. This product uses the TMDB API but is not endorsed or certified by TMDB. Not affiliated with any network or platform.

Built with the help of Claude.

About

Upcoming TV & streaming premieres month by month (US, UK, AU, Nordics, FR) — static site, nightly TVmaze/TMDB snapshot, optional account sync. Accessible, mobile-first.

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages