<?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: Henry</title>
    <description>The latest articles on DEV Community by Henry (@henryzhang).</description>
    <link>https://dev.to/henryzhang</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%2F4270835%2F45335bf8-e71b-4322-8da8-3e30b984ddc4.png</url>
      <title>DEV Community: Henry</title>
      <link>https://dev.to/henryzhang</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/henryzhang"/>
    <language>en</language>
    <item>
      <title>How I Built a Zero-Deadlock 60 60 Arrow Puzzle Generator in TypeScript</title>
      <dc:creator>Henry</dc:creator>
      <pubDate>Wed, 02 Dec 2026 10:10:20 +0000</pubDate>
      <link>https://dev.to/henryzhang/how-i-built-a-zero-deadlock-60x60-arrow-puzzle-generator-in-typescript-2j5b</link>
      <guid>https://dev.to/henryzhang/how-i-built-a-zero-deadlock-60x60-arrow-puzzle-generator-in-typescript-2j5b</guid>
      <description>&lt;p&gt;If you have ever played an arrow-removal puzzle (tap an arrow to slide it off the board along the direction it points, without colliding with any other arrow), the rules take five seconds to learn.&lt;/p&gt;

&lt;p&gt;Generating &lt;em&gt;good&lt;/em&gt; boards—especially dense 60×60 silhouette shapes like a leaf, heart, cat, or elephant with 90 to 165 interlocking arrows—is a completely different problem.&lt;/p&gt;

&lt;p&gt;When I built &lt;a href="https://arrowpuzzle.app/" rel="noopener noreferrer"&gt;Arrow Puzzle&lt;/a&gt; (a free, no-download browser logic puzzle with 100 campaign levels and a shared daily challenge), my first naive random generators failed in two predictable ways:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Silent deadlocks&lt;/strong&gt;: Two or more arrows pointed into each other in a cycle (&lt;code&gt;A&lt;/code&gt; blocks &lt;code&gt;B&lt;/code&gt;, &lt;code&gt;B&lt;/code&gt; blocks &lt;code&gt;C&lt;/code&gt;, &lt;code&gt;C&lt;/code&gt; blocks &lt;code&gt;A&lt;/code&gt;), making the board mathematically unsolvable.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Boring "peel the onion" boards&lt;/strong&gt;: Every outer arrow pointed outward, so players could clear 40 arrows in a row without thinking.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Here is how I modeled the board as a directed acyclic graph (DAG), enforced zero deadlocks, and tuned the blocking rhythm—plus a small MIT-licensed solver you can run on your own grids.&lt;/p&gt;




&lt;h2&gt;
  
  
  1. Modeling an Arrow Board as a Dependency Graph
&lt;/h2&gt;

