Note! This app is FULLY AI-generated. It was made as a test by Claude Code.
A clean, cross-device habit tracker with email/password authentication and real-time cloud sync. Built with React, Clerk, and Supabase.
Live app: https://retracdev.github.io/habit-track/
- Today view — check off habits, track a progress bar, see streaks
- Schedule view — week calendar showing completion per day
- Habits view — create, edit, and delete habits with daily or custom weekly schedules
- Auth — email/password sign-up/in via Clerk (or social providers if enabled)
- Cross-device sync — habit data stored in Supabase, available instantly on any device
| Layer | Tool |
|---|---|
| Frontend | React + Vite |
| Styling | Tailwind CSS v4 + Inter font |
| Auth | Clerk |
| Database | Supabase (Postgres) |
| Hosting | GitHub Pages |
| CI/CD | GitHub Actions |
git clone https://github.com/retracdev/habit-track.git
cd habit-track
npm install- Create a free project at clerk.com
- In your Clerk dashboard → API Keys → copy the Publishable Key
- Enable Email/Password under Configure → User & Authentication → Email, Phone, Username
- Create a free project at supabase.com
- Go to SQL Editor and run:
create table user_data (
user_id text primary key,
data jsonb not null default '{"habits": [], "version": 1}',
updated_at timestamptz default now()
);- In your Supabase project → Project Settings → API → copy the Project URL and anon/public key
cp .env.example .envFill in .env:
VITE_CLERK_PUBLISHABLE_KEY=pk_test_...
VITE_SUPABASE_URL=https://xxxx.supabase.co
VITE_SUPABASE_ANON_KEY=eyJ...npm run devThe app auto-deploys on every push to main via GitHub Actions.
You need to add your env vars as repository secrets so the build step can access them:
- Go to your repo → Settings → Secrets and variables → Actions
- Add three secrets:
VITE_CLERK_PUBLISHABLE_KEYVITE_SUPABASE_URLVITE_SUPABASE_ANON_KEY
src/
├── components/
│ ├── AllHabitsView.jsx # Manage all habits
│ ├── AuthPage.jsx # Clerk sign-in / sign-up UI
│ ├── HabitCard.jsx # Single habit row
│ ├── HabitModal.jsx # Add / edit habit form
│ ├── ScheduleView.jsx # Weekly calendar view
│ └── TodayView.jsx # Today's habits + progress
├── hooks/
│ └── useHabits.js # Habit state, Supabase sync, localStorage cache
├── lib/
│ └── supabase.js # Supabase client
├── App.jsx # Root — Clerk auth gate + tab nav
├── main.jsx # ClerkProvider entry point
└── index.css # Tailwind + Inter font