Inspiration

Most timers show a number, and most Halloween skins are paint over a normal interface. The Costume Contest asks for spooky design elements that "enhance your app's function", so the idea was to make that literal: a timer in which the spooky things are the readings. The premise is a lighthouse keeper's last candle. Keep it lit until the watch ends; whatever you leave unwatched comes back as a ghost.

What it does

You light a candle for a focus session of 15, 25 or 50 minutes, or any length from 5 to 90, and you may write one line saying what the candle is for. Then the room tells you everything:

Element Shows Behaviour
The candle Time left Wax height is exactly the fraction of the session left. A drip runs down the front at each quarter.
The flame Session state Steady while lit; small and blue while paused; gutters in the last minute; smoke when out.
The room's light Progress The pool of light shrinks with the wax, and the moon crosses the window. The room is darkest just before the end.
Ghosts Distractions One ghost each time you leave the tab, sized by how long you were away. The newest 12 are drawn, then "+n".
The spider Pause allowance used It waits in its web. While you are paused it lowers on its thread as the 10 minutes run out.
The graveyard Abandoned sessions Each one leaves a gravestone carved with its intent and date.
The shelf Finished sessions Each one leaves a candle stub, one shelf per day.
The dawn Completion The room fills with early light and a short chime plays: "The watch is over. Morning."

The rule behind the table is the project's one design rule: the costume is the function. Take the costume off and nothing is left to read.

The sky over the graveyard follows the same rule. The lighthouse lamp is lit unless your last session was let go dark. The moon's phase is how many of the last seven days had a finished session. Each bright star is a session you finished today, and a new one arrives as a falling star.

The same information is always available without the picture. The time left is shown as text, in the page title and to screen readers. Everything works from the keyboard alone (Enter lights, Space pauses, Esc lets it go dark), focus is always visible, the colours meet WCAG AA contrast, and reduced motion gets a still version that shows the same state. Giving up asks first: "Let it go dark?" opens with "Keep burning" focused, and the candle keeps burning while you decide.

It is a static site with no accounts, no tracking and no server. The app makes no network calls; sessions, history and settings live in the browser's localStorage. Three short sounds are made in code with Web Audio and can be switched off.

How we built it

  • A pure engine. The session logic is one function shape, (state, event, now) -> state. It never touches the DOM, storage or the clock, and a test fails if the engine source mentions them.
  • Time from timestamps, not ticks. Time left is computed from the timestamps of start, pause and resume. A throttled tab or a sleeping laptop cannot make the timer drift.
  • An SVG scene driven by CSS variables. The scene reads a handful of numbers (wax height, drips, flame look, light radius, dawn) and draws them. No UI framework, strict TypeScript, no runtime dependencies.
  • Tests. 1,792 unit and property tests in 142 files (51 of them property files, at least 300 runs per property with fast-check) and 834 end-to-end tests in Playwright with a faked clock. Each spec ends with a mutation check: break the code on purpose and see which test fails.
  • Budgets that are tested. The built JavaScript and CSS are 170,273 bytes against a ceiling of 185,000, the fullest scene is 518 elements against 560, and frame time on the GPU at 1920 x 1080 is measured at a 16.7 ms median against a 17.5 ms limit.
  • Hosting. One free Render static site built from main. render.yaml holds the only copy of the security and cache headers, under a strict Content-Security-Policy; tests read that file, and a smoke suite checks the live site.
  • Kiro. Eleven specs, four steering docs, a read-only reviewer agent, one power and three Kiro surfaces (CLI, IDE and Web). The repo's KIRO_USAGE.md has 100 dated entries of what was asked, what Kiro produced and what was changed by hand.

Challenges we ran into

  • Proving a drawing. "The wax is the time left" is easy to say and easy to get slightly wrong. The drawn candle height is checked by a property against the engine's fraction, and a one-character mutant in the drip rule (<= to <) was caught only by an example until a "quarter marks" property was added.
  • A browser clock race. The end-to-end fixtures installed a fake clock five seconds early and let it run during page load; a slow load threw "Cannot fast-forward to the past". Fixed at the cause (pause first, load, then run forward) and proven with 30 identical readings and five clean full runs.
  • The host set a header the design also set. The first live smoke run was 10 of 11: Render sends its own Strict-Transport-Security. The rule came out of the Blueprint, a test keeps it out, and the run went to 12 of 12.
  • Keeping the rule when art arrived. The first rule was "nothing is only decoration". Adding a real room (stone wall, table, window, wooden Door, shelves) meant amending it to allow a still setting only where the candle's or the window's light falls on it.
  • The project's own test banned the spider. A test forbade stock Halloween words so nothing could be added as an ornament. When the spider was given a job (the pause allowance), the first draft called it a "corner web" to get past that test. Kiro then stopped and asked. The stand-in was rejected, and the rule was amended in steering: a familiar Halloween figure is allowed only when it shows one piece of state.
  • Twelve ghosts and new furniture. After the room got a bigger window, a Door and shelves, a property test found 36 small screen sizes where twelve ghosts no longer fitted. The furniture gives way first: the book shelf is left out there, then fewer ghosts are drawn and the "+n" mark counts the rest.
  • A black spider in a dark room. Under the room's night layer no outline gave the spider 3:1 contrast in real pixels (the best was 2.62:1). It was moved above that layer and given a thin pale edge, and now measures at least 3.37:1 in every state.

Accomplishments that we're proud of

  • The rule held against the tool's own output. The reviewer agent suggested a wall grain, Kiro built it, and the agent's next pass ruled it "decoration" because it showed no state. It was removed, and a test fails if it returns.
  • Every row of the element table is live, and each one is a measurement a person can read at a glance.
  • The whole product works by keyboard, by touch, with reduced motion and at phone size, and the repo holds 99 screenshots that show it.
  • A property test found a real bug no example had: a time of 5e-324 ms made formatTime show 00:00 for a positive time. One clamp fixed it.

What we learned

  • A design rule is worth more when something enforces it. The reviewer agent and the property tests did; the hooks, which could only run a check and not block on it, did not.
  • Asking Kiro for open questions before a design surfaced real gaps in the brief (the break after a session fitted none of the planned states).
  • Specs can amend each other cleanly if each change is a numbered request marked in the document it touches.
  • Looking at screenshots finds things tests do not: an unlabelled field, the wrong first-visit line on a phone, a spider that read as a white ring.

What's next for Candlewatch

  • The last dated smoke check of the live site, on or after Jan 29, 2027 (the pre-submission check passed 12 of 12 on Dec 2, 2026).
  • Real-device listening checks for the three sounds, and a pass on Safari and a mobile browser.
  • An export of the graveyard and shelf, so the history is not tied to one browser.

Built With

Share this project:

Updates

Submission history