How nasrallahelbendaouipro-ops/habits-tracker-web works
LifeOS is a personal habit and routine tracker organized around Body, Mind, and Soul. Users record habits and routine sessions, plan them on a calendar, set goals, and review progress through the dashboard and analytics views. The README also documents Google Calendar sync, Apple Health ingestion, and an AI-assisted daily planner. The graph captures the main user journey and these documented branches; some integrations are represented at their route level because their implementations were not sampled.
Main entry points: client.ts Browser data client · habits.ts Habit tracking · page.tsx Daily dashboard · route.ts Google Calendar routes
Components 26
User experience
- Daily dashboard
app/(app)/dashboard/page.tsx - Body, Mind, Soul
app/(app)/body/page.tsx - Daily check-in
app/(app)/checkin/page.tsx - Progress analytics
app/(app)/analytics/page.tsx - Sign-in and registration
app/(auth)/login/page.tsx
Tracking and planning
- Calendar view
components/calendar/CalendarView.tsx - Habit entry forms
components/habits/HabitForm.tsx - Routine sessions
components/routines/SessionView.tsx
Domain services
- Habit tracking
lib/habits.ts - Routine management
lib/routines.ts - Goal tracking
lib/goals.ts - Progress calculations
lib/analytics.ts - Calendar events
lib/calendar.ts - Shift parsing
lib/shift-parser.ts
Integrations and APIs
- Google Calendar routes
app/api/google-calendar/events/route.ts - Google OAuth routes
app/api/auth/google/route.ts - Health data routes
app/api/health/ingest/route.ts - AI planner route
app/api/planner/route.ts - Shift parsing route
app/api/parse-shift/route.ts - Google Calendar service
lib/google-calendar.ts
Data and shared infrastructure
- Browser data client
lib/supabase/client.ts - Server data client
lib/supabase/server.ts - Supabase database
- Rate limiting
lib/rate-limit.ts
Other components
- User
- Apple Health data
Connections 39
- User → Sign-in and registration: signs in
app/(auth)/login/page.tsx - User → Daily dashboard: tracks daily
README.md - Daily dashboard → Habit tracking: loads and toggles
app/(app)/dashboard/page.tsx - Daily dashboard → Goal tracking: loads goals
app/(app)/dashboard/page.tsx - Daily dashboard → Routine management: loads routine blocks
app/(app)/dashboard/page.tsx - Daily dashboard → Progress calculations: calculates score
app/(app)/dashboard/page.tsx - Body, Mind, Soul → Goal tracking: loads goals
app/(app)/body/page.tsx - Body, Mind, Soul → Browser data client: reads health data
app/(app)/body/page.tsx - Daily check-in → Habit tracking: uses habit data
app/(app)/checkin/page.tsx - Daily check-in → Routine management: uses routines
app/(app)/checkin/page.tsx - Daily check-in → Calendar events: uses calendar data
app/(app)/checkin/page.tsx - Progress analytics → Habit tracking: loads habit data
app/(app)/analytics/page.tsx - Progress analytics → Goal tracking: loads goals
app/(app)/analytics/page.tsx - Progress analytics → Progress calculations: loads metrics
app/(app)/analytics/page.tsx - Habit entry forms → Habit tracking: uses habit operations
components/habits/HabitForm.tsx - Routine sessions → Routine management: updates sessions
components/routines/SessionView.tsx - Calendar view → Calendar events: uses event operations
components/calendar/CalendarView.tsx - Calendar view → Habit tracking: uses habit data
components/calendar/CalendarView.tsx - Calendar view → Routine management: uses routine data
components/calendar/CalendarView.tsx - Sign-in and registration → Browser data client: authenticates
app/(auth)/login/page.tsx - Habit tracking → Browser data client: reads and writes
lib/habits.ts - Routine management → Browser data client: reads and writes
lib/routines.ts - Goal tracking → Browser data client: reads and writes
lib/goals.ts - Calendar events → Browser data client: uses data client
lib/calendar.ts - Browser data client → Supabase database: accesses
- Google OAuth routes → Server data client: creates server client
app/api/auth/google/route.ts - Google OAuth routes → Rate limiting: checks requests
app/api/auth/google/route.ts - Google OAuth routes → Google Calendar routes: authorizes calendar sync
README.md - Google Calendar routes → Server data client: creates server client
app/api/google-calendar/events/route.ts - Google Calendar routes → Google Calendar service: uses calendar service
app/api/google-calendar/events/route.ts - Google Calendar routes → Rate limiting: checks requests
app/api/google-calendar/events/route.ts - Calendar view → Google Calendar routes: syncs events
README.md - Apple Health data → Health data routes: sends readings
README.md - Health data routes → Supabase database: ingests readings
README.md - User → AI planner route: requests daily plan
README.md - User → Shift parsing route: submits shift text
app/api/parse-shift/route.ts - Shift parsing route → Shift parsing: parses shifts
app/api/parse-shift/route.ts - Shift parsing route → Rate limiting: checks requests
app/api/parse-shift/route.ts - AI planner route → Rate limiting: checks requests
app/api/planner/route.ts