&lt;p&gt;Each arrow occupies an ordered list of grid cells &lt;code&gt;cells[]&lt;/code&gt;, where the last cell is its head, and exits in one of four cardinal directions (&lt;code&gt;up&lt;/code&gt;, &lt;code&gt;right&lt;/code&gt;, &lt;code&gt;down&lt;/code&gt;, &lt;code&gt;left&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;To check whether arrow &lt;code&gt;A&lt;/code&gt; can leave the board right now, we raycast from &lt;code&gt;A&lt;/code&gt;'s head cell to the edge of the grid along &lt;code&gt;A.direction&lt;/code&gt;. Every distinct arrow &lt;code&gt;B&lt;/code&gt; we intersect along that ray creates a directed dependency edge:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;B -&amp;gt; A   ("B must exit before A can exit")
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once you build that graph for every arrow on the board, &lt;strong&gt;solvability is equivalent to the graph being a DAG (no directed cycles)&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  2. Verifying Solvability &amp;amp; Measuring Real Difficulty with Kahn's Algorithm
&lt;/h2&gt;

&lt;p&gt;Checking solvability takes a single pass of Kahn's topological sort:&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;solveArrowBoard&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;board&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="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;blockedBy&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;blocks&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;buildDependencyGraph&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;board&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="n"&gt;inDegree&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nb"&gt;Map&lt;/span&gt;&lt;span class="p"&gt;(&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="n"&gt;depth&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nb"&gt;Map&lt;/span&gt;&lt;span class="p"&gt;(&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="n"&gt;ready&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;arrow&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="n"&gt;board&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;arrows&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="n"&gt;deg&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;blockedBy&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;arrow&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;length&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="n"&gt;inDegree&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="n"&gt;arrow&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;deg&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="n"&gt;depth&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="n"&gt;arrow&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&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="n"&gt;deg&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;ready&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;push&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;arrow&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;)&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="n"&gt;solution&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="n"&gt;sumCandidates&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="k"&gt;while&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ready&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;length&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;sumCandidates&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="n"&gt;ready&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;length&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;current&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;ready&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;shift&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="n"&gt;solution&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;push&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;current&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="n"&gt;currentDepth&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;depth&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;current&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;??&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;dependent&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="n"&gt;blocks&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;current&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="n"&gt;depth&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="n"&gt;dependent&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;max&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;depth&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;dependent&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;??&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;currentDepth&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&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="n"&gt;nextDeg&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;inDegree&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;dependent&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="n"&gt;inDegree&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="n"&gt;dependent&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;nextDeg&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="n"&gt;nextDeg&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;ready&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;push&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;dependent&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&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;{&lt;/span&gt;
    &lt;span class="n"&gt;solvable&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;solution&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;length&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="n"&gt;board&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;arrows&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;length&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;solution&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;solution&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;length&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="n"&gt;board&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;arrows&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;length&lt;/span&gt; &lt;span class="o"&gt;?&lt;/span&gt; &lt;span class="n"&gt;solution&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;maxDependencyDepth&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;max&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;depth&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;values&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;averageCandidateCount&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;solution&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;length&lt;/span&gt; &lt;span class="o"&gt;?&lt;/span&gt; &lt;span class="n"&gt;sumCandidates&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="n"&gt;solution&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;length&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&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;The same pass gives three structural metrics that actually correlate with how a board &lt;em&gt;feels&lt;/em&gt; to play:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;initialSafeCount&lt;/code&gt;&lt;/strong&gt;: If 12 arrows are safe on move 1, the opening feels trivial. Restricting openings to &lt;code&gt;1–2&lt;/code&gt; safe arrows forces real scanning from the first tap.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;maxDependencyDepth&lt;/code&gt;&lt;/strong&gt;: The longest chain of arrows that must be cleared in strict sequence. Across our 40 dense 60×60 pattern boards, dependency depths reach up to &lt;strong&gt;102 steps&lt;/strong&gt; (e.g., the 121-arrow elephant silhouette).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;averageCandidateCount&lt;/code&gt;&lt;/strong&gt;: The mean number of simultaneously legal moves across a full clear. Keeping this around &lt;code&gt;1.1–1.7&lt;/code&gt; prevents the board from collapsing into mindless tapping.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  3. Keeping Daily Puzzles Deterministic Across Every Browser
&lt;/h2&gt;

&lt;p&gt;For the &lt;a href="https://arrowpuzzle.app/daily" rel="noopener noreferrer"&gt;Daily Arrow Puzzle&lt;/a&gt; mode, every player worldwide needs the exact same board for a given UTC date without requiring a backend database lookup.&lt;/p&gt;

&lt;p&gt;We pre-verify candidate quality indices with a deterministic seeded PRNG and assert &lt;code&gt;deepStrictEqual&lt;/code&gt; parity between local generation and production build output, plus a SHA-256 board digest check. Every board is also verified under &lt;strong&gt;two independent clearing orders&lt;/strong&gt; to make sure no hidden edge case sneaks into a daily puzzle.&lt;/p&gt;




&lt;h2&gt;
  
  
  4. Open-Source Solver &amp;amp; Benchmark Data
&lt;/h2&gt;

&lt;p&gt;I extracted the standalone, zero-dependency topological solver and deadlock cycle detector into an MIT-licensed package so other puzzle developers can validate their own grids:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Solver &amp;amp; CLI (MIT)&lt;/strong&gt;: &lt;a href="https://github.com/hongcsd/arrow-puzzle-solver" rel="noopener noreferrer"&gt;github.com/hongcsd/arrow-puzzle-solver&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;140 Verified Boards Metrics (CC BY 4.0 CSV)&lt;/strong&gt;: &lt;a href="https://github.com/hongcsd/arrow-puzzle-boards-dataset" rel="noopener noreferrer"&gt;github.com/hongcsd/arrow-puzzle-boards-dataset&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Live Browser Game (100 levels + Daily Challenge, free, no download)&lt;/strong&gt;: &lt;a href="https://arrowpuzzle.app/" rel="noopener noreferrer"&gt;arrowpuzzle.app&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you build grid puzzles or procedural level generators, I would love to hear how you measure "felt difficulty" beyond simple move counts—especially for single-life daily modes where one misread sightline ends the run.&lt;/p&gt;

</description>
      <category>algorithms</category>
      <category>gamedev</category>
      <category>typescript</category>
    </item>
    <item>
      <title>Building a Deterministic 1-Per-Region Cat Sudoku Solver &amp; Puzzle Generator in Vanilla JS</title>
      <dc:creator>Henry</dc:creator>
      <pubDate>Wed, 02 Dec 2026 07:17:32 +0000</pubDate>
      <link>https://dev.to/henryzhang/building-a-deterministic-1-per-region-cat-sudoku-solver-puzzle-generator-in-vanilla-js-590k</link>
      <guid>https://dev.to/henryzhang/building-a-deterministic-1-per-region-cat-sudoku-solver-puzzle-generator-in-vanilla-js-590k</guid>
      <description>&lt;p&gt;When you build a region-partitioned grid logic puzzle (one piece per row, column, and colored region, with no pieces touching diagonally — the rule set behind &lt;a href="https://catsudoku.org/" rel="noopener noreferrer"&gt;Cat Sudoku&lt;/a&gt;, 1-Star Battle, and Queens-style puzzles), the hardest technical part isn't rendering the board. It's &lt;strong&gt;guaranteeing a single unique logical solution&lt;/strong&gt; without making players guess.&lt;/p&gt;

&lt;p&gt;Here is how the constraint solver and uniqueness refinement loop works in pure zero-dependency JavaScript, along with benchmark numbers across 150 generated 6×6, 8×8, and 9×9 boards.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Why Random Region Growth Fails Uniqueness
&lt;/h2&gt;

&lt;p&gt;If you take an $N \times N$ grid, pick a valid non-touching placement of $N$ pieces (one per row and column, no 8-neighborhood collisions), and flood-fill $N$ connected colored regions outward from those pieces, you get a valid board — &lt;strong&gt;usually with 2 to 20+ unintended alternative solutions&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;To guarantee uniqueness, we need two lightweight primitives:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Bitmask Backtracking Solver (&lt;code&gt;solveAll&lt;/code&gt;)&lt;/strong&gt;: Explores rows &lt;code&gt;0..N-1&lt;/code&gt; using integer bitmasks for &lt;code&gt;usedCols&lt;/code&gt; and &lt;code&gt;usedRegs&lt;/code&gt;, halting immediately once &lt;code&gt;solutions.length === 2&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Orthogonal Connectivity Check (&lt;code&gt;isRegionConnected&lt;/code&gt;)&lt;/strong&gt;: Ensures shifting a border cell from one region into an adjacent region never splits the source region into disconnected islands.
&lt;/li&gt;
&lt;/ol&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;solveAll&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;size&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;regions&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;limit&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="p"&gt;}&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="n"&gt;cols&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;Array&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;size&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;fill&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&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="n"&gt;solutions&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="n"&gt;usedCols&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;usedRegs&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;nodes&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;walk&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;row&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;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="n"&gt;solutions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;length&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="n"&gt;limit&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;;&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;row&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="n"&gt;size&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="n"&gt;solutions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;push&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;cols&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;map&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;col&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;r&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;size&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;col&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&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;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;prevCol&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;row&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="o"&gt;?&lt;/span&gt; &lt;span class="n"&gt;cols&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;row&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="n"&gt;col&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;col&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="n"&gt;size&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;col&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="n"&gt;nodes&lt;/span&gt;&lt;span class="o"&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="n"&gt;row&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;abs&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;prevCol&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;col&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;continue&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;cb&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="n"&gt;col&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;rb&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="n"&gt;regions&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;row&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;size&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;col&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="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;usedCols&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt; &lt;span class="n"&gt;cb&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;usedRegs&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt; &lt;span class="n"&gt;rb&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;continue&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

      &lt;span class="n"&gt;cols&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;row&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;col&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="n"&gt;usedCols&lt;/span&gt; &lt;span class="o"&gt;|=&lt;/span&gt; &lt;span class="n"&gt;cb&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="n"&gt;usedRegs&lt;/span&gt; &lt;span class="o"&gt;|=&lt;/span&gt; &lt;span class="n"&gt;rb&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="nf"&gt;walk&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;row&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="n"&gt;usedCols&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;=&lt;/span&gt; &lt;span class="o"&gt;~&lt;/span&gt;&lt;span class="n"&gt;cb&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="n"&gt;usedRegs&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;=&lt;/span&gt; &lt;span class="o"&gt;~&lt;/span&gt;&lt;span class="n"&gt;rb&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nf"&gt;walk&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&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;{&lt;/span&gt; &lt;span class="n"&gt;solutions&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;nodes&lt;/span&gt; &lt;span class="p"&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;h2&gt;
  
  
  2. Eliminating Competing Solutions Instead of Brute-Force Rejecting
