HyperCard, raised from the dead.
HyperCrypt is a browser-native stack builder for haunted interactive stories. Lay out 1-bit cards on a fixed 512×342 canvas, wire them together with a HyperTalk-style language, and share the finished stack as a single link. No account, no server, no install.
Built for Kiroween 2026 — Resurrection.
Play the live demo · Kiro project kit · MIT licensed
HyperCard made programming feel like arranging index cards. HyperCrypt brings that immediacy to the web, with a two-colour Macintosh palette and a haunted-house theme. A stack is a deck of cards. Cards hold named parts — buttons, fields, text, rectangles, and pixel art. Parts and cards hold scripts. The player runs them. A share link carries the whole deck in its URL fragment.
The repository ships two playable stories:
- The Hollow House — a seven-card puzzle. Find the candle, learn the attic password, and reach one of two endings. The house remembers your name.
- The Locked Door — a two-card starter haunting. The password is
RAVEN.
- Fixed 512×342 card canvas with nine background patterns and a bone/midnight palette.
- Buttons, fields, text, rectangles, and pixel-art parts with drag, resize, lock, duplicate, and delete.
- Card add/duplicate/delete/reorder, start-card selection, and per-card scripts.
- Part inspector for name, content, geometry, font, size, alignment, bold, invert, and border.
- Undo/redo with bounded history and 500 ms autosave.
- Playtest the current snapshot without leaving the editor.
- Export/import JSON, share links, and a restore-originals escape hatch.
- Faithful 1-bit rendering with CRT scanlines, a bezel, and an optional synthesized soundscape.
- Click handlers,
openCardhandlers, fields, variables, part visibility, and conditional logic. - Message box for
answerand script errors. - Back/next/first/last, reset, sound, and share.
- Shared-link banner with Save a copy.
- Mobile-friendly layout with no horizontal overflow at 390px.
on click
if var "candles" is 0 then
answer "It is too dark to see."
else
go to card "The Attic"
end if
end click
Supported: on click / on openCard, go to card, go next/prev/first/last, put ... into field/var, add / subtract, show/hide part, answer, play, if/else, comparisons, boolean
logic, concatenation, arithmetic, and parentheses. See the in-app Script Help for the full
reference.
- The entire stack is compressed with lz-string into a
#/s/...URL. - A share link opens on a clean browser with no library.
- The recipient can save a copy to their own library.
- Hash routing means it works on GitHub Pages with no server rewrites.
Requirements: Node 22+ and npm.
git clone https://github.com/alvanai/hypercrypt.git
cd hypercrypt
npm install
npm run devOpen the printed local URL (usually http://localhost:5173).
| Command | What it does |
|---|---|
npm run dev |
Vite dev server with HMR |
npm run build |
Type-check and build dist/ |
npm run preview |
Preview the production build |
npm run test |
Run Vitest once |
npm run verify |
Type-check and run the full test suite |
npm run lint |
Lint src with oxlint |
npm run validate:stacks |
Validate the bundled sample stacks (post-MVP Kiro task) |
npm run deploy |
Build and publish dist/ to the gh-pages branch |
Spoiler-light:
- Open the library and choose PLAY on The Hollow House.
- Explore the rooms. Pick up what the house offers.
- The attic wants a word. The house has been dropping hints.
- The ending changes based on what you carry and who you told the house you are.
- RESET starts the haunting over.
The Locked Door is the short tutorial: the password is RAVEN.
src/
├── components/ React surfaces: Library, Player, Editor, CardScreen, dialogs
├── data/samples.ts The Hollow House and The Locked Door
├── hooks/useScale.ts Canvas fit/width scaling
├── lib/
│ ├── script/ tokenizer → parser → interpreter + Vitest/fast-check tests
│ ├── model.ts factories, cloning, defaults, ids, clamping
│ ├── validate.ts trust boundary for localStorage/import/share JSON
│ ├── storage.ts localStorage library, seeding, import/export, restore
│ ├── share.ts hash routes + lz-string share links
│ ├── backgrounds.ts nine CSS background patterns
│ ├── sprites.ts pixel-art registry
│ └── sound.ts WebAudio blips
├── styles/ base, library, screen, player, dialogs, editor, responsive
├── App.tsx hash-route switch and app flows
└── types.ts data model + 512×342 canvas constants
The stack is a plain JSON document. The editor mutates a clone in memory and autosaves it. The
player creates a runtime session (current card, fields, variables, visibility, history) and runs
scripts through ScriptServices. There is no backend and no runtime network request.
The root .kiro/ directory is part of the submission:
- Steering — product pillars, technology constraints, structure, the HyperTalk contract, visual rules, and testing expectations.
- Specs — the as-built
hypercrypt-mvpspecification and the activestack-healthspec for the Kiro implementation pass. - Hooks — verify on TypeScript save, production build on agent stop, session context on start, and a PreToolUse guard that protects steering/hooks from silent rewrites.
- Agent —
stack-doctor, a focused maintainer profile. - Power — an optional local power with the
stack-healthskill.
The core app — engine, data layer, UI, styles, and QA — was built in OpenCode. The genuine Kiro
pass implements the additive stack-health feature (health report, tests, editor panel) using the
spec, steering, hooks, and agent above. The submission write-up distinguishes the two passes; no
claim is made that Kiro wrote code it did not write.
The health check (checkStack in src/lib/health.ts) reports structural errors, script parse errors, dead go targets, and quiet warnings. Run it from STACK > HEALTH > RUN CHECK in the editor, or run npm run validate:stacks to check the bundled samples. The editor panel was code-complete and covered by unit tests; it has not yet had a manual browser pass at 1440px and 390px.
npm run verify # tsc -b + 18 engine tests (including fast-check)
npm run build # production build
npm run lint # oxlint srcManual QA covers the full Hollow House playthrough, share-link round-trip on a clean profile,
editor autosave/reload/playtest, import/export, restore originals, and 1440px/390px layouts. The
screenshots in screenshots/ are from those passes.
The site is deployed to GitHub Pages:
npm run deployvite.config.ts uses base: './' and the app uses hash routing, so the build works from the
/hypercrypt/ project path without server rewrites. To enable Pages manually, set the source to the
gh-pages branch at the repository root.
MIT © 2026 Allan (alvanai).
HyperCrypt is a fan revival, not affiliated with Apple or the original HyperCard. All pixel art, code, and sample stories in this repository are original work.
