<?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: caiminqian</title>
    <description>The latest articles on DEV Community by caiminqian (@clm215286721).</description>
    <link>https://dev.to/clm215286721</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%2F4283013%2Fa355dc18-7137-420f-858c-38dc151c68ad.jpg</url>
      <title>DEV Community: caiminqian</title>
      <link>https://dev.to/clm215286721</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/clm215286721"/>
    <language>en</language>
    <item>
      <title>One Scaffold, Two Apps: Building Skeleton Key with Kiro</title>
      <dc:creator>caiminqian</dc:creator>
      <pubDate>Fri, 04 Dec 2026 14:42:54 +0000</pubDate>
      <link>https://dev.to/clm215286721/one-scaffold-two-apps-building-skeleton-key-with-kiro-4ojn</link>
      <guid>https://dev.to/clm215286721/one-scaffold-two-apps-building-skeleton-key-with-kiro-4ojn</guid>
      <description>&lt;p&gt;&lt;em&gt;Our Kiroween 2026 (Skeleton Crew) build log — what we specced, what Kiro caught, and what we actually shipped.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The bet
&lt;/h2&gt;

&lt;p&gt;Most starter templates give you one app with everything bolted on. For Kiroween's Skeleton Crew category — two separate applications in one repository — we made the opposite bet:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;One small, boring scaffold package should be able to produce two apps with genuinely different shapes, without either app depending on the other.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The scaffold (&lt;code&gt;packages/scaffold&lt;/code&gt;) holds exactly three things:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;a fixed-window &lt;strong&gt;rate limiter&lt;/strong&gt; with an injected clock,&lt;/li&gt;
&lt;li&gt;an RFC 4180-style &lt;strong&gt;CSV parser&lt;/strong&gt;,&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;bearer-token auth&lt;/strong&gt; with constant-time comparison.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And it has &lt;strong&gt;zero dependencies&lt;/strong&gt; — no Next.js, no React, no native modules. That constraint sounds pedantic until you install the apps: each one is referenced via a &lt;code&gt;file:&lt;/code&gt; dependency (a symlink), so if the scaffold imported anything native, a clean clone that installed only one app would fail at runtime. Keeping the scaffold dependency-free is what makes "install one app, run one app" a real promise instead of a slogan.&lt;/p&gt;

&lt;p&gt;The two apps:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Boo Board&lt;/strong&gt; — a public message wall. Many small writes, many reads. Posts are validated and rate-limited, stored in SQLite, refreshed by 5-second polling.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cauldron&lt;/strong&gt; — a CSV data dashboard. One batch write, many reads. An admin imports sales data through a token-protected endpoint; readers get live aggregates, a chart, and a table, server-rendered per request.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;What is cheap to copy — twelve lines of SQLite setup, a Tailwind entry, an ESLint config — we copied, visibly, into both apps. What would couple the apps permanently, we shared, once.&lt;/p&gt;

&lt;h2&gt;
  
  
  Specs before code
&lt;/h2&gt;

&lt;p&gt;Everything in the repo is organized the Kiro way:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;.kiro/specs/&lt;/code&gt; — requirements → design → tasks for &lt;strong&gt;both&lt;/strong&gt; apps, plus a reusable spec template with an acceptance-criteria pattern.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;.kiro/steering/&lt;/code&gt; — the decisions that would otherwise live in someone's head: scope limits, version pins, directory rules, and one rule we leaned on constantly — &lt;em&gt;never state a result you did not measure&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;.kiro/hooks/&lt;/code&gt; — a save hook (format + three typechecks) and a task-completion hook (repo guard + lint + unit tests + the property-based test).&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;.kiro/agents/reviewer.md&lt;/code&gt; — a read-only reviewer agent.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Kiro also reviewed and revised our build plan against the official Kiroween rules before we wrote production code — prize structure, submission requirements, deadlines — and later ran a structured verification checklist against the repository.&lt;/p&gt;

&lt;h2&gt;
  
  
  The bug the chain caught
&lt;/h2&gt;

&lt;p&gt;The moment that sold us on spec-driven development: we ran Kiro's full spec → design → tasks → code chain on a minimal standalone Boo Board page to validate the workflow end to end.&lt;/p&gt;

&lt;p&gt;The first generated version &lt;strong&gt;failed 7 of 8 tests&lt;/strong&gt;. The chain had found a real bug — rejected posts were consuming rate-limit slots, because the code rate-limited &lt;em&gt;before&lt;/em&gt; it validated. A post that was going to be rejected with a 400 still used up one of the client's five posts per minute.&lt;/p&gt;

&lt;p&gt;The fix — &lt;strong&gt;validate before rate-limiting&lt;/strong&gt; — made it 8/8, and the same ordering is what the production rate limiter uses today. The git history of that run, including the failing test, is preserved in the repo under &lt;code&gt;docs/kiro/&lt;/code&gt;. We're explicit about the scope: that run validated the workflow on a minimal page; the production apps' own specs live in &lt;code&gt;.kiro/specs/&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Verification is a feature
&lt;/h2&gt;

&lt;p&gt;Two more war stories, both found by measuring instead of assuming:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;The CI that rendered but never hydrated.&lt;/strong&gt; Next.js 16's dev server only allows localhost-family origins for dev resources. Our Playwright base URL was &lt;code&gt;127.0.0.1&lt;/code&gt;, so the HMR websocket got a 403 and the page never became interactive — SSR HTML looked perfect while every click was dead. An A/B experiment (localhost vs. 127.0.0.1) isolated it; the fix was one line: &lt;code&gt;allowedDevOrigins: ["127.0.0.1"]&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The health check that 404'd.&lt;/strong&gt; Both apps serve under a basePath in a single container behind a zero-dependency Node reverse proxy. The proxy's health rewrite initially dropped the basePath prefix, so every health check failed — the kind of bug you only find by actually running the container, which our &lt;code&gt;verify-deploy.sh&lt;/code&gt; now does on every check.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The rest of the safety net: one property-based test where it matters (the rate limiter, fuzzed with arbitrary request sequences against an injected clock), one Playwright end-to-end case (post a message, see it appear without a reload), and GitHub Actions running each app in its own job from its own lockfile — plus a repo-guard job that fails the build if &lt;code&gt;.kiro&lt;/code&gt; is ever git-ignored.&lt;/p&gt;

&lt;h2&gt;
  
  
  Ship it
&lt;/h2&gt;

&lt;p&gt;Both apps deploy as &lt;strong&gt;one Docker container&lt;/strong&gt; on Render's free tier:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Live app: &lt;a href="https://skeleton-key.onrender.com" rel="noopener noreferrer"&gt;https://skeleton-key.onrender.com&lt;/a&gt;
(&lt;code&gt;/boo-board&lt;/code&gt; and &lt;code&gt;/cauldron&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Code: &lt;a href="https://github.com/caiminqian/skeleton-key" rel="noopener noreferrer"&gt;https://github.com/caiminqian/skeleton-key&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Demo video: &lt;a href="https://www.youtube.com/watch?v=lFIBtRyKEeg" rel="noopener noreferrer"&gt;https://www.youtube.com/watch?v=lFIBtRyKEeg&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;One scaffold, two apps, zero glue code repeated. Spec it, generate it, ship it.&lt;/p&gt;

&lt;p&gt;— Limin Cai, Kiroween 2026&lt;/p&gt;

</description>
      <category>typescript</category>
      <category>kiro</category>
      <category>nextjs</category>
      <category>hackathon</category>
    </item>
  </channel>
</rss>