&lt;/h2&gt;

&lt;p&gt;Instead of discarding every non-unique grid (which gets expensive at 9×9), we ask the solver for &lt;strong&gt;one competing solution&lt;/strong&gt; (&lt;code&gt;other&lt;/code&gt;) that differs from our planted &lt;code&gt;solution&lt;/code&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Find cells in &lt;code&gt;other&lt;/code&gt; that are &lt;strong&gt;not&lt;/strong&gt; in our target &lt;code&gt;solution&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Check whether removing a cell keeps its original region orthogonally connected.&lt;/li&gt;
&lt;li&gt;Reassign that cell to an orthogonally neighboring region &lt;strong&gt;already occupied by another piece in &lt;code&gt;other&lt;/code&gt;&lt;/strong&gt; — immediately creating a two-piece collision in &lt;code&gt;other&lt;/code&gt; while keeping our planted &lt;code&gt;solution&lt;/code&gt; valid!&lt;/li&gt;
&lt;li&gt;Track visited region layouts in a &lt;code&gt;Set&lt;/code&gt; to prevent cycles, and repeat up to 300 steps.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  3. Benchmark Results Across 150 Verified Boards
&lt;/h2&gt;

&lt;p&gt;Using the standalone MIT solver (&lt;a href="https://github.com/hongcsd/queens-cat-sudoku-solver" rel="noopener noreferrer"&gt;hongcsd/queens-cat-sudoku-solver&lt;/a&gt;), I ran a seeded benchmark across 150 fresh boards (50 × 6×6, 50 × 8×8, 50 × 9×9) and archived the full CSV dataset on Zenodo (&lt;a href="https://zenodo.org/records/24740867" rel="noopener noreferrer"&gt;DOI 10.5281/zenodo.24740867&lt;/a&gt;):&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Grid Size&lt;/th&gt;
&lt;th&gt;Boards&lt;/th&gt;
&lt;th&gt;Median Backtrack Nodes&lt;/th&gt;
&lt;th&gt;Max Nodes&lt;/th&gt;
&lt;th&gt;Avg Generation Attempts&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;6×6 (Normal)&lt;/td&gt;
&lt;td&gt;50&lt;/td&gt;
&lt;td&gt;582&lt;/td&gt;
&lt;td&gt;1,074&lt;/td&gt;
&lt;td&gt;2.82&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;8×8 (Hard)&lt;/td&gt;
&lt;td&gt;50&lt;/td&gt;
&lt;td&gt;5,512&lt;/td&gt;
&lt;td&gt;27,320&lt;/td&gt;
&lt;td&gt;6.86&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;9×9 (Ultra)&lt;/td&gt;
&lt;td&gt;50&lt;/td&gt;
&lt;td&gt;27,792&lt;/td&gt;
&lt;td&gt;163,152&lt;/td&gt;
&lt;td&gt;17.64&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Every board in the benchmark passes &lt;code&gt;solution_count === 1&lt;/code&gt; &lt;strong&gt;without relying on any starter hint&lt;/strong&gt;, and &lt;code&gt;6×6&lt;/code&gt; / &lt;code&gt;8×8&lt;/code&gt; tiers add one fixed starter piece for a gentler onboarding curve.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try It Live &amp;amp; Read the Code
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Play in browser (free, zero ads, no account):&lt;/strong&gt; &lt;a href="https://catsudoku.org/" rel="noopener noreferrer"&gt;https://catsudoku.org/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Illustrated first-move walkthrough &amp;amp; deduction rules:&lt;/strong&gt; &lt;a href="https://catsudoku.org/how-to-play/" rel="noopener noreferrer"&gt;https://catsudoku.org/how-to-play/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;How 1-per-region puzzles compare to classic Sudoku &amp;amp; Star Battle:&lt;/strong&gt; &lt;a href="https://catsudoku.org/games-like-cat-sudoku/" rel="noopener noreferrer"&gt;https://catsudoku.org/games-like-cat-sudoku/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Open-source solver &amp;amp; tests (MIT):&lt;/strong&gt; &lt;a href="https://github.com/hongcsd/queens-cat-sudoku-solver" rel="noopener noreferrer"&gt;https://github.com/hongcsd/queens-cat-sudoku-solver&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CC BY 4.0 150-board benchmark CSV (Zenodo DOI):&lt;/strong&gt; &lt;a href="https://zenodo.org/records/24740867" rel="noopener noreferrer"&gt;https://zenodo.org/records/24740867&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you have thoughts on solver heuristics (e.g., MRV / naked-single propagation before backtracking) or mobile UX for exclusion marking, I'd love to compare notes in the comments.&lt;/p&gt;

