<?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: GuideBook</title>
    <description>The latest articles on DEV Community by GuideBook (@yege).</description>
    <link>https://dev.to/yege</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%2F3756881%2F0a4cc9f3-59a4-44f8-ba25-90e2a643212a.png</url>
      <title>DEV Community: GuideBook</title>
      <link>https://dev.to/yege</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/yege"/>
    <language>en</language>
    <item>
      <title>Building a Shareable Rally Stage Planner with Vanilla JavaScript</title>
      <dc:creator>GuideBook</dc:creator>
      <pubDate>Sat, 07 Nov 2026 22:32:52 +0000</pubDate>
      <link>https://dev.to/yege/building-a-shareable-rally-stage-planner-with-vanilla-javascript-59jh</link>
      <guid>https://dev.to/yege/building-a-shareable-rally-stage-planner-with-vanilla-javascript-59jh</guid>
      <description>&lt;p&gt;A rally stage can fit inside a URL: the seed, distance, terrain, and season are enough to describe a run that someone else can open.&lt;/p&gt;

&lt;p&gt;That is the core of &lt;a href="https://dirtbound.site/" rel="noopener noreferrer"&gt;Dirtbound — The Rally Field Guide&lt;/a&gt;, an independent companion site I built for the DirtBound browser rally game. You can configure a stage, launch it in the original game, and copy a link to share the configuration.&lt;/p&gt;

&lt;p&gt;DirtBound is made by Luke Baffait and Victor Boutros. My project is the guide and its interactive tools. The driving happens in their original game at &lt;a href="https://dirtbound.fr/" rel="noopener noreferrer"&gt;dirtbound.fr&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I wanted the site to give players something useful to do alongside reading: set up a run, check the default controls, and keep track of a few beginner exercises.&lt;/p&gt;

&lt;p&gt;The stage planner is the main interaction. It offers distances from 1 km through 10 km, plus Endless, three terrain options, four seasons, and a stage seed. Once those choices are made, the site constructs a link such as:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;https://dirtbound.fr/play.html?rally=471231&amp;amp;length=5000&amp;amp;landscape=high&amp;amp;season=winter&amp;amp;lang=en
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This selects seed &lt;code&gt;471231&lt;/code&gt;, a 5 km distance, high mountains, and winter.&lt;/p&gt;

&lt;p&gt;I checked the original game's public menu and startup code to understand the parameters. One detail matters: Endless requires omitting &lt;code&gt;length&lt;/code&gt;. The planner represents that choice internally as &lt;code&gt;0&lt;/code&gt;, then leaves it out of the URL. The game's default terrain and season can also be omitted.&lt;/p&gt;

&lt;p&gt;Here is the URL construction function from the project:&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="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;stageURL&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;stage&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;normalizeStage&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;url&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;URL&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;https://dirtbound.fr/play.html&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="nx"&gt;url&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;searchParams&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;set&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;rally&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;String&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;stage&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;seed&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;stage&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;url&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;searchParams&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;set&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;length&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;String&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;stage&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;stage&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;landscape&lt;/span&gt; &lt;span class="o"&gt;!==&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;varied&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;url&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;searchParams&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;set&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;landscape&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;stage&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;landscape&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;stage&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;season&lt;/span&gt; &lt;span class="o"&gt;!==&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;summer&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;url&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;searchParams&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;set&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;season&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;stage&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;season&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="nx"&gt;url&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;searchParams&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;set&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;lang&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;en&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;url&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;href&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;The &lt;code&gt;normalizeStage&lt;/code&gt; helper validates inputs against the supported options and supplies defaults. This also handles saved settings that are invalid or no longer usable. The form provides immediate validation, and URL generation applies its own checks.&lt;/p&gt;

&lt;p&gt;Sharing needs no server-side record. The configuration travels in the link, so the recipient can open it directly in the game. That keeps this feature small enough to maintain as a static site.&lt;/p&gt;

&lt;p&gt;The rest of the stack follows the same approach: a Node.js build script generates seven HTML pages, CSS handles the layout, and browser ES modules handle the interactions. The guide has no account system or backend database.&lt;/p&gt;

&lt;p&gt;Stage preferences and the beginner practice checklist use &lt;code&gt;localStorage&lt;/code&gt;. Storage access sits behind a small wrapper that catches read, parse, and write failures. If saving is unavailable, the planner still constructs links and explains that preferences could not be saved.&lt;/p&gt;

&lt;p&gt;Copying a link has a similar fallback. When clipboard access fails, the page exposes a selected text field so the user can copy it manually. That failure should add one extra step rather than stop the task.&lt;/p&gt;

&lt;p&gt;Launching the game required another browser-specific decision. The current launcher requests a separate game window, keeping the guide and its scroll position available. It can reuse the window while the browser allows access to its reference. If opening it is blocked, the guide displays an explanation and an ordinary new-tab link. The browser ultimately decides how to present that separate context.&lt;/p&gt;

&lt;p&gt;The keyboard tester also needed a clear start and stop. It activates only after a click, recognizes the default driving keys through &lt;code&gt;KeyboardEvent.code&lt;/code&gt;, and stops on Escape or when the window loses focus. It leaves Tab navigation available and stops when focus enters an editable field. This lets someone explore the controls while keeping the rest of the page usable.&lt;/p&gt;

