UX + PRODUCT CASE STUDY
A personalized habit tracker, designed in Figma by hand, then developed into a real app using Claude.
Habitly replaces generic habit-tracker defaults with targets calculated from your body, and streaks that forgive a missed day instead of punishing it. This case study is a guide to how it was designed and built end-to-end: foundations, components, screens, and production, using Claude Code to keep Figma and the live app in exact sync.

01 OVERVIEW
Most habit trackers ask you to guess your own targets, and treat one missed day as a broken streak. Habitly was built to fix both: a personalization engine turns height, weight, age and activity level into real water, sleep and step goals, and a grace-day mechanic lets a streak survive one off day per week, because that's how real habits actually work.
This is a build-process case study as much as a product one. It's written as a guide for designers who want to run their own Figma-to-production workflow with an AI pairing partner, using the real decisions, bugs and fixes from building Habitly as the walkthrough.
Every screen was built in Figma and React side by side, screen by screen, never batched, with every layer named to match its component, every color and spacing value bound to a shared token, and every UI decision verified live in the browser before being called done.
02 THE CHALLENGE
Generic advice, and streaks that punish instead of motivate.
Targets are one-size-fits-all
"Drink 8 glasses" ignores your weight, activity level, or age, so the goal never feels like it's actually yours.
A missed day resets everything
Classic streaks are all-or-nothing. One bad day and weeks of progress visually vanish, which kills motivation instead of building it.
Design and code drift apart
Mockups and shipped product diverge the moment nobody's watching: spacing, copy and states slowly stop matching.
03 THE GOALS
Four principles the whole build answers to.
Personalize from real inputs
Body data (height, weight, age, activity level) feeds a calc engine that suggests water, sleep and step targets. Editable, never locked.
Streaks that forgive
A grace-day mechanic allows one free recovery day per week, so a single miss bends the streak instead of breaking it.
One system, every screen
A shared token and component library, Figma variables bound 1:1 to CSS custom properties, keeps spacing, color and type identical across every screen.
Figma and code, kept honest
Nothing is 'done' until it's verified in both places. Every visual bug found in the browser gets traced back and fixed in Figma too, and vice versa.
04 HOW IT WORKS
From a body-data form to a habit you keep.
Onboard
Height, weight, age, activity in one lightweight popup.
Get targets
Suggested water, sleep, step goals, editable, not locked.
Track
A slider for quantified habits, a toggle for simple ones.
Stay in it
Grace-day streaks and milestones, so a miss doesn't erase progress.
See progress
Trends, mood correlation, and a shareable streak card.
05 THE METHOD
The design system isn't documentation. It's the playbook Claude builds from.
This is the actual mechanism behind "designed in Figma, developed with Claude": a design system built first, then handed to Claude as the shared spec both sides build against, not a screenshot to eyeball, but a system to follow.
"I designed the application in Figma. Using Claude, I developed it." The design system is what makes that sentence true, not luck. It's the single source both sides are held to.
Build the foundation
Color, spacing and type defined once, as Figma variables, never a hardcoded value.
Build the design system
Components built from those tokens. Every variant is a real, named state.
Design every screen
Screens assembled only from system components, so no one-off values sneak in.
Feed it to Claude
The design system becomes Claude's spec: same token names, same component names, before code is written.
Code matches by design
Because both sides trace to one system, the shipped UI matches Figma, verified screen by screen, not assumed.
The playbook in practice: what actually gets fed to Claude
- Use the tokens in
src/index.cssexactly (--color-accent,--spacing-lg,--radius-md), never a hardcoded hex or pixel value. - Every Figma layer is named after its React component 1:1 (
TargetCard,HabitCard,StreakBadge). Match the name, match the component. - Component variants are component props:
TargetCard'sstate=suggested/editedin Figma is that component's real internal state in code. - Nothing is done until it's verified in the running app against the Figma frame, not assumed from the code alone.
06 FOUNDATION: DESIGN TOKENS
One set of tokens, bound in both Figma and code.
Every color, spacing and type value started as a Figma variable, then was mapped 1:1 to a CSS custom property of the same name, so a designer changing a token in Figma and an engineer reading index.css are always looking at the same source of truth.
COLOR
SPACING SCALE (BARS DRAWN AT 4X)
TYPE SCALE
07 COMPONENTS
A component for every recurring pattern, never a one-off.
These are live instances of the real Figma components: the same ones the screens are built from, not redrawn placeholders.

TargetCard
Suggested vs. edited state, a +/- stepper, and a toggle to include it in your habits. One card handles the whole targets flow.

HabitCard
The same card renders in grid or list view, with a separate quantified state for logged habits: one data model, several faces.

ConfirmDialog
The one destructive-action confirmation, reused for every delete in the app: habits, account, everything.
08 THE PRODUCT
Every shot below is the real Figma screen, not a mockup of one.
Because Figma and code were built and verified together, screen by screen, these frames are pixel-identical to what shipped. There's no separate "marketing mockup" layer to keep in sync.

