# geezel/left2rightcompass architecture

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

- Interactive diagram: https://gitdiagram.com/geezel/left2rightcompass
- Repository: https://github.com/geezel/left2rightcompass

## Overview

Left2Right Education Hub is a multi-role education application. Its documented core journey keeps parent family-ecosystem and student learning-profile onboarding separate, saving each to Supabase and tracking progress; signed-in users also access family/student dashboards and learning tools. The broader product includes an articles-and-media hub, Compass, admissions, and MCP endpoints. The graph preserves these capabilities, but many route implementations were not sampled, so only documented or indexed relationships are connected.

Main entry points: [`src/integrations/supabase/client.ts`](https://github.com/geezel/left2rightcompass/blob/main/src/integrations/supabase/client.ts) (Supabase client), [`src/routes/index.tsx`](https://github.com/geezel/left2rightcompass/blob/main/src/routes/index.tsx) (Home), [`src/routes/parent.tsx`](https://github.com/geezel/left2rightcompass/blob/main/src/routes/parent.tsx) (Parent journey), [`src/routes/student.tsx`](https://github.com/geezel/left2rightcompass/blob/main/src/routes/student.tsx) (Student journey)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Entry and identity"]
  node_home["Home<br/>[index.tsx]"]
  node_auth["Sign-in<br/>[auth.tsx]"]
  node_auth_state["Auth and roles<br/>[hub-auth.ts]"]
  node_guard["Auth route guard<br/>[route.tsx]"]
end

subgraph group_onboarding["Admissions journeys"]
  node_parent_journey["Parent journey<br/>[parent.tsx]"]
  node_student_journey["Student journey<br/>[student.tsx]"]
  node_onboarding_ui["Onboarding steps"]
  node_admissions["Admissions<br/>[admissions.ts]"]
  node_onboarding_state["Progress tracking"]
end

subgraph group_learning["Learning and family"]
  node_family_dashboard["Family dashboard"]
  node_student_dashboard["Student dashboard"]
  node_alignment["Alignment meetings"]
  node_living_tree["Living Tree<br/>[living-tree.tsx]"]
  node_compass["L2R Compass<br/>[compass.tsx]"]
end

subgraph group_hub["Education hub"]
  node_hub_routes["Articles and media"]
  node_hub_search["Hub search<br/>[hub.search.tsx]"]
  node_hub_content["Hub content access<br/>[hub-content.ts]"]
  node_hub_admin["Hub administration<br/>[hub.admin.tsx]"]
end

subgraph group_platform["Data and integrations"]
  node_mcp["MCP tools<br/>[index.ts]"]
  node_ui["Shared UI components"]
  node_supabase_client["Supabase client<br/>[client.ts]"]
end

node_visitor(("Visitor or learner"))
node_supabase[("Supabase")]

node_visitor -->|"visits"| node_home
node_home -->|"sign-in link"| node_auth
node_home -.->|"begin journey"| node_parent_journey
node_home -.->|"begin journey"| node_student_journey
node_home -->|"read articles"| node_hub_routes
node_home -->|"open Compass"| node_compass
node_auth -->|"authenticates"| node_supabase_client
node_auth -.->|"resolves session"| node_auth_state
node_auth_state -->|"reads auth and roles"| node_supabase_client
node_guard -->|"checks user"| node_supabase_client
node_parent_journey -->|"saves family responses"| node_supabase
node_student_journey -->|"saves learning profile"| node_supabase
node_parent_journey -.->|"tracks progress"| node_onboarding_state
node_student_journey -.->|"tracks progress"| node_onboarding_state
node_onboarding_ui -.->|"supports steps"| node_parent_journey
node_onboarding_ui -.->|"supports steps"| node_student_journey
node_family_dashboard -->|"loads family data"| node_supabase_client
node_family_dashboard -->|"uses admissions data"| node_admissions
node_living_tree -->|"reads and writes"| node_supabase_client
node_hub_search -->|"searches content"| node_hub_content
node_hub_content -->|"queries content"| node_supabase_client
node_hub_admin -.->|"manages content"| node_supabase_client
node_mcp -.->|"exposes search tool"| node_hub_search
node_supabase_client -->|"connects"| node_supabase

click node_home "https://github.com/geezel/left2rightcompass/blob/main/src/routes/index.tsx"
click node_auth "https://github.com/geezel/left2rightcompass/blob/main/src/routes/auth.tsx"
click node_auth_state "https://github.com/geezel/left2rightcompass/blob/main/src/lib/hub-auth.ts"
click node_guard "https://github.com/geezel/left2rightcompass/blob/main/src/routes/_authenticated/route.tsx"
click node_parent_journey "https://github.com/geezel/left2rightcompass/blob/main/src/routes/parent.tsx"
click node_student_journey "https://github.com/geezel/left2rightcompass/blob/main/src/routes/student.tsx"
click node_onboarding_ui "https://github.com/geezel/left2rightcompass/tree/main/src/components/onboarding"
click node_admissions "https://github.com/geezel/left2rightcompass/blob/main/src/lib/admissions.ts"
click node_onboarding_state "https://github.com/geezel/left2rightcompass/blob/main/src/lib/onboarding-storage.ts"
click node_family_dashboard "https://github.com/geezel/left2rightcompass/blob/main/src/routes/_authenticated/family-dashboard.tsx"
click node_student_dashboard "https://github.com/geezel/left2rightcompass/blob/main/src/routes/_authenticated/student-dashboard.tsx"
click node_alignment "https://github.com/geezel/left2rightcompass/blob/main/src/routes/_authenticated/alignment-meeting.tsx"
click node_living_tree "https://github.com/geezel/left2rightcompass/blob/main/src/routes/_authenticated/living-tree.tsx"
click node_compass "https://github.com/geezel/left2rightcompass/blob/main/src/routes/compass.tsx"
click node_hub_routes "https://github.com/geezel/left2rightcompass/blob/main/src/routes/hub.articles.index.tsx"
click node_hub_search "https://github.com/geezel/left2rightcompass/blob/main/src/routes/hub.search.tsx"
click node_hub_content "https://github.com/geezel/left2rightcompass/blob/main/src/lib/hub-content.ts"
click node_hub_admin "https://github.com/geezel/left2rightcompass/blob/main/src/routes/hub.admin.tsx"
click node_mcp "https://github.com/geezel/left2rightcompass/blob/main/src/lib/mcp/index.ts"
click node_ui "https://github.com/geezel/left2rightcompass/tree/main/src/components/ui"
click node_supabase_client "https://github.com/geezel/left2rightcompass/blob/main/src/integrations/supabase/client.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_home,node_auth,node_auth_state,node_guard toneBlue
class node_parent_journey,node_student_journey,node_onboarding_ui,node_admissions,node_onboarding_state,node_supabase toneAmber
class node_family_dashboard,node_student_dashboard,node_alignment,node_living_tree,node_compass toneMint
class node_hub_routes,node_hub_search,node_hub_content,node_hub_admin toneRose
class node_mcp,node_ui,node_supabase_client,node_visitor toneIndigo
```

## Components

### Entry and identity

- [Home](https://github.com/geezel/left2rightcompass/blob/main/src/routes/index.tsx): `src/routes/index.tsx`
- [Sign-in](https://github.com/geezel/left2rightcompass/blob/main/src/routes/auth.tsx): `src/routes/auth.tsx`
- [Auth and roles](https://github.com/geezel/left2rightcompass/blob/main/src/lib/hub-auth.ts): `src/lib/hub-auth.ts`
- [Auth route guard](https://github.com/geezel/left2rightcompass/blob/main/src/routes/_authenticated/route.tsx): `src/routes/_authenticated/route.tsx`

### Admissions journeys

- [Parent journey](https://github.com/geezel/left2rightcompass/blob/main/src/routes/parent.tsx): `src/routes/parent.tsx`
- [Student journey](https://github.com/geezel/left2rightcompass/blob/main/src/routes/student.tsx): `src/routes/student.tsx`
- [Onboarding steps](https://github.com/geezel/left2rightcompass/tree/main/src/components/onboarding): `src/components/onboarding`
- [Admissions](https://github.com/geezel/left2rightcompass/blob/main/src/lib/admissions.ts): `src/lib/admissions.ts`
- [Progress tracking](https://github.com/geezel/left2rightcompass/blob/main/src/lib/onboarding-storage.ts): `src/lib/onboarding-storage.ts`

### Learning and family

- [Family dashboard](https://github.com/geezel/left2rightcompass/blob/main/src/routes/_authenticated/family-dashboard.tsx): `src/routes/_authenticated/family-dashboard.tsx`
- [Student dashboard](https://github.com/geezel/left2rightcompass/blob/main/src/routes/_authenticated/student-dashboard.tsx): `src/routes/_authenticated/student-dashboard.tsx`
- [Alignment meetings](https://github.com/geezel/left2rightcompass/blob/main/src/routes/_authenticated/alignment-meeting.tsx): `src/routes/_authenticated/alignment-meeting.tsx`
- [Living Tree](https://github.com/geezel/left2rightcompass/blob/main/src/routes/_authenticated/living-tree.tsx): `src/routes/_authenticated/living-tree.tsx`
- [L2R Compass](https://github.com/geezel/left2rightcompass/blob/main/src/routes/compass.tsx): `src/routes/compass.tsx`

### Education hub

- [Articles and media](https://github.com/geezel/left2rightcompass/blob/main/src/routes/hub.articles.index.tsx): `src/routes/hub.articles.index.tsx`
- [Hub search](https://github.com/geezel/left2rightcompass/blob/main/src/routes/hub.search.tsx): `src/routes/hub.search.tsx`
- [Hub content access](https://github.com/geezel/left2rightcompass/blob/main/src/lib/hub-content.ts): `src/lib/hub-content.ts`
- [Hub administration](https://github.com/geezel/left2rightcompass/blob/main/src/routes/hub.admin.tsx): `src/routes/hub.admin.tsx`

### Data and integrations

- [MCP tools](https://github.com/geezel/left2rightcompass/blob/main/src/lib/mcp/index.ts): `src/lib/mcp/index.ts`
- [Shared UI components](https://github.com/geezel/left2rightcompass/tree/main/src/components/ui): `src/components/ui`
- [Supabase client](https://github.com/geezel/left2rightcompass/blob/main/src/integrations/supabase/client.ts): `src/integrations/supabase/client.ts`

### Other components

- **Visitor or learner**
- **Supabase**

## Connections

- Visitor or learner → Home: visits (evidence: `src/routes/index.tsx`)
- Home → Sign-in: sign-in link (evidence: `src/routes/index.tsx`)
- Home → Parent journey: begin journey
- Home → Student journey: begin journey
- Home → Articles and media: read articles (evidence: `src/routes/index.tsx`)
- Home → L2R Compass: open Compass (evidence: `src/routes/index.tsx`)
- Sign-in → Supabase client: authenticates (evidence: `src/routes/auth.tsx`)
- Sign-in → Auth and roles: resolves session
- Auth and roles → Supabase client: reads auth and roles (evidence: `src/lib/hub-auth.ts`)
- Auth route guard → Supabase client: checks user (evidence: `src/routes/_authenticated/route.tsx`)
- Parent journey → Supabase: saves family responses (evidence: `README.md`)
- Student journey → Supabase: saves learning profile (evidence: `README.md`)
- Parent journey → Progress tracking: tracks progress (evidence: `README.md`)
- Student journey → Progress tracking: tracks progress (evidence: `README.md`)
- Onboarding steps → Parent journey: supports steps
- Onboarding steps → Student journey: supports steps
- Family dashboard → Supabase client: loads family data (evidence: `src/routes/_authenticated/family-dashboard.tsx`)
- Family dashboard → Admissions: uses admissions data (evidence: `src/routes/_authenticated/family-dashboard.tsx`)
- Living Tree → Supabase client: reads and writes (evidence: `src/routes/_authenticated/living-tree.tsx`)
- Hub search → Hub content access: searches content (evidence: `src/routes/hub.search.tsx`)
- Hub content access → Supabase client: queries content (evidence: `src/lib/hub-content.ts`)
- Hub administration → Supabase client: manages content
- MCP tools → Hub search: exposes search tool
- Supabase client → Supabase: connects (evidence: `src/integrations/supabase/client.ts`)
