<?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: Mentari Rahman</title>
    <description>The latest articles on DEV Community by Mentari Rahman (@mentari92).</description>
    <link>https://dev.to/mentari92</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%2F4281262%2F91bcc9ef-1c5a-44dd-88fd-8b7d547a4a0c.jpg</url>
      <title>DEV Community: Mentari Rahman</title>
      <link>https://dev.to/mentari92</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mentari92"/>
    <language>en</language>
    <item>
      <title>NeoCard: Resurrecting HyperCard 1987 Offline with Kiro CLI</title>
      <dc:creator>Mentari Rahman</dc:creator>
      <pubDate>Thu, 03 Dec 2026 22:14:13 +0000</pubDate>
      <link>https://dev.to/mentari92/neocard-resurrecting-hypercard-1987-offline-with-kiro-cli-52ke</link>
      <guid>https://dev.to/mentari92/neocard-resurrecting-hypercard-1987-offline-with-kiro-cli-52ke</guid>
      <description>&lt;p&gt;&lt;em&gt;Written by Mentari Rahman on December 4, 2026, for the &lt;a href="https://kiroween.devpost.com/" rel="noopener noreferrer"&gt;Kiroween Hackathon 2026&lt;/a&gt; (Resurrection track).&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;NeoCard is an open source offline web app studio built with Kiro CLI that recreates Apple HyperCard from 1987 and compiles interactive card stacks into a standalone HTML app backed by 168 passing Vitest tests. Every exported file preserves 512x342 black and white pixel artwork, square wave browser audio, and branching logic without requiring a server, user account, or internet connection.&lt;/p&gt;

&lt;p&gt;Back in 1987, Apple bundled HyperCard free with every Macintosh so teachers, writers, and creators could ship software simply by linking cards together on a screen. Today, releasing even a tiny interactive tool usually pulls in cloud hosting bills, databases, login flows, and ongoing maintenance. I created &lt;a href="https://neocard.mentarich.com" rel="noopener noreferrer"&gt;NeoCard&lt;/a&gt; during the Kiroween Hackathon 2026 to restore that immediate build loop on the modern web.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Key Takeaways&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;NeoCard turns 512x342 card stacks into one offline HTML document locked with a SHA-256 CSP hash and &lt;code&gt;default-src 'none'&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Pure TypeScript executes user actions without &lt;code&gt;eval()&lt;/code&gt;, verified by 10 Vitest suites totaling 168 tests.&lt;/li&gt;
&lt;li&gt;Combining Kiro CLI spec driven development, Kiro agent hooks, and a custom Model Context Protocol server prevented late regressions.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  What is NeoCard and how does it compare to HyperCard?
&lt;/h2&gt;

&lt;p&gt;NeoCard is a web native card studio styled after Macintosh System 6 that replaces proprietary binary stacks with validated JSON schemas and deterministic HTML export. Creators design in a Classic 1987 black on white palette or toggle Ghostly Modern dark mode while keeping every standalone HTML app portable across desktop and mobile browsers.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Feature&lt;/th&gt;
&lt;th&gt;Apple HyperCard (1987)&lt;/th&gt;
&lt;th&gt;Typical Modern Web App&lt;/th&gt;
&lt;th&gt;NeoCard (2026)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Runtime environment&lt;/td&gt;
&lt;td&gt;Classic Mac OS only&lt;/td&gt;
&lt;td&gt;Cloud hosting and server APIs&lt;/td&gt;
&lt;td&gt;Any browser, online or offline&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Scripting model&lt;/td&gt;
&lt;td&gt;Arbitrary HyperTalk scripts&lt;/td&gt;
&lt;td&gt;Arbitrary JavaScript bundles&lt;/td&gt;
&lt;td&gt;Closed action schema without &lt;code&gt;eval()&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Distribution output&lt;/td&gt;
&lt;td&gt;Binary &lt;code&gt;.stack&lt;/code&gt; file&lt;/td&gt;
&lt;td&gt;Hosted bundle or SaaS URL&lt;/td&gt;
&lt;td&gt;Standalone offline &lt;code&gt;.html&lt;/code&gt; document&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Artwork pipeline&lt;/td&gt;
&lt;td&gt;MacPaint tools and dithering&lt;/td&gt;
&lt;td&gt;External asset build steps&lt;/td&gt;
&lt;td&gt;Integrated 1 bit canvas and Atkinson dither&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Rather than rewriting an entire Macintosh emulator, NeoCard recreates what actually made HyperCard productive: fixed card geometry (&lt;code&gt;512x342&lt;/code&gt;), visual drawing right next to layout controls, and instant movement from editing into live play.&lt;/p&gt;