</description>
      <category>webdev</category>
    </item>
    <item>
      <title>How We Built a Password-Free, Spoiler-Proof Friends Advent Calendar on Cloudflare Workers &amp; D1</title>
      <dc:creator>Henry</dc:creator>
      <pubDate>Wed, 02 Dec 2026 05:09:46 +0000</pubDate>
      <link>https://dev.to/henryzhang/how-we-built-a-password-free-spoiler-proof-friends-advent-calendar-on-cloudflare-workers-d1-59gn</link>
      <guid>https://dev.to/henryzhang/how-we-built-a-password-free-spoiler-proof-friends-advent-calendar-on-cloudflare-workers-d1-59gn</guid>
      <description>&lt;p&gt;Most online advent calendar builders fall into one of two traps: either they force every friend to create an account just to leave a 150-character note, or they encode all 24 notes inside a client-side URL where anyone who opens DevTools can spoil December in three seconds.&lt;/p&gt;

&lt;p&gt;When building &lt;a href="https://ourfriendsadvent.com/" rel="noopener noreferrer"&gt;OurFriendsAdvent&lt;/a&gt;, we set three strict constraints:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Zero sign-up for owners and friends&lt;/strong&gt; — create a 24-door board in 10 seconds and share one link.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;True server-side spoiler locks&lt;/strong&gt; — friends cannot read each other's notes, and even the calendar owner cannot fetch the text of Door 14 before December 14 arrives.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Late-December catch-up&lt;/strong&gt; — if someone starts on December 2 or December 10, any already-passed date unlocks the moment a friend fills it.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Here is the lightweight architecture we used on Cloudflare Workers + D1 and the edge cases that surprised us.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Password-Free Ownership Without Auth Friction
&lt;/h2&gt;

