# peternunley08-ops/brain-navigator architecture

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

- Interactive diagram: https://gitdiagram.com/peternunley08-ops/brain-navigator
- Repository: https://github.com/peternunley08-ops/brain-navigator

## Overview

Brain Navigator is a local-first iPhone companion for a high-school student, organizing schoolwork and everyday wellbeing in a calm, Ember-led interface. The main user journey begins at the Desk, then branches into school planning, focused study, quick capture, and Steady’s wellbeing tools; the Drawer exposes additional helpers and personal features. Local JSON-backed state is a key internal layer, and optional AI is a separate capability. The map follows README-documented capabilities and indexed source references; unsampled implementation details and uncertain connections are left out.

Main entry points: [`core/schoolStore.ts`](https://github.com/peternunley08-ops/brain-navigator/blob/main/core/schoolStore.ts) (School data), [`app/index.tsx`](https://github.com/peternunley08-ops/brain-navigator/blob/main/app/index.tsx) (Desk), [`app/drawer.tsx`](https://github.com/peternunley08-ops/brain-navigator/blob/main/app/drawer.tsx) (Navigation), [`app/school.tsx`](https://github.com/peternunley08-ops/brain-navigator/blob/main/app/school.tsx) (School screens)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["App experience"]
  node_desk["Desk<br/>[index.tsx]"]
  node_navigation["Navigation<br/>[drawer.tsx]"]
  node_quickadd["Quick add<br/>[add-assignment.tsx]"]
  node_theme["Candlelight theme<br/>[theme.ts]"]
  node_screen["Screen framework<br/>[Screen.tsx]"]
  node_button["Button controls<br/>[Button.tsx]"]
end

subgraph group_school["School planning"]
  node_school["School screens<br/>[school.tsx]"]
  node_focus["Focus session<br/>[focus.tsx]"]
  node_calendar["Calendar integration"]
  node_notion["Notion integration<br/>[notion.ts]"]
end

subgraph group_wellbeing["Wellbeing"]
  node_steadyscreens["Steady tools<br/>[steady.tsx]"]
  node_journal["Notes and journal<br/>[notes.tsx]"]
end

subgraph group_support["Ember and helpers"]
  node_ember["Ember companion<br/>[EmberBuddy.tsx]"]
  node_helpers["Study helpers<br/>[helpers.tsx]"]
  node_helperdetail["Helper activities<br/>[&#91;id&#93;.tsx]"]
  node_ai["Ember AI service<br/>[index.ts]"]
end

subgraph group_state["Local state"]
  node_schooldata[("School data<br/>[schoolStore.ts]")]
  node_lifedata[("Life data<br/>[lifeStore.ts]")]
  node_wellnessdata[("Wellness data<br/>[wellnessStore.ts]")]
end

node_student(("Student"))

node_student -->|"opens"| node_desk
node_student -->|"uses"| node_school
node_student -->|"starts"| node_focus
node_student -->|"uses"| node_steadyscreens
node_student -->|"adds through"| node_quickadd
node_student -->|"browses"| node_navigation
node_school -.->|"manages"| node_schooldata
node_focus -.->|"records sessions"| node_schooldata
node_steadyscreens -.->|"tracks"| node_wellnessdata
node_journal -.->|"stores entries"| node_lifedata
node_desk -->|"features"| node_ember
node_navigation -->|"opens"| node_helpers
node_helpers -->|"opens"| node_helperdetail
node_ember -.->|"may use"| node_ai
node_schooldata -.->|"integrates optionally"| node_notion
node_screen -->|"uses"| node_theme
node_button -->|"uses"| node_theme

click node_desk "https://github.com/peternunley08-ops/brain-navigator/blob/main/app/index.tsx"
click node_navigation "https://github.com/peternunley08-ops/brain-navigator/blob/main/app/drawer.tsx"
click node_quickadd "https://github.com/peternunley08-ops/brain-navigator/blob/main/app/add-assignment.tsx"
click node_school "https://github.com/peternunley08-ops/brain-navigator/blob/main/app/school.tsx"
click node_schooldata "https://github.com/peternunley08-ops/brain-navigator/blob/main/core/schoolStore.ts"
click node_focus "https://github.com/peternunley08-ops/brain-navigator/blob/main/app/focus.tsx"
click node_steadyscreens "https://github.com/peternunley08-ops/brain-navigator/blob/main/app/steady.tsx"
click node_lifedata "https://github.com/peternunley08-ops/brain-navigator/blob/main/core/lifeStore.ts"
click node_wellnessdata "https://github.com/peternunley08-ops/brain-navigator/blob/main/core/wellnessStore.ts"
click node_journal "https://github.com/peternunley08-ops/brain-navigator/blob/main/app/notes.tsx"
click node_ember "https://github.com/peternunley08-ops/brain-navigator/blob/main/components/ember/EmberBuddy.tsx"
click node_helpers "https://github.com/peternunley08-ops/brain-navigator/blob/main/app/helpers.tsx"
click node_helperdetail "https://github.com/peternunley08-ops/brain-navigator/blob/main/app/helper/%5Bid%5D.tsx"
click node_ai "https://github.com/peternunley08-ops/brain-navigator/blob/main/supabase/functions/ember/index.ts"
click node_calendar "https://github.com/peternunley08-ops/brain-navigator/blob/main/core/googleCalendarStore.ts"
click node_notion "https://github.com/peternunley08-ops/brain-navigator/blob/main/core/notion.ts"
click node_theme "https://github.com/peternunley08-ops/brain-navigator/blob/main/core/theme.ts"
click node_screen "https://github.com/peternunley08-ops/brain-navigator/blob/main/components/ui/Screen.tsx"
click node_button "https://github.com/peternunley08-ops/brain-navigator/blob/main/components/ui/Button.tsx"

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_desk,node_navigation,node_quickadd,node_theme,node_screen,node_button toneBlue
class node_school,node_focus,node_calendar,node_notion toneAmber
class node_steadyscreens,node_journal toneMint
class node_ember,node_helpers,node_helperdetail,node_ai toneRose
class node_schooldata,node_lifedata,node_wellnessdata,node_student toneIndigo
```

## Components

### App experience

- [Desk](https://github.com/peternunley08-ops/brain-navigator/blob/main/app/index.tsx): `app/index.tsx`
- [Navigation](https://github.com/peternunley08-ops/brain-navigator/blob/main/app/drawer.tsx): `app/drawer.tsx`
- [Quick add](https://github.com/peternunley08-ops/brain-navigator/blob/main/app/add-assignment.tsx): `app/add-assignment.tsx`
- [Candlelight theme](https://github.com/peternunley08-ops/brain-navigator/blob/main/core/theme.ts): `core/theme.ts`
- [Screen framework](https://github.com/peternunley08-ops/brain-navigator/blob/main/components/ui/Screen.tsx): `components/ui/Screen.tsx`
- [Button controls](https://github.com/peternunley08-ops/brain-navigator/blob/main/components/ui/Button.tsx): `components/ui/Button.tsx`

### School planning

- [School screens](https://github.com/peternunley08-ops/brain-navigator/blob/main/app/school.tsx): `app/school.tsx`
- [Focus session](https://github.com/peternunley08-ops/brain-navigator/blob/main/app/focus.tsx): `app/focus.tsx`
- [Calendar integration](https://github.com/peternunley08-ops/brain-navigator/blob/main/core/googleCalendarStore.ts): `core/googleCalendarStore.ts`
- [Notion integration](https://github.com/peternunley08-ops/brain-navigator/blob/main/core/notion.ts): `core/notion.ts`

### Wellbeing

- [Steady tools](https://github.com/peternunley08-ops/brain-navigator/blob/main/app/steady.tsx): `app/steady.tsx`
- [Notes and journal](https://github.com/peternunley08-ops/brain-navigator/blob/main/app/notes.tsx): `app/notes.tsx`

### Ember and helpers

- [Ember companion](https://github.com/peternunley08-ops/brain-navigator/blob/main/components/ember/EmberBuddy.tsx): `components/ember/EmberBuddy.tsx`
- [Study helpers](https://github.com/peternunley08-ops/brain-navigator/blob/main/app/helpers.tsx): `app/helpers.tsx`
- [Helper activities](https://github.com/peternunley08-ops/brain-navigator/blob/main/app/helper/%5Bid%5D.tsx): `app/helper/[id].tsx`
- [Ember AI service](https://github.com/peternunley08-ops/brain-navigator/blob/main/supabase/functions/ember/index.ts): `supabase/functions/ember/index.ts`

### Local state

- [School data](https://github.com/peternunley08-ops/brain-navigator/blob/main/core/schoolStore.ts): `core/schoolStore.ts`
- [Life data](https://github.com/peternunley08-ops/brain-navigator/blob/main/core/lifeStore.ts): `core/lifeStore.ts`
- [Wellness data](https://github.com/peternunley08-ops/brain-navigator/blob/main/core/wellnessStore.ts): `core/wellnessStore.ts`

### Other components

- **Student**

## Connections

- Student → Desk: opens
- Student → School screens: uses
- Student → Focus session: starts
- Student → Steady tools: uses
- Student → Quick add: adds through
- Student → Navigation: browses
- School screens → School data: manages
- Focus session → School data: records sessions
- Steady tools → Wellness data: tracks
- Notes and journal → Life data: stores entries
- Desk → Ember companion: features (evidence: `app/index.tsx`)
- Navigation → Study helpers: opens
- Study helpers → Helper activities: opens (evidence: `app/helper/[id].tsx`)
- Ember companion → Ember AI service: may use
- School data → Notion integration: integrates optionally
- Screen framework → Candlelight theme: uses (evidence: `components/ui/Screen.tsx`)
- Button controls → Candlelight theme: uses (evidence: `components/ui/Button.tsx`)
