Skip to main content
All projects

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.

Role
Designer + AI-paired Developer
Built with
Claude Code + Figma MCP
Platform
Responsive Web App
Focus
UX · UI · Design System · Frontend
Case study cover: "Designed in Figma. Built with Claude." beside a tilted Habitly app window with a 12 day streak badge, a 50% progress ring and the shared color token card.

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.

01

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.

02

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.

03

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.

01

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.

02

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.

03

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.

04

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.

  1. Onboard

    Height, weight, age, activity in one lightweight popup.

  2. Get targets

    Suggested water, sleep, step goals, editable, not locked.

  3. Track

    A slider for quantified habits, a toggle for simple ones.

  4. Stay in it

    Grace-day streaks and milestones, so a miss doesn't erase progress.

  5. 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.

  1. Build the foundation

    Color, spacing and type defined once, as Figma variables, never a hardcoded value.

  2. Build the design system

    Components built from those tokens. Every variant is a real, named state.

  3. Design every screen

    Screens assembled only from system components, so no one-off values sneak in.

  4. Feed it to Claude

    The design system becomes Claude's spec: same token names, same component names, before code is written.

  5. 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.css exactly (--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's state=suggested/edited in 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

Accent#059669
Accent Hover#047857
Accent Subtle#ECFDF5
Text Primary#1B1B1E
Text Secondary#71717A
Border#E4E4E7
Surface Alt#F9FAFB

SPACING SCALE (BARS DRAWN AT 4X)

xs4px
sm8px
md16px
lg24px
xl32px
2xl48px

TYPE SCALE

3xlHabitly40px
2xlHabitly32px
xlHabitly24px
lgHabitly20px
mdHabitly16px
smHabitly14px

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 component showing the suggested state with a plus and minus stepper and a toggle to include it in your habits.
01

TargetCard

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

HabitCard component with a habit name, streak count and a check control.
02

HabitCard

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

ConfirmDialog component asking Delete habit with Cancel and Delete buttons.
03

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.

Habitly Your Targets screen with water, sleep and step goal cards and a Save to my habits button.

Your Targets

Suggested water/sleep/step goals from the calc engine, every card editable.

View live: habitly-web-app.vercel.app/targets
Habitly My Habits screen showing a progress ring and a grid of habit cards.

My Habits

Card and list views of the same data, with grace-day streak states.

View live: habitly-web-app.vercel.app/habits
Habitly Your Streak screen with a 137 day streak card, journey stats and milestone badges.

Your Streak

Journey stats, milestone progress, and the shareable streak card.

View live: habitly-web-app.vercel.app/streak
Habitly Settings screen with profile, wellbeing profile, preferences and data export.

Settings

Profile, wellbeing, preferences, data export, one consistent layout.

View live: habitly-web-app.vercel.app/settings
Habitly Sign In screen with email and password fields and Google sign-in.

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
Habitly Sign Up screen.

Sign Up

Same card, one more field, wired to real account creation with email confirmation.

View live: habitly-web-app.vercel.app/signup
Habitly Forgot Password screen.

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
Habitly Reset Password screen.

Reset Password

Where that emailed link lands: a new password, set for real.

View live: habitly-web-app.vercel.app/reset-password

09 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.

Habitly My Habits screen at 375px mobile width with a stacked list.
375px · MOBILE
Habitly My Habits screen at 820px iPad width with a two column habit grid.
820px · IPAD
Habitly My Habits screen at 1440px desktop width with a three column habit grid.
1440px · DESKTOP

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

01

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.

02

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.

03

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

01

Settings sat 24px too high

Found

Settings page sat 24px higher than every other screen: a silent top-padding mismatch.

Fixed

Settings was missing the same md:pt-2xl responsive class every other page used. Fixed the one line, verified pixel-for-pixel against Stats.

02

Cards drifted out of alignment

Found

Two cards in a row had different natural heights, so everything below them drifted out of alignment.

Fixed

Restructured the pairing into a CSS grid with items-stretch, so the shorter card's height is now enforced by the layout, not a guess.

03

A blank white dead end

Found

Any mistyped or bookmarked URL rendered a completely blank white screen: a dead end with no way back.

Fixed

Added 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.

04

Google sign-in hung forever

Found

Google sign-in hung forever with zero feedback whenever the OAuth popup was blocked. Confirmed live, not hypothetical.

Fixed

Added 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.

  1. Design the schema

    Every piece of local state (habits, check-ins, moods, wellbeing profile) mapped to a Postgres table, one row per user.

  2. 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.

  3. Replace fake auth

    Real email/password and Google sign-in through Supabase Auth, in place of a login screen that accepted anything.

  4. 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.

  5. 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.

7+screens shipped
1:1token parity
0dead ends
4real bugs closed

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.