<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: L. Remond</title>
    <description>The latest articles on DEV Community by L. Remond (@l_remond_2b924d9740ba66b).</description>
    <link>https://dev.to/l_remond_2b924d9740ba66b</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4175054%2F3a41490a-0a95-4ce8-80e0-61652417fe97.png</url>
      <title>DEV Community: L. Remond</title>
      <link>https://dev.to/l_remond_2b924d9740ba66b</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/l_remond_2b924d9740ba66b"/>
    <language>en</language>
    <item>
      <title>4 lessons from building a 350-channel TV guide with Next.js 15 (no database)</title>
      <dc:creator>L. Remond</dc:creator>
      <pubDate>Sat, 10 Oct 2026 10:40:09 +0000</pubDate>
      <link>https://dev.to/l_remond_2b924d9740ba66b/4-lessons-from-building-a-350-channel-tv-guide-with-nextjs-15-no-database-424m</link>
      <guid>https://dev.to/l_remond_2b924d9740ba66b/4-lessons-from-building-a-350-channel-tv-guide-with-nextjs-15-no-database-424m</guid>
      <description>&lt;p&gt;I run &lt;a href="https://www.tele.guide" rel="noopener noreferrer"&gt;télé.guide&lt;/a&gt;, a free French TV guide. It's a solo project with no database, built with Next.js 15 (App Router) and React 19. It covers 350+ channels: the national free-to-air ones, cable and satellite, and small local stations most guides ignore. It has 8 days of listings, a page for every film that airs, actor pages, and a short "what to watch tonight" article every day.&lt;/p&gt;

&lt;p&gt;The site is in French, but the problems aren't. Here are four things I learned building it, including one I haven't fixed yet.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Pages never call an external API
&lt;/h2&gt;

&lt;p&gt;Listings come from XMLTV feeds, film data from TMDb, and the daily article from OpenAI. None of them is called while a page renders.&lt;/p&gt;

&lt;p&gt;Batch scripts run once a day and write JSON files. Pages read those files and are served with ISR.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;XMLTV / TMDb / OpenAI  ──▶  batch scripts (cron)  ──▶  JSON on disk  ──▶  Next.js pages (ISR)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;One command runs the whole daily pipeline:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm run tv:update
&lt;span class="c"&gt;# epg:precompute   8 days of listings, each programme matched against TMDb&lt;/span&gt;
&lt;span class="c"&gt;# guide:editorial  short AI-written blurbs for the guide&lt;/span&gt;
&lt;span class="c"&gt;# ce-soir          the daily "tonight on TV" article&lt;/span&gt;
&lt;span class="c"&gt;# films:update     details for every film page&lt;/span&gt;
&lt;span class="c"&gt;# people:update    actor pages and their French bios&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A page then does little more than &lt;code&gt;readFileSync&lt;/code&gt; plus an in-memory memo, with &lt;code&gt;revalidate&lt;/code&gt; between 5 minutes (tonight's grid, film pages) and 1 hour (actor pages).&lt;/p&gt;

&lt;p&gt;What this buys me:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;API costs don't grow with traffic.&lt;/strong&gt; A crawler fetching 2,000 pages costs zero TMDb calls and zero OpenAI tokens.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;An upstream outage breaks a script, not the site.&lt;/strong&gt; Pages keep serving the last files written.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Rendering is boring.&lt;/strong&gt; Reading a local JSON file is the whole data layer.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The rule that took me longest to get right was where each file belongs. I ended up with one question: &lt;strong&gt;if I delete this file, will a script rebuild it exactly the same?&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Yes: it goes in &lt;code&gt;cache/&lt;/code&gt;. That covers TMDb responses and the parsed listings (about 100 MB of JSON per day).&lt;/li&gt;
&lt;li&gt;No: it goes in &lt;code&gt;data/&lt;/code&gt;, which is backed up and never overwritten.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Two things that look like cache are actually data:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;AI-written text.&lt;/strong&gt; It cost money and Google has already indexed it. Regenerating it gives a different text, so once published it's content, not cache.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;URL slugs.&lt;/strong&gt; More on that in section 3.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  2. Next.js 15.2+ may put your &lt;code&gt;&amp;lt;title&amp;gt;&lt;/code&gt; in &lt;code&gt;&amp;lt;body&amp;gt;&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;Next.js 15.2 introduced &lt;strong&gt;streaming metadata&lt;/strong&gt;. The page starts streaming before &lt;code&gt;generateMetadata&lt;/code&gt; resolves. When it resolves, the tags are appended to &lt;code&gt;&amp;lt;body&amp;gt;&lt;/code&gt;. User agents on a built-in list of "HTML-limited bots" (Bingbot, Twitterbot, Slackbot, facebookexternalhit…) still get blocking metadata in &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Googlebot isn't on that list, on purpose. The Next.js docs say they verified that bots which run JavaScript, like Googlebot, read the streamed tags correctly. So this is not a Google ranking bug.&lt;/p&gt;

