# mahimjain93/mms architecture

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

- Interactive diagram: https://gitdiagram.com/mahimjain93/mms
- Repository: https://github.com/mahimjain93/mms

## Overview

MMS is a one-screen focus app designed to help a user begin one real task quickly. The main workflow is a daily battery-and-mood check-in, choosing or splitting a task, running a 25-minute focus cycle, and reflecting afterward; task management and a journal are supporting branches. The graph follows the App orchestration and the documented product behavior. Unsampled modules are included where the SOURCE INDEX or README establishes their role; their internal behavior is not inferred.

Main entry points: [`src/App.tsx`](https://github.com/mahimjain93/mms/blob/main/src/App.tsx) (App orchestration), [`src/useAppState.ts`](https://github.com/mahimjain93/mms/blob/main/src/useAppState.ts) (App state lifecycle), [`src/logic/cycles.ts`](https://github.com/mahimjain93/mms/blob/main/src/logic/cycles.ts) (Cycle and split logic), [`src/components/Journal.tsx`](https://github.com/mahimjain93/mms/blob/main/src/components/Journal.tsx) (Journal and check-ins)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_flow["Focus flow"]
  node_app["App orchestration<br/>[App.tsx]"]
  node_checkin["Battery check-in<br/>[CheckIn.tsx]"]
  node_doorway["Task doorway<br/>[Doorway.tsx]"]
  node_split["Task splitting<br/>[Split.tsx]"]
  node_timer["Focus timer<br/>[Timer.tsx]"]
  node_reflection["Cycle reflection<br/>[HowWasThat.tsx]"]
  node_taskentry["Task entry<br/>[AddTask.tsx]"]
end

subgraph group_domain["Task and cycle logic"]
  node_state_logic["Check-in and task state<br/>[state.ts]"]
  node_doorway_logic["Task selection<br/>[pickDoorway.ts]"]
  node_cycle_logic["Cycle and split logic<br/>[cycles.ts]"]
  node_task_logic["Task management<br/>[tasks.ts]"]
end

subgraph group_history["History and persistence"]
  node_appstate["App state lifecycle<br/>[useAppState.ts]"]
  node_storage[("Local state storage<br/>[storage.ts]")]
  node_journal["Journal and check-ins<br/>[Journal.tsx]"]
  node_tasklist["Task list<br/>[TaskList.tsx]"]
end

subgraph group_experience["App experience"]
  node_theme["Theme preference<br/>[theme.ts]"]
  node_sound["Focus sounds<br/>[sound.ts]"]
  node_batteryicon["Battery indicator<br/>[BatteryIcon.tsx]"]
end

node_user(("User"))

node_user -->|"uses"| node_app
node_app -->|"loads state"| node_appstate
node_appstate -->|"loads and saves"| node_storage
node_appstate -->|"records opens"| node_state_logic
node_appstate -->|"checks active cycle"| node_cycle_logic
node_app -->|"updates check-in and tasks"| node_state_logic
node_app -->|"selects task"| node_doorway_logic
node_app -->|"starts and ends cycles"| node_cycle_logic
node_app -->|"manages tasks"| node_task_logic
node_app -->|"renders"| node_checkin
node_app -->|"renders"| node_doorway
node_app -->|"renders"| node_split
node_app -->|"renders"| node_timer
node_app -->|"renders"| node_reflection
node_app -->|"renders"| node_taskentry
node_app -->|"renders"| node_journal
node_app -->|"renders"| node_tasklist
node_app -->|"uses preference"| node_theme
node_app -->|"plays and schedules"| node_sound
node_app -->|"renders"| node_batteryicon
node_task_logic -->|"completes tasks"| node_cycle_logic
node_cycle_logic -->|"marks action"| node_state_logic
node_tasklist -->|"builds open task tree"| node_task_logic
node_journal -->|"uses mood labels"| node_checkin
node_journal -->|"shows battery"| node_batteryicon

click node_app "https://github.com/mahimjain93/mms/blob/main/src/App.tsx"
click node_checkin "https://github.com/mahimjain93/mms/blob/main/src/components/CheckIn.tsx"
click node_doorway "https://github.com/mahimjain93/mms/blob/main/src/components/Doorway.tsx"
click node_split "https://github.com/mahimjain93/mms/blob/main/src/components/Split.tsx"
click node_timer "https://github.com/mahimjain93/mms/blob/main/src/components/Timer.tsx"
click node_reflection "https://github.com/mahimjain93/mms/blob/main/src/components/HowWasThat.tsx"
click node_taskentry "https://github.com/mahimjain93/mms/blob/main/src/components/AddTask.tsx"
click node_state_logic "https://github.com/mahimjain93/mms/blob/main/src/logic/state.ts"
click node_doorway_logic "https://github.com/mahimjain93/mms/blob/main/src/logic/pickDoorway.ts"
click node_cycle_logic "https://github.com/mahimjain93/mms/blob/main/src/logic/cycles.ts"
click node_task_logic "https://github.com/mahimjain93/mms/blob/main/src/logic/tasks.ts"
click node_appstate "https://github.com/mahimjain93/mms/blob/main/src/useAppState.ts"
click node_storage "https://github.com/mahimjain93/mms/blob/main/src/storage.ts"
click node_journal "https://github.com/mahimjain93/mms/blob/main/src/components/Journal.tsx"
click node_tasklist "https://github.com/mahimjain93/mms/blob/main/src/components/TaskList.tsx"
click node_theme "https://github.com/mahimjain93/mms/blob/main/src/theme.ts"
click node_sound "https://github.com/mahimjain93/mms/blob/main/src/sound.ts"
click node_batteryicon "https://github.com/mahimjain93/mms/blob/main/src/components/BatteryIcon.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_app,node_checkin,node_doorway,node_split,node_timer,node_reflection,node_taskentry,node_user toneBlue
class node_state_logic,node_doorway_logic,node_cycle_logic,node_task_logic toneAmber
class node_appstate,node_storage,node_journal,node_tasklist toneMint
class node_theme,node_sound,node_batteryicon toneRose
```

## Components

### Focus flow

- [App orchestration](https://github.com/mahimjain93/mms/blob/main/src/App.tsx): `src/App.tsx`
- [Battery check-in](https://github.com/mahimjain93/mms/blob/main/src/components/CheckIn.tsx): `src/components/CheckIn.tsx`
- [Task doorway](https://github.com/mahimjain93/mms/blob/main/src/components/Doorway.tsx): `src/components/Doorway.tsx`
- [Task splitting](https://github.com/mahimjain93/mms/blob/main/src/components/Split.tsx): `src/components/Split.tsx`
- [Focus timer](https://github.com/mahimjain93/mms/blob/main/src/components/Timer.tsx): `src/components/Timer.tsx`
- [Cycle reflection](https://github.com/mahimjain93/mms/blob/main/src/components/HowWasThat.tsx): `src/components/HowWasThat.tsx`
- [Task entry](https://github.com/mahimjain93/mms/blob/main/src/components/AddTask.tsx): `src/components/AddTask.tsx`

### Task and cycle logic

- [Check-in and task state](https://github.com/mahimjain93/mms/blob/main/src/logic/state.ts): `src/logic/state.ts`
- [Task selection](https://github.com/mahimjain93/mms/blob/main/src/logic/pickDoorway.ts): `src/logic/pickDoorway.ts`
- [Cycle and split logic](https://github.com/mahimjain93/mms/blob/main/src/logic/cycles.ts): `src/logic/cycles.ts`
- [Task management](https://github.com/mahimjain93/mms/blob/main/src/logic/tasks.ts): `src/logic/tasks.ts`

### History and persistence

- [App state lifecycle](https://github.com/mahimjain93/mms/blob/main/src/useAppState.ts): `src/useAppState.ts`
- [Local state storage](https://github.com/mahimjain93/mms/blob/main/src/storage.ts): `src/storage.ts`
- [Journal and check-ins](https://github.com/mahimjain93/mms/blob/main/src/components/Journal.tsx): `src/components/Journal.tsx`
- [Task list](https://github.com/mahimjain93/mms/blob/main/src/components/TaskList.tsx): `src/components/TaskList.tsx`

### App experience

- [Theme preference](https://github.com/mahimjain93/mms/blob/main/src/theme.ts): `src/theme.ts`
- [Focus sounds](https://github.com/mahimjain93/mms/blob/main/src/sound.ts): `src/sound.ts`
- [Battery indicator](https://github.com/mahimjain93/mms/blob/main/src/components/BatteryIcon.tsx): `src/components/BatteryIcon.tsx`

### Other components

- **User**

## Connections

- User → App orchestration: uses (evidence: `README.md`)
- App orchestration → App state lifecycle: loads state (evidence: `src/App.tsx`)
- App state lifecycle → Local state storage: loads and saves (evidence: `src/useAppState.ts`)
- App state lifecycle → Check-in and task state: records opens (evidence: `src/useAppState.ts`)
- App state lifecycle → Cycle and split logic: checks active cycle (evidence: `src/useAppState.ts`)
- App orchestration → Check-in and task state: updates check-in and tasks (evidence: `src/App.tsx`)
- App orchestration → Task selection: selects task (evidence: `src/App.tsx`)
- App orchestration → Cycle and split logic: starts and ends cycles (evidence: `src/App.tsx`)
- App orchestration → Task management: manages tasks (evidence: `src/App.tsx`)
- App orchestration → Battery check-in: renders (evidence: `src/App.tsx`)
- App orchestration → Task doorway: renders (evidence: `src/App.tsx`)
- App orchestration → Task splitting: renders (evidence: `src/App.tsx`)
- App orchestration → Focus timer: renders (evidence: `src/App.tsx`)
- App orchestration → Cycle reflection: renders (evidence: `src/App.tsx`)
- App orchestration → Task entry: renders (evidence: `src/App.tsx`)
- App orchestration → Journal and check-ins: renders (evidence: `src/App.tsx`)
- App orchestration → Task list: renders (evidence: `src/App.tsx`)
- App orchestration → Theme preference: uses preference (evidence: `src/App.tsx`)
- App orchestration → Focus sounds: plays and schedules (evidence: `src/App.tsx`)
- App orchestration → Battery indicator: renders (evidence: `src/App.tsx`)
- Task management → Cycle and split logic: completes tasks (evidence: `src/logic/tasks.ts`)
- Cycle and split logic → Check-in and task state: marks action (evidence: `src/logic/cycles.ts`)
- Task list → Task management: builds open task tree (evidence: `src/components/TaskList.tsx`)
- Journal and check-ins → Battery check-in: uses mood labels (evidence: `src/components/Journal.tsx`)
- Journal and check-ins → Battery indicator: shows battery (evidence: `src/components/Journal.tsx`)