&lt;p&gt;For verification, the project includes checks for URL construction, omitted default parameters, invalid saved settings, local links, and game-window behavior. These check the companion site's behavior; they do not establish game performance or multiplayer reliability.&lt;/p&gt;

&lt;p&gt;There is a maintenance tradeoff here: the planner depends on the original game's URL behavior. That contract could change. The site keeps links to the original game menu available, and future game updates may require changes to the planner.&lt;/p&gt;

&lt;p&gt;You can try the &lt;a href="https://dirtbound.site/#stage-planner" rel="noopener noreferrer"&gt;stage planner here&lt;/a&gt;. Choose a configuration, copy its link, and open it in the game.&lt;/p&gt;

&lt;p&gt;I'd appreciate feedback on that flow: is it clear what the planner controls, and what would make sharing a stage more useful?&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>sideprojects</category>
      <category>html</category>
    </item>
    <item>
      <title>I Built a YouTube Dislike Viewer with Next.js 16 — Here's How</title>
      <dc:creator>GuideBook</dc:creator>
      <pubDate>Sun, 08 Feb 2026 06:17:47 +0000</pubDate>
      <link>https://dev.to/yege/i-built-a-youtube-dislike-viewer-with-nextjs-16-heres-how-a0b</link>
      <guid>https://dev.to/yege/i-built-a-youtube-dislike-viewer-with-nextjs-16-heres-how-a0b</guid>
      <description>&lt;p&gt;I Built a YouTube Dislike Viewer with Next.js 16&lt;/p&gt;

&lt;p&gt;Ever since YouTube removed the public dislike count, it's been harder to judge video quality at a glance. So I built a&lt;br&gt;
   simple tool to bring it back.&lt;/p&gt;

&lt;p&gt;Live site: &lt;a href="https://www.youtubedislikeviewer.shop" rel="noopener noreferrer"&gt;https://www.youtubedislikeviewer.shop&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;What It Does&lt;/p&gt;

&lt;p&gt;Paste any YouTube URL or video ID, and instantly see:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;👍 Likes &amp;amp; 👎 Dislikes&lt;/li&gt;
&lt;li&gt;📊 Like/Dislike ratio bar&lt;/li&gt;
&lt;li&gt;👁 View count &amp;amp; rating&lt;/li&gt;
&lt;li&gt;🕐 Search history (stored locally)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Tech Stack&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Next.js 16 (App Router + Turbopack)&lt;/li&gt;
&lt;li&gt;React 19 + TypeScript 5.9&lt;/li&gt;
&lt;li&gt;Tailwind CSS 4&lt;/li&gt;
&lt;li&gt;Return YouTube Dislike API (community-driven dislike data)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Key Design Decisions&lt;/p&gt;

&lt;p&gt;API Proxy with Caching&lt;/p&gt;

&lt;p&gt;Instead of calling the dislike API directly from the client, I set up a server-side proxy route at /api/dislike. This&lt;br&gt;
  lets me add cache headers (s-maxage=300, stale-while-revalidate=600) so repeated lookups for the same video are fast&lt;br&gt;
  and cheap.&lt;/p&gt;

&lt;p&gt;// app/api/dislike/route.ts (simplified)&lt;br&gt;
  export async function GET(request: Request) {&lt;br&gt;
    const videoId = new URL(request.url).searchParams.get('videoId');&lt;br&gt;
    const res = await fetch(&lt;br&gt;
      &lt;code&gt;https://returnyoutubedislikeapi.com/votes?videoId=${videoId}&lt;/code&gt;&lt;br&gt;
    );&lt;br&gt;
    const data = await res.json();&lt;br&gt;
    return Response.json(data, {&lt;br&gt;
      headers: {&lt;br&gt;
        'Cache-Control': 'public, s-maxage=300, stale-while-revalidate=600',&lt;br&gt;
      },&lt;br&gt;
    });&lt;br&gt;
  }&lt;/p&gt;

&lt;p&gt;Robust URL Parsing&lt;/p&gt;

&lt;p&gt;YouTube URLs come in many flavors — youtube.com/watch?v=, youtu.be/, /embed/, or just a raw 11-character ID. A single&lt;br&gt;
  extraction function handles all of them with regex.&lt;/p&gt;

&lt;p&gt;Thumbnail Fallback&lt;/p&gt;

&lt;p&gt;Not every video has a maxresdefault thumbnail. The component tries the highest quality first and falls back to&lt;br&gt;
  hqdefault on error — no broken images.&lt;/p&gt;

&lt;p&gt;What I Learned&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Next.js 16 App Router is mature and pleasant to work with. The server/client component split feels natural once you
get used to it.&lt;/li&gt;
&lt;li&gt;Caching at the edge with simple Cache-Control headers goes a long way — no Redis needed for a project this size.&lt;/li&gt;
&lt;li&gt;localStorage is still a perfectly fine solution for lightweight client-side persistence like search history.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Try It Out&lt;/p&gt;

&lt;p&gt;Check it out at &lt;a href="https://www.youtubedislikeviewer.shop" rel="noopener noreferrer"&gt;https://www.youtubedislikeviewer.shop&lt;/a&gt; and let me know what you think!&lt;/p&gt;

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