&lt;p&gt;I still turned it off, with one line:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// next.config.mjs&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;nextConfig&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// Next.js 15.2+ streams metadata into &amp;lt;body&amp;gt;; force &amp;lt;head&amp;gt; for every user agent&lt;/span&gt;
  &lt;span class="na"&gt;htmlLimitedBots&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sr"&gt;/.*/&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Why:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Plenty of HTML readers don't run JavaScript and aren't on the list.&lt;/strong&gt; SEO crawlers without JS rendering, link-preview bots from smaller platforms, my own &lt;code&gt;curl&lt;/code&gt; checks: all of them expect the title, description, canonical and Open Graph tags in &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;For a site that lives on search traffic, I want the raw HTML to be the source of truth.&lt;/strong&gt; If a page has a metadata problem, I want to see it in &lt;code&gt;view-source:&lt;/code&gt;, not only after a JS render.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;It costs me little.&lt;/strong&gt; My &lt;code&gt;generateMetadata&lt;/code&gt; reads local JSON (see section 1), so blocking on it barely delays the first byte. If yours waits on a slow API, the trade-off is different: hiding that wait is exactly what streaming is for.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To check your own pages, fetch one with a regular browser user agent and see whether &lt;code&gt;&amp;lt;title&amp;gt;&lt;/code&gt; comes before &lt;code&gt;&amp;lt;/head&amp;gt;&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-s&lt;/span&gt; &lt;span class="nt"&gt;-A&lt;/span&gt; &lt;span class="s2"&gt;"Mozilla/5.0"&lt;/span&gt; https://your-site.example/some-page | &lt;span class="nb"&gt;tr&lt;/span&gt; &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s1"&gt;'\n'&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  | &lt;span class="nb"&gt;awk&lt;/span&gt; &lt;span class="s1"&gt;'{ t=index($0,"&amp;lt;title"); h=index($0,"&amp;lt;/head&amp;gt;"); print (t&amp;gt;0 &amp;amp;&amp;amp; t&amp;lt;h) ? "title is in &amp;lt;head&amp;gt;" : "title is NOT in &amp;lt;head&amp;gt;" }'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  3. A URL is forever
&lt;/h2&gt;

&lt;p&gt;On a content site, every public URL is a promise. I treat slugs as data, not as something computed on the fly:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Every film and every person is keyed by its TMDb ID.&lt;/strong&gt; The slug (&lt;code&gt;/films/dracula-1992&lt;/code&gt;, &lt;code&gt;/acteurs/tom-hanks&lt;/code&gt;) is assigned once, stored in a registry file and never recomputed. If a French title changes, the page keeps its URL.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;When a slug really must change&lt;/strong&gt;, the old one goes into a &lt;code&gt;formerSlugs&lt;/code&gt; list and answers with a 308 to the new one.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Redirects take one hop.&lt;/strong&gt; When I retired the sports section, every old URL got a single 301 from &lt;code&gt;middleware.ts&lt;/code&gt;, straight to its final destination. Old channel slugs get the same treatment, with the alias table computed at build time.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dated pages expire on purpose.&lt;/strong&gt; A listings page for a past date is useless a week later. Past dates answer &lt;strong&gt;410 Gone&lt;/strong&gt; with &lt;code&gt;X-Robots-Tag: noindex&lt;/code&gt;, so Google drops them instead of crawling them forever. An old route that used to return a 200 copy of the home page for any slug (a textbook soft 404) now returns 410 too.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Thin pages stay out of the index.&lt;/strong&gt; An actor page is &lt;code&gt;noindex, follow&lt;/code&gt; until it has a French biography. About 800 are in the sitemap today; the others wait for their bio.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  4. What I haven't fixed: a 6 MB page
&lt;/h2&gt;