&lt;h2&gt;
  
  
  How can an offline web app run safely without eval()?
&lt;/h2&gt;

&lt;p&gt;NeoCard keeps user stacks safe by routing every button click, text check, and card jump through a closed declarative action switch written in pure TypeScript (&lt;code&gt;packages/engine/src/engine.ts&lt;/code&gt;). Because zero &lt;code&gt;eval()&lt;/code&gt;, &lt;code&gt;new Function()&lt;/code&gt;, or &lt;code&gt;innerHTML&lt;/code&gt; calls appear anywhere in the runtime, opening an untrusted HTML stack straight from disk cannot inject arbitrary scripts.&lt;/p&gt;

&lt;p&gt;Instead of storing executable JavaScript snippets inside card buttons, each trigger stores structured JSON actions defined against schema version &lt;code&gt;neocard/1&lt;/code&gt;. Checking a terminal password inside the built in &lt;em&gt;Manor of 1987&lt;/em&gt; stack uses this schema format:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;"do"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"goToCardIf"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"fieldId"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"pw"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"op"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"eq"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"value"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"atkinson"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"cardId"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"secret"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"elseCardId"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"denied"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;On the export layer (&lt;code&gt;packages/exporter/src/export.ts&lt;/code&gt;), &lt;code&gt;exportStack()&lt;/code&gt; bundles the prebuilt &lt;code&gt;runtime.iife.js&lt;/code&gt;, inline CSS, and JSON stack payload into one deterministic HTML file, pinning the single inline &lt;code&gt;&amp;lt;script&amp;gt;&lt;/code&gt; tag with its computed SHA-256 hash inside the document &lt;a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/CSP" rel="noopener noreferrer"&gt;Content Security Policy&lt;/a&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;default-src 'none'; script-src 'sha256-...'; style-src 'unsafe-inline'; img-src data:; base-uri 'none'; form-action 'none'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Without &lt;code&gt;'unsafe-eval'&lt;/code&gt;, the browser engine itself refuses &lt;code&gt;eval()&lt;/code&gt; or &lt;code&gt;Function()&lt;/code&gt; calls, while &lt;code&gt;default-src 'none'&lt;/code&gt; blocks every outbound network request even inside an active online browser. Every export runs identically over &lt;code&gt;file://&lt;/code&gt; as it does inside the live studio.&lt;/p&gt;

&lt;h2&gt;
  
  
  How does NeoCard recreate Bill Atkinson 1 bit dithering?
&lt;/h2&gt;

&lt;p&gt;NeoCard converts local photos directly inside your browser using Bill Atkinson error diffusion (&lt;code&gt;packages/paint/src/dither.ts&lt;/code&gt;), spreading quantization error across six neighboring pixels instead of every surrounding pixel. Nothing uploads to a remote API, and bright highlights stay clean rather than turning muddy.&lt;/p&gt;

&lt;p&gt;Floyd-Steinberg dithering diffuses 100 percent of rounding error across four neighbors, which often leaves flat gray midtones speckled with dark dots on coarse 512x342 displays. In &lt;code&gt;atkinsonStep()&lt;/code&gt;, each pixel snaps to pure black (&lt;code&gt;0&lt;/code&gt;) or white (&lt;code&gt;255&lt;/code&gt;), then passes only six eighths (&lt;code&gt;6/8&lt;/code&gt;) of the error forward across fixed offsets (&lt;code&gt;[1,0]&lt;/code&gt;, &lt;code&gt;[2,0]&lt;/code&gt;, &lt;code&gt;[-1,1]&lt;/code&gt;, &lt;code&gt;[0,1]&lt;/code&gt;, &lt;code&gt;[1,1]&lt;/code&gt;, &lt;code&gt;[0,2]&lt;/code&gt;). Deliberately dropping the remaining two eighths produces sharp contrast and crisp white backgrounds around portraits and skies.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fbqmhsuak1m3k74yh3mv1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fbqmhsuak1m3k74yh3mv1.png" alt="NeoCard Studio Photo to 1 bit dialog applying Bill Atkinson error diffusion dithering in Edit mode" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;One honest constraint here is storage size. Each painted card picture is stored as a clean 1 bit bitmap array (roughly &lt;code&gt;29 KB&lt;/code&gt; per painted card) inside the JSON payload rather than a compressed binary blob, keeping the parser simple while making art heavy stacks land around a few hundred kilobytes.&lt;/p&gt;

