6 Commits
Author SHA1 Message Date
ner 8c8d752962 perf(tmdb): trim responses to fields the UI uses, in proxy and server client
Move the trimmer from the route into a shared lib/tmdbTrim and apply it in
the server-side client too (server hits TMDB directly, bypassing the proxy),
so both paths return identical shapes. Show page HTML drops ~22%
(88.4KB -> 68.8KB); TV details payload -90%.
2026-09-25 16:05:45 +03:00
nerandClaude Opus 5 01792a9669 perf(cache): edge-cache tmdb proxy, call tmdb directly on server, enable ISR
Three exceeded Vercel free tier limits (edge requests, function invocations,
fast origin transfer) all traced back to nothing being cached.

- Http defaults preventCache to false and the tmdb proxy now sends a real
  Cache-Control, so public responses are edge cached instead of missing on
  every request. Session scoped calls keep private, no-store.
- On the server movieAdvisor talks to tmdb directly. It used to fetch its own
  public /api/tmdb url, billing a second edge request, a second function
  invocation and the whole payload as origin transfer per server render.
- Add generateStaticParams to movie, tv and person pages. Without it Next
  treats the segment as fully dynamic and ignores revalidate, so the pages
  re-rendered on every request instead of using ISR.
- Trim credits and person payloads in the proxy: credits 72kb to 13kb,
  aggregate_credits 308kb to 102kb, person 191kb to 124kb. Only fields no
  mapper reads are dropped, mapped output is unchanged.
- Detail pages are cached now, so only a real tmdb 404 becomes notFound and
  other failures bubble up instead of being baked in as a 404 for a day.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-14 10:41:09 +03:00
nerandClaude Opus 5 3dc2ebfe53 feat: replace the starring page with a person page
A credit now opens /person/{id}: portrait, name, department, life dates and
birthplace, the biography, and the full filmography ranked by vote count.
One request carries all of it — combined_credits rides along on the person
call — so the discover based starring query and its with_people filter go.

The biography fills whatever height the portrait leaves and fades where it
is cut, with the whole text in a tooltip on hover; a phone has no height to
respect there, so it simply runs on.

Route level and query level skeletons stand in while it loads, built from
the shadcn primitive.

Development server side fetches go over the loopback rather than SITE_URL,
which is a LAN address meant for other devices: once that address moves the
fetch hangs until undici times out, ten seconds per navigation.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-04 22:09:33 +03:00
ner 62791957bf fix: server's root path 2024-10-29 08:47:08 +02:00
ner 97d55b24a1 refactoring: server actions => tmdb proxy 2024-10-28 20:04:36 +02:00
ner dfdfb79169 fix: SITE_URL 2024-10-28 17:20:05 +02:00