# arnaaavvv/catalyst architecture

> Architecture diagram of the GitHub repository arnaaavvv/catalyst, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-20). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/arnaaavvv/catalyst
- Repository: https://github.com/arnaaavvv/catalyst

## Overview

Catalyst is a single-user life-management app connecting health, habits, goals, tasks, and academics. A user authenticates, enters the app, and works across domain views backed by shared state; Quick Add turns natural-language input into typed records. Derived metrics power daily tracking, timelines, and insights, while account reports summarize activity. The README documents Gemini parsing with a local regex fallback and Supabase for auth and persistence. Some subsystem links are documented rather than verified in sampled implementation, so those are marked dashed.

Main entry points: [`components/App.tsx`](https://github.com/arnaaavvv/catalyst/blob/main/components/App.tsx) (App shell), [`hooks/useLifeOSStore.ts`](https://github.com/arnaaavvv/catalyst/blob/main/hooks/useLifeOSStore.ts) (LifeOS state), [`components/quickadd/CommandPalette.tsx`](https://github.com/arnaaavvv/catalyst/blob/main/components/quickadd/CommandPalette.tsx) (Quick Add), [`app/api/parse/route.ts`](https://github.com/arnaaavvv/catalyst/blob/main/app/api/parse/route.ts) (Quick Add parser API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["App entry and navigation"]
  node_app["App shell<br/>[App.tsx]"]
  node_authscreen["Authentication<br/>[AuthScreen.tsx]"]
  node_nav["Navigation<br/>[NavRail.tsx]"]
  node_quickadd["Quick Add<br/>[CommandPalette.tsx]"]
  node_parse["Quick Add parser API<br/>[route.ts]"]
end

subgraph group_domains["Life tracking domains"]
  node_today["Today<br/>[TodayView.tsx]"]
  node_health["Health tracking<br/>[HealthView.tsx]"]
  node_habits["Habit tracking<br/>[HabitsView.tsx]"]
  node_goals["Goals map<br/>[GoalsView.tsx]"]
  node_tasks["Task management<br/>[TasksView.tsx]"]
  node_academics["Academics<br/>[AcademicsView.tsx]"]
end

subgraph group_analysis["Insights and account"]
  node_timeline["Timeline<br/>[TimelineView.tsx]"]
  node_insights["Insights<br/>[InsightsView.tsx]"]
  node_report["Account report<br/>[ReportView.tsx]"]
  node_personality["Personality analysis<br/>[personality.ts]"]
end

subgraph group_services["State and integrations"]
  node_store["LifeOS state<br/>[useLifeOSStore.ts]"]
  node_derived["Derived metrics<br/>[derived.ts]"]
  node_storage["State persistence<br/>[storage.ts]"]
  node_auth["Auth services<br/>[auth.ts]"]
  node_supabase[("Supabase<br/>[supabaseClient.ts]")]
end

node_user(("User"))
node_gemini{{"Gemini API"}}

node_user -->|"uses"| node_app
node_app -->|"shows when signed out"| node_authscreen
node_app -->|"checks session"| node_auth
node_app -->|"renders navigation"| node_nav
node_app -->|"opens"| node_quickadd
node_app -->|"loads user state"| node_store
node_app -->|"selects view"| node_today
node_app -->|"selects view"| node_health
node_app -->|"selects view"| node_habits
node_app -->|"selects view"| node_goals
node_app -->|"selects view"| node_tasks
node_app -->|"selects view"| node_academics
node_app -->|"selects view"| node_timeline
node_app -->|"selects view"| node_insights
node_quickadd -->|"adds typed records"| node_store
node_quickadd -.->|"parses sentences"| node_parse
node_parse -.->|"uses for parsing"| node_gemini
node_parse -.->|"returns parsed result"| node_quickadd
node_today -->|"reads and updates"| node_store
node_health -->|"reads and updates"| node_store
node_habits -->|"reads and updates"| node_store
node_goals -->|"reads and updates"| node_store
node_tasks -->|"reads and updates"| node_store
node_academics -->|"reads and updates"| node_store
node_timeline -->|"uses activity data"| node_derived
node_insights -->|"computes metrics"| node_derived
node_insights -->|"uses analysis"| node_personality
node_report -->|"summarizes activity"| node_derived
node_report -->|"uses analysis"| node_personality
node_store -->|"loads and saves"| node_storage
node_storage -->|"persists data"| node_supabase
node_auth -->|"authenticates and reads profiles"| node_supabase

click node_app "https://github.com/arnaaavvv/catalyst/blob/main/components/App.tsx"
click node_authscreen "https://github.com/arnaaavvv/catalyst/blob/main/components/auth/AuthScreen.tsx"
click node_nav "https://github.com/arnaaavvv/catalyst/blob/main/components/layout/NavRail.tsx"
click node_quickadd "https://github.com/arnaaavvv/catalyst/blob/main/components/quickadd/CommandPalette.tsx"
click node_parse "https://github.com/arnaaavvv/catalyst/blob/main/app/api/parse/route.ts"
click node_today "https://github.com/arnaaavvv/catalyst/blob/main/components/views/TodayView.tsx"
click node_health "https://github.com/arnaaavvv/catalyst/blob/main/components/views/HealthView.tsx"
click node_habits "https://github.com/arnaaavvv/catalyst/blob/main/components/views/HabitsView.tsx"
click node_goals "https://github.com/arnaaavvv/catalyst/blob/main/components/views/GoalsView.tsx"
click node_tasks "https://github.com/arnaaavvv/catalyst/blob/main/components/views/TasksView.tsx"
click node_academics "https://github.com/arnaaavvv/catalyst/blob/main/components/views/AcademicsView.tsx"
click node_timeline "https://github.com/arnaaavvv/catalyst/blob/main/components/views/TimelineView.tsx"
click node_insights "https://github.com/arnaaavvv/catalyst/blob/main/components/views/InsightsView.tsx"
click node_report "https://github.com/arnaaavvv/catalyst/blob/main/components/account/ReportView.tsx"
click node_personality "https://github.com/arnaaavvv/catalyst/blob/main/lib/personality.ts"
click node_store "https://github.com/arnaaavvv/catalyst/blob/main/hooks/useLifeOSStore.ts"
click node_derived "https://github.com/arnaaavvv/catalyst/blob/main/lib/derived.ts"
click node_storage "https://github.com/arnaaavvv/catalyst/blob/main/lib/storage.ts"
click node_auth "https://github.com/arnaaavvv/catalyst/blob/main/lib/auth.ts"
click node_supabase "https://github.com/arnaaavvv/catalyst/blob/main/lib/supabaseClient.ts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app,node_authscreen,node_nav,node_quickadd,node_parse,node_user toneBlue
class node_today,node_health,node_habits,node_goals,node_tasks,node_academics toneAmber
class node_timeline,node_insights,node_report,node_personality,node_gemini toneMint
class node_store,node_derived,node_storage,node_auth,node_supabase toneRose
```

## Components

### App entry and navigation

- [App shell](https://github.com/arnaaavvv/catalyst/blob/main/components/App.tsx): `components/App.tsx`
- [Authentication](https://github.com/arnaaavvv/catalyst/blob/main/components/auth/AuthScreen.tsx): `components/auth/AuthScreen.tsx`
- [Navigation](https://github.com/arnaaavvv/catalyst/blob/main/components/layout/NavRail.tsx): `components/layout/NavRail.tsx`
- [Quick Add](https://github.com/arnaaavvv/catalyst/blob/main/components/quickadd/CommandPalette.tsx): `components/quickadd/CommandPalette.tsx`
- [Quick Add parser API](https://github.com/arnaaavvv/catalyst/blob/main/app/api/parse/route.ts): `app/api/parse/route.ts`

### Life tracking domains

- [Today](https://github.com/arnaaavvv/catalyst/blob/main/components/views/TodayView.tsx): `components/views/TodayView.tsx`
- [Health tracking](https://github.com/arnaaavvv/catalyst/blob/main/components/views/HealthView.tsx): `components/views/HealthView.tsx`
- [Habit tracking](https://github.com/arnaaavvv/catalyst/blob/main/components/views/HabitsView.tsx): `components/views/HabitsView.tsx`
- [Goals map](https://github.com/arnaaavvv/catalyst/blob/main/components/views/GoalsView.tsx): `components/views/GoalsView.tsx`
- [Task management](https://github.com/arnaaavvv/catalyst/blob/main/components/views/TasksView.tsx): `components/views/TasksView.tsx`
- [Academics](https://github.com/arnaaavvv/catalyst/blob/main/components/views/AcademicsView.tsx): `components/views/AcademicsView.tsx`

### Insights and account

- [Timeline](https://github.com/arnaaavvv/catalyst/blob/main/components/views/TimelineView.tsx): `components/views/TimelineView.tsx`
- [Insights](https://github.com/arnaaavvv/catalyst/blob/main/components/views/InsightsView.tsx): `components/views/InsightsView.tsx`
- [Account report](https://github.com/arnaaavvv/catalyst/blob/main/components/account/ReportView.tsx): `components/account/ReportView.tsx`
- [Personality analysis](https://github.com/arnaaavvv/catalyst/blob/main/lib/personality.ts): `lib/personality.ts`

### State and integrations

- [LifeOS state](https://github.com/arnaaavvv/catalyst/blob/main/hooks/useLifeOSStore.ts): `hooks/useLifeOSStore.ts`
- [Derived metrics](https://github.com/arnaaavvv/catalyst/blob/main/lib/derived.ts): `lib/derived.ts`
- [State persistence](https://github.com/arnaaavvv/catalyst/blob/main/lib/storage.ts): `lib/storage.ts`
- [Auth services](https://github.com/arnaaavvv/catalyst/blob/main/lib/auth.ts): `lib/auth.ts`
- [Supabase](https://github.com/arnaaavvv/catalyst/blob/main/lib/supabaseClient.ts): `lib/supabaseClient.ts`

### Other components

- **User**
- **Gemini API**

## Connections

- User → App shell: uses (evidence: `README.md`)
- App shell → Authentication: shows when signed out (evidence: `components/App.tsx`)
- App shell → Auth services: checks session (evidence: `components/App.tsx`)
- App shell → Navigation: renders navigation (evidence: `components/App.tsx`)
- App shell → Quick Add: opens (evidence: `components/App.tsx`)
- App shell → LifeOS state: loads user state (evidence: `components/App.tsx`)
- App shell → Today: selects view (evidence: `components/App.tsx`)
- App shell → Health tracking: selects view (evidence: `components/App.tsx`)
- App shell → Habit tracking: selects view (evidence: `components/App.tsx`)
- App shell → Goals map: selects view (evidence: `components/App.tsx`)
- App shell → Task management: selects view (evidence: `components/App.tsx`)
- App shell → Academics: selects view (evidence: `components/App.tsx`)
- App shell → Timeline: selects view (evidence: `components/App.tsx`)
- App shell → Insights: selects view (evidence: `components/App.tsx`)
- Quick Add → LifeOS state: adds typed records (evidence: `components/quickadd/CommandPalette.tsx`)
- Quick Add → Quick Add parser API: parses sentences (evidence: `README.md`)
- Quick Add parser API → Gemini API: uses for parsing (evidence: `README.md`)
- Quick Add parser API → Quick Add: returns parsed result (evidence: `README.md`)
- Today → LifeOS state: reads and updates (evidence: `components/views/TodayView.tsx`)
- Health tracking → LifeOS state: reads and updates (evidence: `components/views/HealthView.tsx`)
- Habit tracking → LifeOS state: reads and updates (evidence: `components/views/HabitsView.tsx`)
- Goals map → LifeOS state: reads and updates (evidence: `components/views/GoalsView.tsx`)
- Task management → LifeOS state: reads and updates (evidence: `components/views/TasksView.tsx`)
- Academics → LifeOS state: reads and updates (evidence: `components/views/AcademicsView.tsx`)
- Timeline → Derived metrics: uses activity data (evidence: `components/views/TimelineView.tsx`)
- Insights → Derived metrics: computes metrics (evidence: `components/views/InsightsView.tsx`)
- Insights → Personality analysis: uses analysis (evidence: `components/views/InsightsView.tsx`)
- Account report → Derived metrics: summarizes activity (evidence: `components/account/ReportView.tsx`)
- Account report → Personality analysis: uses analysis (evidence: `components/account/ReportView.tsx`)
- LifeOS state → State persistence: loads and saves (evidence: `hooks/useLifeOSStore.ts`)
- State persistence → Supabase: persists data (evidence: `lib/storage.ts`)
- Auth services → Supabase: authenticates and reads profiles (evidence: `lib/auth.ts`)
