Dominic Tapangea
All projects

Habit Quests

Technical assignmentSolo project · technical assignment

A rebuild of a retired habit tracker: everyday tasks become quests that earn XP, levels and daily streaks. The API matches the original app on all 68 recorded requests.

About the project

A rebuild of a retired habit tracker. Everyday tasks become quests: finishing one earns XP, XP fills levels, and completing something every day builds a streak with a daily bonus.

The API matches the old app on all 68 recorded requests, and the web app on top of it shows the score as rolling pinball reels, a bonus ladder and a calendar of lit days.

What it does

  1. 01

    Matches the original, request by request

    A test replays all 68 recorded requests against the real API on a fresh database and compares every status and every body.

  2. 02

    Rules read from the recording

    Late completions, the daily bonus, level thresholds and streaks were worked out from the recorded numbers and documented with line references.

  3. 03

    Exact undo

    XP, levels and streaks are never stored. They are recomputed from the completions on every request, so undoing one also fixes the bonuses of every later day.

  4. 04

    Optimistic but truthful UI

    A click moves the reels, the bar and the calendar at once, then the page swaps in the server's own numbers when it answers.

  5. 05

    Runs with one command

    Docker Compose, or npm start with only Node.js installed. 176 API tests and 75 UI tests.

How it's built

API
FastifyTypeScriptSQLite (built into Node)
Web
Next.js
Tests
Recording replayUnit and API tests
Run
Docker Compose

Next project

VAT Identifier Discovery