&lt;p&gt;Instead of emails and magic links, creating a calendar generates a random owner token stored in the creator's browser &lt;code&gt;localStorage&lt;/code&gt;, while the D1 database stores only the &lt;strong&gt;SHA-256 hash&lt;/strong&gt; of that token alongside a 10-character shareable calendar code.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Owners manage their calendar, delete spam doors, or open unlocked doors by proving possession of the browser token.&lt;/li&gt;
&lt;li&gt;Friends only ever receive the 10-character code (or direct share link) and a separate contributor hash so they can edit or delete only the doors they personally sealed.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Tradeoff: we explicitly warn users on the site and FAQ that clearing browser storage removes owner management access—honesty beats hiding constraints behind vague copy.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Why Client-Side Date Checks Fail Spoiler Protection
&lt;/h2&gt;

&lt;p&gt;If your API returns &lt;code&gt;{ day: 18, note: "Happy early Christmas..." }&lt;/code&gt; and hides it behind a CSS lock in the UI, one look at the Network tab ruins the surprise.&lt;/p&gt;

&lt;p&gt;Our Worker endpoint enforces date gating in the SQL/API response layer:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;For &lt;strong&gt;friends&lt;/strong&gt;, the API returns only &lt;code&gt;{ day, claimed: true, authorLabel }&lt;/code&gt; — never the note text.&lt;/li&gt;
&lt;li&gt;For the &lt;strong&gt;owner&lt;/strong&gt;, the Worker compares each door's December day against the calendar's current date window. Future doors return &lt;code&gt;{ day, claimed: true, locked: true }&lt;/code&gt; with &lt;code&gt;note: null&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Once a December date has arrived (or already passed for late starters), the Worker releases the stored plain text and sticker ID.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  3. Abuse Prevention Without Turning It Into a CAPTCHA Maze
&lt;/h2&gt;

&lt;p&gt;Open multi-friend forms attract link spam fast. Rather than locking out real friend groups behind logins, we combined three simple server guards:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;200-character plain-text cap&lt;/strong&gt; with URL patterns rejected server-side.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Per-friend 3-door cap&lt;/strong&gt; so one person cannot hijack all 24 doors, while smaller friend groups of 8+ people can still fill a full calendar.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hashed IP rate limiting&lt;/strong&gt; in D1 + one-click owner deletion for any unwanted note.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  4. Built-In 1080×1920 Story Cards &amp;amp; &lt;code&gt;.ics&lt;/code&gt; Daily Reminders
&lt;/h2&gt;

&lt;p&gt;The hardest UX problem for a friends advent calendar is not building the grid—it is getting 24 doors filled and reminding the owner to actually open them every morning.&lt;/p&gt;

&lt;p&gt;We added two zero-backend utilities on the client:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Canvas-rendered 1080×1920 vertical Story PNG&lt;/strong&gt; showing live filled-door progress and the 10-character code for Instagram/TikTok Stories or WhatsApp Status.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;RFC 5545 &lt;code&gt;.ics&lt;/code&gt; file generator&lt;/strong&gt; (plus a Google Calendar link) that schedules a daily Dec 1–24 morning reminder containing the direct link back to the owner's board.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  5. Open CC BY 4.0 Prompt Dataset (120 Notes Under 200 Chars)
&lt;/h2&gt;

&lt;p&gt;Because staring at a blank door is the #1 reason friends abandon a link, we also published a clean UTF-8 &lt;strong&gt;CC BY 4.0 dataset of 120 concise friends advent calendar notes&lt;/strong&gt; (all verified &lt;code&gt;&amp;lt;= 200&lt;/code&gt; characters) plus a &lt;strong&gt;2026 online advent calendar tools comparison CSV&lt;/strong&gt; and a zero-dependency Node.js CLI:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;GitHub repo &amp;amp; CLI: &lt;a href="https://github.com/hongcsd/friends-advent-calendar-prompts" rel="noopener noreferrer"&gt;hongcsd/friends-advent-calendar-prompts&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Permanent Zenodo DOI (&lt;code&gt;10.5281/zenodo.24738384&lt;/code&gt;): &lt;a href="https://zenodo.org/records/24738384" rel="noopener noreferrer"&gt;zenodo.org/records/24738384&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Web edition of the prompts: &lt;a href="https://ourfriendsadvent.com/ideas" rel="noopener noreferrer"&gt;ourfriendsadvent.com/ideas&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Feature comparison with other online advent calendar tools: &lt;a href="https://ourfriendsadvent.com/alternatives" rel="noopener noreferrer"&gt;ourfriendsadvent.com/alternatives&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you are building lightweight seasonal web apps without accounts, I would love to hear how you handle ownership recovery and spam prevention without adding login walls.&lt;/p&gt;

