创网头像创网PRODUCT & NOTES
Menu

Elsewhere / Settings

← Back to projects
PROJECT · 17

ITERATE

A PWA that puts daily discipline and the software's own releases on one co-evolution timeline.

ITERATE interface preview
Status
Live · v0.2.2
Role
Product design, frontend engineering, release iteration
Duration
Ongoing
Year
2026
v0.2.2live build · sixth release
3 ringsfitness / learning / discipline
PWAinstallable · offline
CASE STUDY
ProductPWAReact

The problem

Most habit trackers record what the person did: streaks, badges, weekly recaps. What the software itself did—version by version—stays inside a changelog, disconnected from the life using it. Iterate puts both on one line: the daily record (fitness, learning, habits, a one-line reflection) and the product’s own release history (v0.1.0 through v0.2.2).

One timeline, two kinds of versions

The co-evolution log is the product’s central screen. On one side is the person’s version—Lv.1 germination to Lv.7 growth rings, driven by cumulative active days. On the other is the software’s version: currently v0.2.2 · Vault, the sixth release. Each release card automatically totals the fitness sessions, learning hours, habit checks, active days and reflections completed during that version’s lifetime. None of those numbers are written by hand; they are derived from a single AppData document. Placed side by side, “continuous iteration” stops being a slogan and becomes something you can check release by release.

Interface and engineering

The interface follows Apple HIG: light and OLED-black themes, Apple Fitness-style three-colour concentric rings (fitness coral / learning blue / discipline green), a desktop Bento Grid with a frosted sidebar, and a floating glass tab bar with sheets on mobile. The stack is React 19, TypeScript in strict mode, Vite, Tailwind CSS 4 and PWA—manifest, service worker, add-to-home-screen, offline production builds. Routing is a zero-dependency location.hash router; state is React Context plus derived values, with no extra state library.

The seam that made cloud sync cheap

The app persists exactly one aggregate root, AppData; ring percentages, streaks, heatmap and per-release stats are all derived from it. Storage sits behind an asynchronous StorageAdapter interface—even though localStorage is synchronous, every method returns a Promise. v0.1.0 used localStorage with JSON export and import. v0.2.0 swapped the same interface for Supabase: one JSONB row, cloud as the source of truth, local cache retained as an offline fallback and cross-tab channel. The views and hooks did not change. v0.2.2 added Supabase Auth above that adapter: each account now owns one row keyed by its UID, while signed-out visitors and demo data stay entirely on the device. Every “day” is a local-time YYYY-MM-DD key, so UTC offsets cannot shift a record into the wrong day.

What the releases actually fixed

v0.1.1 was a polish release with no new features: the service worker’s fetch listener used event.waitUntil, so offline support silently did nothing; it was changed to event.respondWith. The dark-mode confirm dialog rendered white text on a white surface; it became bg-ink text-canvas. At 375px the heatmap’s first column showed through the weekday labels; a full-height sticky mask fixed it. v0.1.2 separated demo from reality: first launch starts at zero instead of pre-loading someone else’s records, with optional 12-week demo data available in settings and removable in one tap. It also fixed the empty-state copy and NaN values in the heatmap and evolution log. v0.2.0 connected cloud sync, v0.2.1 brought weight and waist measurements into the same timeline, and v0.2.2 closed the gap left by a public link: visitors land in a local-only demo sandbox, only a signed-in account can read or write its own cloud row, and signing out clears the on-device cache.

Trade-offs and boundaries

It is still a single-person tracker, but a public link no longer means public data: since v0.2.2, Supabase Auth (email and password) identifies the account, each user owns one row keyed by auth.uid(), and user-level RLS allows only that owner to read or write it. Signed-out visitors run in a pure local sandbox; the portfolio entry point ?demo=1 loads 12 weeks of sample data into localStorage only and never touches the cloud. After signing in, real records already on the device migrate automatically to the account and follow the user across devices. The PWA uses network-first pages and cache-first static assets to buy offline support. Hash routing avoids SPA rewrite rules at the cost of a permanent #/today in the address bar. The source repository is private, so this page links only to the live app. The demo is an external link rather than an iframe because the site’s iframe sandbox omits allow-same-origin, which would block localStorage outright.