&lt;p&gt;Not everything is clean. The evening grid, &lt;code&gt;/programme-tv/soiree&lt;/code&gt;, ships &lt;strong&gt;6.2 MB of HTML&lt;/strong&gt; (about 990 KB gzipped).&lt;/p&gt;

&lt;p&gt;I parsed the page to see where it goes. &lt;strong&gt;Over 90% of the HTML is the RSC payload&lt;/strong&gt;, the &lt;code&gt;self.__next_f.push(...)&lt;/code&gt; scripts at the bottom (75 of them). The server component passes the day's listings as props to a &lt;code&gt;'use client'&lt;/code&gt; component, so visitors can page through channels, filter films and open a programme's details without waiting for a request:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight tsx"&gt;&lt;code&gt;&lt;span class="c1"&gt;// app/programme-tv/soiree/page.tsx (simplified)&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;initialData&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;day&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;today&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;channels&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;channelsSlim&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;grouped&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;groupedToday&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt;
&lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;SoireeClient&lt;/span&gt; &lt;span class="na"&gt;initialData&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;initialData&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; &lt;span class="na"&gt;initialDay&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;today&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It's only one day, but one day is &lt;strong&gt;12,243 programmes&lt;/strong&gt;, and every field of every programme gets serialized:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Field&lt;/th&gt;
&lt;th&gt;Size in the payload&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;desc&lt;/code&gt; (full description)&lt;/td&gt;
&lt;td&gt;1.77 MB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;icon&lt;/code&gt; (image URL)&lt;/td&gt;
&lt;td&gt;1.06 MB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;start&lt;/code&gt; + &lt;code&gt;stop&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;0.82 MB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;title&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;0.38 MB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;channelId&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;0.34 MB&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Full descriptions alone weigh more than the titles, times and channel IDs put together. And &lt;code&gt;channelId&lt;/code&gt; is repeated on each programme even though the data is already grouped by channel.&lt;/p&gt;

&lt;p&gt;The lesson applies to any App Router project: &lt;strong&gt;whatever you pass to a client component ships in the HTML, in full.&lt;/strong&gt; The fix is a slim view model with only the fields the first screen needs, and the rest loaded on demand. For comparison, the daily article page, which is mostly server-rendered text, weighs 48 KB.&lt;/p&gt;

&lt;p&gt;To find your own heavy pages, &lt;code&gt;curl -s URL | wc -c&lt;/code&gt; is a good start.&lt;/p&gt;

&lt;h2&gt;
  
  
  Wrapping up
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Do the expensive work in batch and let pages read files.&lt;/li&gt;
&lt;li&gt;Know where your &lt;code&gt;&amp;lt;title&amp;gt;&lt;/code&gt; ends up.&lt;/li&gt;
&lt;li&gt;Treat URLs and published AI text as data, not cache.&lt;/li&gt;
&lt;li&gt;Watch what you pass to client components.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The site is &lt;a href="https://www.tele.guide" rel="noopener noreferrer"&gt;tele.guide&lt;/a&gt; (in French). Here's &lt;a href="https://www.tele.guide/ce-soir/2026-10-10" rel="noopener noreferrer"&gt;tonight's article&lt;/a&gt; if you want to look at the HTML. Questions welcome, especially if you kept streaming metadata on and measured the difference.&lt;/p&gt;

</description>
      <category>nextjs</category>
      <category>softwaredevelopment</category>
      <category>webdev</category>
      <category>seo</category>
    </item>
  </channel>
</rss>
