All work
Side project

HABIT Studio Operations

HABIT is a gym in Melbourne. Its booking platform knows everything about the studio and shows very little of it at a glance. I built the board the owner opens in the morning: today's classes, this week's birthdays, who just passed a milestone, and what members are subscribed to.

Role
Designed and built, end to end
Status
Live on real data
Surfaces
Dashboard, weekly email, program builder
Figures shown here
Sample data, not the studio's

Four questions on one screen

The board answers four questions, each from its own live call: how full are today's classes compared with the same class last week, whose birthday is this week, who has passed 100, 250 or 500 sessions, and how the membership splits across products. Every panel has an honest loading, empty and error state, and the header reports the freshness of the oldest data on screen rather than the newest.

Some of it needed the data cleaned before it could be trusted. A handful of members had a signup year where a birth year belonged, which made them one year old. Members born on 29 February vanish three years in four unless you decide where they go.

An API that does not quite say what you need

Member records carry no membership, so the platform cannot tell you who holds which product in one call. I built the attribution backwards: fetch every product, then ask for the members of each, and check that the total reconciles exactly against the active roster. It does, with nobody missing and nobody extra.

The platform also returns lifetime counters with no dates. "Who crossed 250 sessions this week" is unanswerable from the API alone, so a daily job stores a dated capture in Postgres and the answer comes from comparing two of them.

Fast, and honest when it is not live

Each upstream sits behind its own ladder of caches: memory, a shared data cache, the stored captures, and sample data only when nothing is configured. A cold read of the roster went from 5.3 seconds to 40 milliseconds. The class schedule deliberately has no fallback, because invented class numbers on an operations board are worse than an error.

Weeks run Monday to Sunday on the Melbourne calendar, which matters more than it sounds: the servers run on UTC, where Monday morning in Melbourne is still Sunday.

Behind one password

The board shows names and dates of birth, so everything sits behind a gate, including the data routes, which are the real exposure. Email and phone numbers are stripped at the edge and never reach the browser, the disk or the database. With the password unset the whole thing locks rather than leaks.

An email built around a free plan

A dashboard only helps if somebody opens it, so every Sunday evening the owner gets an email: birthdays ahead, trials about to expire, milestones crossed, the week's class numbers.

The delivery is shaped by one constraint. The automation tool's free plan allows a trigger and a single action, with no step to fetch data in between. So the site builds and stores the email itself, publishes it as a private feed, and the automation simply watches the feed and sends what appears. The feed never touches the booking platform, and the send time lives on the stored row so it survives daylight saving.

From reading to writing

The newest part lets coaches author training programs: a season of three four-week blocks, an exercise library with the equipment each movement needs, and a check that a full class does not need more barbells than the gym owns. Sessions export as slides for the screen on the gym floor.

It is the first part of the system that stores work nobody can re-download, so it follows different rules from everything before it. Saves fail loudly instead of quietly, and two tabs editing the same program get a clear conflict rather than a silent overwrite.

  • Next.js
  • Momence API
  • Supabase
  • Vercel Cron
  • Zapier
Next
HL7 Integration Gateway