Personal project · sole developer
FitNFatal
Fitness tracker — Next.js web app (PWA) & Expo mobile app
The problem
Workout logs, personal records, nutrition and hydration usually live in separate apps, and most trackers don't make strength progress easy to see over time. I built a single tracker that runs on both web and mobile, keeps each user's data private, and turns logged sets into progress charts and PR detection.
Architecture & key decisions
Shared data layer across two apps
An npm-workspaces monorepo with a typed packages/db (Supabase client, types, queries) and packages/utils consumed by both the Next.js and Expo apps, so a schema or query change is made once.
Authorization enforced in the database
Postgres row-level security policies scope every table to its owning user. The clients talk to Supabase directly, without a custom API server, and still can't read another user's data.
Framework-agnostic domain logic
PR detection, 1RM estimation, unit conversion and achievements are pure TypeScript functions in the shared utils package, independent of React and easy to reason about in isolation.
Resilient session handling
Next.js middleware refreshes the Supabase session via @supabase/ssr and fails open with a logged error when configuration is missing, instead of taking the whole site down.
Key features
- Workout logger with templates, a rest timer and repeat-last-workout
- Automatic PR detection with celebration toasts
- Onboarding that suggests calorie, macro and water targets
- Nutrition logging with a personal food library; hydration reminders
- Analytics dashboards, fitness calendar, goals, achievements and global search
- Installable PWA with light/dark/system themes, unit settings and data export
At a glance
- Live on Vercel
- 58 seeded exercises
- Per-user data isolation via RLS
- Next.js 14
- TypeScript
- React Native (Expo)
- Supabase / Postgres
- Tailwind CSS
- Recharts