&lt;h2&gt;
  
  
  How did Kiro CLI spec driven development prevent regressions?
&lt;/h2&gt;

&lt;p&gt;Using &lt;a href="https://kiro.dev" rel="noopener noreferrer"&gt;Kiro&lt;/a&gt; CLI spec driven development together with automated verification hooks kept security and offline guarantees verified continuously rather than waiting for late manual debugging. Across NeoCard's seven TypeScript packages (&lt;code&gt;schema&lt;/code&gt;, &lt;code&gt;engine&lt;/code&gt;, &lt;code&gt;paint&lt;/code&gt;, &lt;code&gt;exporter&lt;/code&gt;, &lt;code&gt;samples&lt;/code&gt;, &lt;code&gt;mcp&lt;/code&gt;, and &lt;code&gt;apps/studio&lt;/code&gt;), four structured layers inside &lt;code&gt;.kiro/&lt;/code&gt; held the build steady.&lt;/p&gt;

&lt;p&gt;I will admit that pausing to write structured specs before building buttons felt slow during the first couple of hours. Once the Kiro agent hooks started running automatically in the background, however, the time saved became clear:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Steering documents inside &lt;code&gt;.kiro/steering/&lt;/code&gt; (&lt;code&gt;product.md&lt;/code&gt;, &lt;code&gt;architecture.md&lt;/code&gt;, and &lt;code&gt;aesthetic-1bit.md&lt;/code&gt;) carried constraints into every Kiro CLI session: authentic &lt;code&gt;512x342&lt;/code&gt; proportions, 1 bit bitmap rendering, offline portability, and zero dynamic code execution.&lt;/li&gt;
&lt;li&gt;Five feature specs inside &lt;code&gt;.kiro/specs/&lt;/code&gt; (&lt;code&gt;stack-engine&lt;/code&gt;, &lt;code&gt;paint-dither&lt;/code&gt;, &lt;code&gt;exporter&lt;/code&gt;, &lt;code&gt;neocard-mcp&lt;/code&gt;, and &lt;code&gt;studio&lt;/code&gt;) documented edge cases across &lt;code&gt;requirements.md&lt;/code&gt;, &lt;code&gt;design.md&lt;/code&gt;, and &lt;code&gt;tasks.md&lt;/code&gt; upfront. Defining numeric field parsing, rounding rules, and CSP hashing inside specs prevented shortcuts when implementing the studio UI.&lt;/li&gt;
&lt;li&gt;A &lt;code&gt;PostFileSave&lt;/code&gt; hook in &lt;code&gt;.kiro/hooks/vitest-on-edit.json&lt;/code&gt; automatically executed &lt;code&gt;npx vitest run --reporter=dot&lt;/code&gt; whenever TypeScript files inside &lt;code&gt;packages/&lt;/code&gt; or &lt;code&gt;apps/studio/src/lib/&lt;/code&gt; changed. Every save immediately verified all 10 Vitest suites totaling 168 passing tests, including static AST checks inside &lt;code&gt;no-dynamic-code.test.ts&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Wiring a custom stdio server implementing the &lt;a href="https://modelcontextprotocol.io/" rel="noopener noreferrer"&gt;Model Context Protocol&lt;/a&gt; (&lt;code&gt;neocard-mcp&lt;/code&gt; via &lt;code&gt;.kiro/settings/mcp.json&lt;/code&gt;) confirmed that agent tooling and interactive editors could share the exact same validation pipeline.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  How does the custom neocard-mcp server build apps over stdio?
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;neocard-mcp&lt;/code&gt; server exposes five deterministic Model Context Protocol tools (&lt;code&gt;scaffold_stack&lt;/code&gt;, &lt;code&gt;validate_stack&lt;/code&gt;, &lt;code&gt;describe_stack&lt;/code&gt;, &lt;code&gt;list_samples&lt;/code&gt;, and &lt;code&gt;export_stack&lt;/code&gt;) over standard input and output so Kiro CLI generates verified standalone HTML applications directly from schema templates.&lt;/p&gt;

