Live demo: https://quietstack-labs.github.io/ghostcities/
Code (MIT, /.kiro at root): https://github.com/quietstack-labs/ghostcities
Category: Resurrection

Inspiration

In 1999 the web was personal. Millions of people built strange, sincere homepages on GeoCities, sorted into "neighborhoods", decorated with marquees, blinking text, hit counters, guestbooks and webrings. Yahoo! shut GeoCities down in 2009 and most of that web went dark. Kiroween asked us to bring dead tech back to life, and the thing we missed most was not a protocol but a feeling: making a silly page about the thing you love in five minutes and having it be yours. Modern browsers can now run a language model locally, so the "I don't know what to write" barrier can disappear without sending anything to a server.

What it does

GhostCities is a haunted homepage builder that runs entirely in the browser.

  1. Claim a plot. Pick one of five haunted neighborhoods (CryptValley, HauntedHollywood, Area51-Graveyard, SunsetCemetery, WitchesHeartland), each with its own palette, fonts and tiled starfield.
  2. Describe your page in one line. "My page about my cat who is a vampire."
  3. Raise it. When Chrome's built-in Prompt API (Gemini Nano) is available, it writes the title, welcome text, about-me, favourite links and marquee as JSON constrained by a schema. Without it, a seeded offline generator writes a page about the same subject; the same input always gives the same page.
  4. Decorate. Every 1999 widget is back: a CSS marquee, a CSS-revived <blink>, an under-construction banner, an odometer hit counter, a guestbook, a 13-site webring, a bat cursor trail and a square-wave chiptune that stays muted until you click. Toggle any widget, switch neighborhoods without losing your copy, and click any text to rewrite it in place.
  5. Haunt the web. Share the page as a link (the whole page is deflate-compressed into the URL hash, so nothing is uploaded) or export a single self-contained .html file that works offline, forever.

Safety and access: all AI and user text is escaped, links are limited to http(s), shared links are schema-validated before anything renders, and reduced-motion and high-contrast modes are built in.

How we built it with Kiro

We used Kiro as the spec engine and as an implementer, and kept everything it produced in /.kiro.

  • Steering. From a one-page brief, Kiro CLI wrote product.md, tech.md and structure.md (all inclusion: always): vanilla ES modules, no build step, node --test, a strict line between pure modules and browser-only code.
  • Spec-driven development. Kiro wrote the ghostcities-builder spec: requirements.md with 15 user stories and 56 acceptance criteria in EARS form ("WHEN a URL in the Favourite Links list is rendered, THE SYSTEM SHALL reject any URL whose scheme is not http: or https:"), design.md with the PageModel JSON schema, module signatures, the Prompt API prompt and response schema, the security model and a test plan, and tasks.md with 26 tasks, each linked to requirements.
  • Agent + hooks. A custom Kiro agent (.kiro/agents/ghostcities.json) loads the steering and spec as resources. Its postToolUse hook runs npm test after every file write. With it, Kiro implemented tasks 1โ€“16: the scaffold, the eight pure modules (seeded RNG, model validation and sanitisation, generator, renderer, share codec, hit counter, webring, Prompt API wrapper) and 100 unit tests, all green.
  • IDE hooks. .kiro/hooks/ contains a run-tests-on-save hook, an XSS-guard hook that audits renderer changes against Requirement 14, and a spec-sync hook that ticks tasks.md as tests land.
  • Review. We ran the XSS-guard audit through Kiro over the finished app. It found a real defense-in-depth gap: the renderer trusted callers to have sanitised link URLs. We applied its patch and added regression tests (docs/kiro-sessions/03-security-review.md).
  • Vibe coding on top of the spec. The browser layer (app shell, effects, export, themes) was written against Kiro's tasks 17โ€“23 with an AI coding assistant. Wherever reality diverged from the design (current Prompt API availability values, a simpler deterministic webring, a new pure export.js module), we wrote it back into design.md ยง8 so the spec stayed the source of truth.

Result: 113 passing tests, all 26 tasks ticked, GitHub Actions CI, no build step and no runtime dependencies.

Challenges we ran into

  • Determinism versus "regenerate". Requirement 4.2 says the same input must give byte-identical output, but users want a fresh variant. We vary the seed with trailing "!" characters that the subject extractor strips, so each variant stays about the same subject and remains reproducible.
  • Reviving <blink> and <marquee> honestly. Both are dead or deprecated. We rebuilt them as CSS animations that pause on hover and switch off under prefers-reduced-motion.
  • Untrusted text everywhere. AI output, guestbook entries, inline edits and shared URLs are all attacker-controlled. Kiro's EARS requirements made each path explicit and testable.
  • One offline file. The export inlines every stylesheet and a tiny runtime that only writes with textContent, and neutralises </style> break-outs.

Accomplishments that we're proud of

  • A complete, deployable product with zero servers, zero accounts and zero runtime dependencies.
  • A spec you can read top to bottom, 56 EARS criteria traced to tasks and tests, kept in sync with the code.
  • A Kiro security review that found a real issue, fixed with tests.
  • Exported pages that will keep working offline long after any hosting is gone, which is the lesson GeoCities taught.

What we learned

Spec-first works best when the spec is allowed to change. Writing deviations back into design.md cost minutes and kept Kiro's later passes (such as the security review) accurate. EARS also turns "make it safe" into statements a test can check.

What's next for GhostCities

  • A real webring of user pages through an opt-in static index (still no backend: a GitHub-hosted JSON ring).
  • "Under construction" GIF and MIDI packs drawn from public-domain archives.
  • Publishing an export straight to Neocities, GeoCities' spiritual successor.
  • WebLLM as a second on-device AI path for browsers without the Prompt API.

Built With

Share this project:

Updates

Submission history