</description>
      <category>opensource</category>
    </item>
    <item>
      <title>Pure-JS PackBits .PSD Packing, Zero-OOM 4K MP4 Range Parsing, and Dual-Pass Audio Moderation inside Cloudflare Workers' 128 MB RAM Cap</title>
      <dc:creator>Henry</dc:creator>
      <pubDate>Sat, 28 Nov 2026 14:03:31 +0000</pubDate>
      <link>https://dev.to/henryzhang/pure-js-packbits-psd-packing-zero-oom-4k-mp4-range-parsing-and-dual-pass-audio-moderation-inside-2lh5</link>
      <guid>https://dev.to/henryzhang/pure-js-packbits-psd-packing-zero-oom-4k-mp4-range-parsing-and-dual-pass-audio-moderation-inside-2lh5</guid>
      <description>&lt;p&gt;When building &lt;a href="https://seeli.ai" rel="noopener noreferrer"&gt;Seeli&lt;/a&gt; — a pay-as-you-go AI image and video studio — I wanted to avoid running idle GPU boxes, FFmpeg sidecars, or Python/Pillow containers just to validate MP4 uploads and pack multi-layer Adobe &lt;code&gt;.PSD&lt;/code&gt; files.&lt;/p&gt;

&lt;p&gt;Running everything on &lt;strong&gt;Cloudflare Workers + D1 + private R2 + Queues&lt;/strong&gt; eliminates idle server cost, but comes with one hard physics constraint: &lt;strong&gt;each Worker isolate has a 128 MB memory limit&lt;/strong&gt;. Naive &lt;code&gt;await request.arrayBuffer()&lt;/code&gt; calls on a 100 MB MP4 upload or a 250 MB 4K render will crash the isolate instantly with an OOM error.&lt;/p&gt;

&lt;p&gt;Here are the three concrete engineering solutions we shipped in production — along with the MIT &lt;code&gt;.PSD&lt;/code&gt; binary writer and CC BY 4.0 benchmark data we extracted along the way.&lt;/p&gt;




&lt;h2&gt;
  
  
  1. Packing Real Multi-Layer Adobe &lt;code&gt;.PSD&lt;/code&gt; Files in Pure &lt;code&gt;Uint8Array&lt;/code&gt; / &lt;code&gt;DataView&lt;/code&gt; (Zero Dependencies)
&lt;/h2&gt;