&lt;p&gt;During Kiroween Hackathon 2026 development, invoking &lt;code&gt;neocard-mcp&lt;/code&gt; inside Kiro CLI followed four direct steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Run &lt;code&gt;scaffold_stack&lt;/code&gt; to assemble valid &lt;code&gt;neocard/1&lt;/code&gt; cards, buttons, hidden score fields, and &lt;code&gt;goToCardIf&lt;/code&gt; triggers from a specification prompt.&lt;/li&gt;
&lt;li&gt;Inspect link targets automatically through &lt;code&gt;validate_stack&lt;/code&gt;, catching broken card transitions or orphaned rooms before compiling HTML.&lt;/li&gt;
&lt;li&gt;Preview readable card summaries using &lt;code&gt;describe_stack&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Output one standalone file through &lt;code&gt;export_stack&lt;/code&gt;, producing the dark theme fourth example stack &lt;code&gt;examples/halloween-escape.html&lt;/code&gt; (playable offline from disk).&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  What can you test inside NeoCard Studio right now?
&lt;/h2&gt;

&lt;p&gt;NeoCard opens directly into three built in applications alongside MacPaint pixel tools, local photo conversion, Card Map graph checking, and Web Audio 880 Hz square wave audio cues.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fp5ck7iot6qa5t04u0asw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fp5ck7iot6qa5t04u0asw.png" alt="NeoCard Card Map dialog verifying 12 linked cards and zero broken links inside Manor of 1987" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Manor of 1987&lt;/strong&gt; gives players a 12 card mystery game featuring traveler name interpolation, a password terminal (&lt;code&gt;atkinson&lt;/code&gt;), inventory items, courage tracking, and an encounter inside the cellar that triggers Ghostly Modern mode.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;GrimLedger Mini&lt;/strong&gt; builds on seven years I spent writing about personal finance, tallying monthly, yearly, and five year zombie subscription bleed locally and generating a copyable cancellation letter.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Offline Science Lab&lt;/strong&gt; presents a five question science quiz designed to work inside classrooms without internet access.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Edit Mode and Card Map&lt;/strong&gt; let creators paint with 12 classic 1 bit patterns, convert photos locally via Atkinson dithering, and verify across every card edge that zero broken links or unreachable cards exist before clicking Export Offline HTML.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/8XSDUeJlyi4" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  Frequently asked questions about NeoCard
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Does an exported NeoCard HTML file really work without internet?
&lt;/h3&gt;

&lt;p&gt;Yes. Exporting bundles the compiled runtime, inline styles, Web Audio square wave oscillator (&lt;code&gt;880 Hz&lt;/code&gt;), bitmap artwork, and validated JSON data into one HTML file pinned with &lt;code&gt;default-src 'none'&lt;/code&gt;. Opening the downloaded file locally via &lt;code&gt;file://&lt;/code&gt; with Wi-Fi off runs every card and button identically.&lt;/p&gt;

&lt;h3&gt;
  
  
  Where can I inspect the source code and Kiro CLI setup?
&lt;/h3&gt;

&lt;p&gt;All seven workspace packages, the MIT license, the &lt;code&gt;Halloween Escape&lt;/code&gt; MCP export, and all 20 &lt;code&gt;.kiro/&lt;/code&gt; specification, steering, hook, and MCP files live publicly at &lt;a href="https://github.com/mentari92/neocard" rel="noopener noreferrer"&gt;github.com/mentari92/neocard&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Can anyone try NeoCard without installing tools?
&lt;/h3&gt;

&lt;p&gt;Yes. Visit &lt;a href="https://neocard.mentarich.com" rel="noopener noreferrer"&gt;neocard.mentarich.com&lt;/a&gt; in any modern browser to play all three built in stacks, test Bill Atkinson dithering, or export your own standalone offline web app without creating an account.&lt;/p&gt;

</description>
      <category>kiro</category>
      <category>typescript</category>
      <category>webdev</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