Your Targets
Suggested water/sleep/step goals from the calc engine, every card editable.
View live: habitly-web-app.vercel.app/targets
My Habits
Card and list views of the same data, with grace-day streak states.
View live: habitly-web-app.vercel.app/habits
Your Streak
Journey stats, milestone progress, and the shareable streak card.
View live: habitly-web-app.vercel.app/streak
Settings
Profile, wellbeing, preferences, data export, one consistent layout.
View live: habitly-web-app.vercel.app/settings
Sign In
Real Supabase auth: email/password and Google sign-in, replacing a form that used to accept anything.
View live: habitly-web-app.vercel.app/signin
Sign Up
Same card, one more field, wired to real account creation with email confirmation.
View live: habitly-web-app.vercel.app/signup
Forgot Password
Sends a real reset link through Supabase, for the account recovery flow that didn't exist at first.
View live: habitly-web-app.vercel.app/forgot-password
Reset Password
Where that emailed link lands: a new password, set for real.
View live: habitly-web-app.vercel.app/reset-password09 RESPONSIVE DESIGN
Every screen was designed twice: once per breakpoint, not just scaled.
Eight screens got a dedicated mobile variant in Figma, verified alongside desktop: stacked layouts, a bottom tab bar, touch-sized targets. In between, the same 3-column habit grid reflows to 2 columns at iPad width, matching the real responsive breakpoint in code.



Wide monitors needed their own pass, too. A 2669px screen stretched content into oversized cards until the page cap was tuned to 1440px, with a bit more room at 1680px past 1536px viewports.
10 THE WORKFLOW: A GUIDE FOR DESIGNERS
How I used Claude to turn a Figma design system into production, bug by bug.
This is the actual method, not a generic best-practice list: three rules I held every screen to, and four real bugs Claude and I caught by testing the shipped app like a real user, then fixed each one in code.
THE THREE RULES
One screen at a time
Never batch screens. Each one is built in Figma, built in React, and verified in the browser before the next one starts, so drift never has room to accumulate.
Name layers like components
Every Figma layer is named exactly like its React counterpart (TargetCard, HabitCard, StreakBadge). Spotting a mismatch becomes a text diff, not a guess.
Test the live app, not the mockup
Real bugs (misaligned cards, dead-end routes, hung network calls) only surface when you actually click through the deployed product as a user would.
FOUR BUGS, FOUND BY TESTING THE LIVE APP LIKE A REAL USER
Settings sat 24px too high
FoundSettings page sat 24px higher than every other screen: a silent top-padding mismatch.
FixedSettings was missing the same md:pt-2xl responsive class every other page used. Fixed the one line, verified pixel-for-pixel against Stats.
Cards drifted out of alignment
FoundTwo cards in a row had different natural heights, so everything below them drifted out of alignment.
FixedRestructured the pairing into a CSS grid with items-stretch, so the shorter card's height is now enforced by the layout, not a guess.
A blank white dead end
FoundAny mistyped or bookmarked URL rendered a completely blank white screen: a dead end with no way back.
FixedAdded a real catch-all route with a "Back to Habitly" link that correctly falls through to sign-in or the dashboard depending on auth state.
Google sign-in hung forever
FoundGoogle sign-in hung forever with zero feedback whenever the OAuth popup was blocked. Confirmed live, not hypothetical.
FixedAdded a 15-second timeout that rejects with an actionable error, and a real "Connecting..." loading state on the button.
11 FROM PROTOTYPE TO REAL BACKEND
From a UI that only looked real to a real backend.
Every screen up to this point ran on a UI that only looked real: the login screen accepted any password, and every habit lived in one browser's local storage, gone the moment a new device signed in.
Once the product was ready for a real user, Claude wired it to Supabase: real email and Google sign-in, a Postgres database with one row per user, and access rules that keep every user's data private. What follows is exactly how that migration happened, step by step.
Design the schema
Every piece of local state (habits, check-ins, moods, wellbeing profile) mapped to a Postgres table, one row per user.
Lock it down with RLS
Every table's policy checks
auth.uid(), so the database itself refuses another user's data, not just the client code.Replace fake auth
Real email/password and Google sign-in through Supabase Auth, in place of a login screen that accepted anything.
Keep every save optimistic
The UI updates instantly and the write happens in the background, so no existing screen had to change how it called into state.
Verify against the real project
Nothing is called done until it's checked against the actual Supabase database, not assumed from the code alone.
The playbook in practice: how every table and mutation follows one rule
- Every table's RLS policy is the same shape:
for all using (auth.uid() = user_id) with check (auth.uid() = user_id). - Every Habits, Mood and Wellbeing mutation keeps its original synchronous call signature: update state immediately, persist in the background.
- Google sign-in uses Supabase's ID-token flow (
signInWithIdToken), reusing the same Google Client ID already in the app, no separate OAuth secret. - A missing config, an empty table, a still-loading session: each one gets a real screen or a real toast, not a blank page.
12 OUTCOMES
What shipping this way actually produced.
13 REFLECTION
The hardest part of an AI-paired workflow isn't the AI. It's the discipline to check both sides, every time.
It's tempting to treat Figma as a sketch and code as the truth, or the reverse. Neither is right. The moment one side is trusted more than the other, they drift, quietly, until a designer and an engineer are arguing about a screenshot instead of looking at the same source.
Naming Figma layers exactly like components turned that discipline into something mechanical rather than a judgment call. A designer or an AI can check parity by reading, not guessing. And treating a 404 page or a stuck loading spinner as real design work, not an afterthought, is what actually makes a product feel finished.