&lt;p&gt;When an image-to-layer model splits a flat commercial poster (say, a skincare ad with glass reflections, botanical leaves, a headline, and a &lt;code&gt;$38&lt;/code&gt; price badge), the upstream API returns:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;An inpainted clean background plate (&lt;code&gt;z_index = 0&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Up to 99 cropped transparent RGBA PNG layers (&lt;code&gt;colorType = 6&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Pixel bounding boxes (&lt;code&gt;top&lt;/code&gt;, &lt;code&gt;left&lt;/code&gt;, &lt;code&gt;bottom&lt;/code&gt;, &lt;code&gt;right&lt;/code&gt;) and OCR text strings&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Designers don't want 15 loose PNGs in a folder — they want a single &lt;code&gt;.PSD&lt;/code&gt; file that opens cleanly in Adobe Photoshop and Photopea with every layer positioned at its exact pixel coordinates and named from OCR.&lt;/p&gt;

&lt;p&gt;Instead of spinning up a server running &lt;code&gt;psd-tools&lt;/code&gt; or headless Photoshop, we implemented a zero-dependency &lt;strong&gt;Adobe &lt;code&gt;.PSD&lt;/code&gt; v1 (&lt;code&gt;8BPS&lt;/code&gt;) binary encoder&lt;/strong&gt; in ~440 lines of pure JavaScript (&lt;code&gt;Uint8Array&lt;/code&gt; + &lt;code&gt;DataView&lt;/code&gt;):&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;26-byte Header (&lt;code&gt;8BPS&lt;/code&gt;)&lt;/strong&gt;: Version &lt;code&gt;1&lt;/code&gt;, &lt;code&gt;4&lt;/code&gt; channels (RGBA), canvas &lt;code&gt;height × width&lt;/code&gt;, &lt;code&gt;8-bit&lt;/code&gt; depth, RGB Color Mode (&lt;code&gt;3&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Layer &amp;amp; Mask Records&lt;/strong&gt;: For each layer, write its signed 32-bit &lt;code&gt;(top, left, bottom, right)&lt;/code&gt; bounds, four channel headers (&lt;code&gt;-1&lt;/code&gt; Alpha, &lt;code&gt;0&lt;/code&gt; Red, &lt;code&gt;1&lt;/code&gt; Green, &lt;code&gt;2&lt;/code&gt; Blue), blend signature (&lt;code&gt;8BIM&lt;/code&gt; / &lt;code&gt;norm&lt;/code&gt;), opacity/visibility flags, Pascal-padded ASCII name, plus an &lt;strong&gt;&lt;code&gt;8BIM&lt;/code&gt; + &lt;code&gt;luni&lt;/code&gt; UTF-16BE Unicode layer name block&lt;/strong&gt; so multi-language OCR labels don't get mangled.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;PackBits RLE Compression (&lt;code&gt;compression = 1&lt;/code&gt;)&lt;/strong&gt;: Raw uncompressed 2K RGBA layers bloat &lt;code&gt;.PSD&lt;/code&gt; files past 30–60 MB. Adding a 35-line Apple PackBits RLE encoder per scanline (with big-endian &lt;code&gt;uint16&lt;/code&gt; per-row byte-count headers) cuts sparse transparent text/badge layers by 70–90% while staying 100% spec-compliant across Photoshop and Photopea.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Merged Composite Image Data&lt;/strong&gt;: Many OS thumbnails (macOS Finder QuickLook, Windows Explorer, Slack previews) read the final merged RGB composite section rather than compositing individual layers on the fly. Writing a PackBits-encoded merged composite at the tail of the buffer makes the file preview cleanly everywhere.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Honest boundary&lt;/strong&gt;: Our &lt;code&gt;.PSD&lt;/code&gt; text layers are isolated transparent raster RGBA layers positioned by exact bounding boxes (accompanied by &lt;code&gt;ocr.json&lt;/code&gt;), not native Photoshop vector &lt;code&gt;TySh&lt;/code&gt; type descriptors. Generating &lt;code&gt;TySh&lt;/code&gt; blocks without matching client font metrics causes Photoshop missing-font substitution dialogs and broken kerning; hiding the isolated raster text layer and placing licensed brand typography inside the exact bounding box proved far cleaner for real agency localization workflows.&lt;/p&gt;

&lt;p&gt;We extracted and open-sourced this pure-JS &lt;code&gt;.PSD&lt;/code&gt; writer under the MIT license (with TypeScript types, binary-structure unit tests, and a Photopea-verified 5-layer sample):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;npm (&lt;code&gt;npm install rgba-to-psd&lt;/code&gt;)&lt;/strong&gt;: &lt;a href="https://www.npmjs.com/package/rgba-to-psd" rel="noopener noreferrer"&gt;npmjs.com/package/rgba-to-psd&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;GitHub (MIT)&lt;/strong&gt;: &lt;a href="https://github.com/hongcsd/rgba-to-psd" rel="noopener noreferrer"&gt;github.com/hongcsd/rgba-to-psd&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Live browser &lt;code&gt;.PSD&lt;/code&gt; Layer &amp;amp; Alpha Inspector (zero upload)&lt;/strong&gt;: &lt;a href="https://huggingface.co/spaces/pandawander/psd-layer-and-alpha-inspector" rel="noopener noreferrer"&gt;Hugging Face Space&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Live AI Poster-to-PSD workflow&lt;/strong&gt;: &lt;a href="https://seeli.ai/image-to-psd" rel="noopener noreferrer"&gt;seeli.ai/image-to-psd&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  2. Zero-OOM 100 MB MP4 Validation &amp;amp; 250 MB 4K Delivery inside 128 MB RAM
&lt;/h2&gt;

&lt;p&gt;Supporting standalone &lt;strong&gt;1080p/4K MP4 upscaling&lt;/strong&gt; (up to 30 seconds / 100 MB uploads) and serving &lt;strong&gt;up to 250 MB 4K UHD renders&lt;/strong&gt; inside Cloudflare Workers requires never buffering a whole video into memory.&lt;/p&gt;

&lt;h3&gt;
  
  
  A. Streaming Multipart Uploads with On-the-Fly SHA-256
&lt;/h3&gt;

&lt;p&gt;When a user uploads an MP4 or we ingest a rendered video from an upstream model, &lt;code&gt;streamToR2WithHash()&lt;/code&gt; pulls chunks from a &lt;code&gt;ReadableStream&amp;lt;Uint8Array&amp;gt;&lt;/code&gt;, accumulates fixed &lt;strong&gt;6 MiB slices&lt;/strong&gt; (clearing R2's 5 MiB multipart minimum with safety margin), updates an incremental SHA-256 digest on each chunk, and flushes via &lt;code&gt;R2.createMultipartUpload&lt;/code&gt; / &lt;code&gt;uploadPart&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Peak memory stays around &lt;strong&gt;~12 MiB&lt;/strong&gt; regardless of whether the file is 8 MB or 240 MB.&lt;/p&gt;

&lt;h3&gt;
  
  
  B. Validating MP4 Duration, Resolution, and Codec via 16-Byte R2 Range Requests
&lt;/h3&gt;

&lt;p&gt;Before quoting credits or forwarding a user-uploaded MP4 to an upscaler, we need to verify:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Real pixel width/height (&lt;code&gt;tkhd&lt;/code&gt; / &lt;code&gt;avc1&lt;/code&gt; / &lt;code&gt;hvc1&lt;/code&gt; / &lt;code&gt;av01&lt;/code&gt; / &lt;code&gt;vp09&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Exact duration (&lt;code&gt;mvhd&lt;/code&gt; / &lt;code&gt;mdhd&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Whether it is a fragmented stream (&lt;code&gt;moof&lt;/code&gt;, which we reject cleanly)&lt;/li&gt;
&lt;li&gt;Whether an audio track is present (&lt;code&gt;soun&lt;/code&gt; / &lt;code&gt;mp4a&lt;/code&gt;)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Normally people reach for &lt;code&gt;ffprobe&lt;/code&gt;. Inside a Worker, &lt;code&gt;mp4InfoFromR2()&lt;/code&gt; walks top-level ISO BMFF boxes using &lt;strong&gt;16-byte R2 Range reads&lt;/strong&gt; (&lt;code&gt;{ offset, length: 16 }&lt;/code&gt;), skips straight over the massive &lt;code&gt;mdat&lt;/code&gt; payload without reading a single byte of video frames, fetches &lt;strong&gt;only the &lt;code&gt;moov&lt;/code&gt; atom&lt;/strong&gt; (typically 20–80 KB, hard-capped at 16 MB), and parses the sample tables (&lt;code&gt;stsz&lt;/code&gt;, &lt;code&gt;stsd&lt;/code&gt;, &lt;code&gt;stco&lt;/code&gt;/&lt;code&gt;co64&lt;/code&gt;, &lt;code&gt;stsc&lt;/code&gt;) in pure TypeScript.&lt;/p&gt;

&lt;h3&gt;
  
  
  C. RFC 9110 Range Streaming (&lt;code&gt;206 Partial Content&lt;/code&gt;)
&lt;/h3&gt;

&lt;p&gt;When serving finished 4K MP4s back to the browser &lt;code&gt;&amp;lt;video&amp;gt;&lt;/code&gt; player, we stream directly from private R2 with proper &lt;code&gt;Content-Range&lt;/code&gt; / &lt;code&gt;Accept-Ranges&lt;/code&gt; (&lt;code&gt;206&lt;/code&gt; and &lt;code&gt;416&lt;/code&gt;) support so scrubbing works smoothly at ~64 KB Worker memory overhead.&lt;/p&gt;




&lt;h2&gt;
  
  
  3. Fail-Closed Dual-Pass Audio + Visual Moderation &amp;amp; Atomic Credit Rebates
&lt;/h2&gt;

&lt;p&gt;Shipping native-audio AI video (&lt;code&gt;Seedance 2.5 Pro&lt;/code&gt;, with first + end frame locking) introduces a subtle safety gap: &lt;strong&gt;visual frame sampling alone cannot detect prohibited speech or audio&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Our delivery gate runs strictly &lt;strong&gt;fail-closed&lt;/strong&gt; before a generated video can be viewed, downloaded, or settled:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Visual Pass&lt;/strong&gt;: Sample frames from the rendered MP4 and run semantic eight-category review.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Audio Pass&lt;/strong&gt;: When native audio is enabled, extract the AAC elementary stream directly from the MP4 &lt;code&gt;stsz&lt;/code&gt;/&lt;code&gt;stco&lt;/code&gt; sample tables (packaging ADTS headers in pure JS — again, no FFmpeg binary!) and send the audio track through safety verification.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Atomic D1 Credit Ledger&lt;/strong&gt;: Every generation reserves credits upfront with a DB-backed lease (&lt;code&gt;lease_id&lt;/code&gt; + &lt;code&gt;lease_until&lt;/code&gt; fencing) and idempotency key. If upstream generation fails, times out into an unrecoverable state, or fails either visual or audio moderation, the reserved credits are &lt;strong&gt;automatically released back to the user's balance&lt;/strong&gt;. For multi-layer &lt;code&gt;.PSD&lt;/code&gt; splits, unused layer credits below the user's chosen max-layer cap are automatically rebated upon delivery.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  Open Benchmark Data (CC BY 4.0)
&lt;/h2&gt;

&lt;p&gt;While building Seeli's pay-as-you-go pricing model (&lt;code&gt;$3.99&lt;/code&gt;–&lt;code&gt;$39&lt;/code&gt; non-expiring packs vs. monthly subscriptions), we compiled verified November 2026 specs across 9 AI video platforms and 5 image-layer export formats. We published the raw UTF-8 CSVs under CC BY 4.0 for anyone comparing unit economics or building calculators:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Zenodo Archive (Permanent DOI &lt;code&gt;10.5281/zenodo.24627782&lt;/code&gt;)&lt;/strong&gt;: &lt;a href="https://zenodo.org/records/24627782" rel="noopener noreferrer"&gt;zenodo.org/records/24627782&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;GitHub Mirror&lt;/strong&gt;: &lt;a href="https://github.com/hongcsd/ai-video-image-models-pricing-2026" rel="noopener noreferrer"&gt;github.com/hongcsd/ai-video-image-models-pricing-2026&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hugging Face Dataset&lt;/strong&gt;: &lt;a href="https://huggingface.co/datasets/pandawander/ai-video-image-models-pricing-2026" rel="noopener noreferrer"&gt;huggingface.co/datasets/pandawander/ai-video-image-models-pricing-2026&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Kaggle Dataset&lt;/strong&gt;: &lt;a href="https://www.kaggle.com/datasets/pandawander/ai-video-and-image-models-pricing-nov-2026" rel="noopener noreferrer"&gt;kaggle.com/datasets/pandawander/ai-video-and-image-models-pricing-nov-2026&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you've built binary media parsers or strict-memory pipelines on Cloudflare Workers, I'd love to hear what edge cases bit you (fragmented MP4s and 64-bit &lt;code&gt;co64&lt;/code&gt; chunk offsets definitely kept me busy!).&lt;/p&gt;

</description>
      <category>architecture</category>
    </item>
  </channel>
</rss>
