# 3132ganesh/mood-aware architecture

> Architecture diagram of the GitHub repository 3132ganesh/mood-aware, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/3132ganesh/mood-aware
- Repository: https://github.com/3132ganesh/mood-aware

## Overview

MoodAware is a mobile-first wellness tracker. Users enter through the React app, authenticate, and use routed wellness screens to record mood and habits, journal, plan goals, and review insights. The server exposes authenticated APIs that validate requests, invoke storage and selected AI helpers, and return user-scoped results. The README also describes breathwork, the Mood Garden, voice journaling, time capsules, and predictive insights; their dedicated client modules are represented, but their detailed wiring is not established by the sampled source. Storage implementation details are partial, so database and in-memory persistence are shown as one storage boundary.

Main entry points: [`client/src/App.tsx`](https://github.com/3132ganesh/mood-aware/blob/main/client/src/App.tsx) (App router), [`server/routes.ts`](https://github.com/3132ganesh/mood-aware/blob/main/server/routes.ts) (API routes), [`client/src/components/agust/AgustChatDrawer.tsx`](https://github.com/3132ganesh/mood-aware/blob/main/client/src/components/agust/AgustChatDrawer.tsx) (Agust chat), [`server/goal_routes.ts`](https://github.com/3132ganesh/mood-aware/blob/main/server/goal_routes.ts) (Goal routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Wellness experience"]
  node_app["App router<br/>[App.tsx]"]
  node_dashboard["Dashboard<br/>[Dashboard.tsx]"]
  node_checkin["Mood check-in<br/>[Checkin.tsx]"]
  node_feelings["Feelings journal<br/>[Feelings.tsx]"]
  node_analytics["Wellness insights<br/>[Analytics.tsx]"]
  node_breathing["Guided breathing<br/>[Breathing.tsx]"]
  node_garden["Mood Garden<br/>[MoodGarden.tsx]"]
  node_voice["Voice journaling<br/>[VoiceRecorder.tsx]"]
  node_sleep["Sleep tracking"]
  node_capsules["Future capsules<br/>[routes.ts]"]
  node_planner["Daily planner<br/>[Planner.tsx]"]
  node_goalhub["Goal hub<br/>[GoalHub.tsx]"]
  node_predictive["Predictive insights"]
end

subgraph group_agust["Agust assistant"]
  node_agustchat["Agust chat"]
  node_persona["Persona engine<br/>[agust-engine.ts]"]
  node_notifications["Notifications"]
end

subgraph group_backend["Application services"]
  node_api["API routes<br/>[routes.ts]"]
  node_auth["Authentication<br/>[auth.ts]"]
  node_goalsapi["Goal routes<br/>[goal_routes.ts]"]
  node_ai["AI helpers<br/>[openai_helper.ts]"]
  node_goalengine["AI goal engine<br/>[ai_goal_engine.ts]"]
end

subgraph group_data["Persistence and contracts"]
  node_storage["Storage layer<br/>[storage.ts]"]
  node_database[("Application data<br/>[db.ts]")]
  node_contracts["API and schemas<br/>[routes.ts]"]
end

node_user(("User"))
node_openrouter{{"OpenRouter service"}}

node_user -->|"uses"| node_app
node_app -->|"routes"| node_dashboard
node_app -->|"routes"| node_checkin
node_app -->|"routes"| node_feelings
node_app -->|"routes"| node_analytics
node_app -->|"routes"| node_breathing
node_app -->|"routes"| node_planner
node_app -->|"routes"| node_goalhub
node_user -->|"interacts"| node_garden
node_user -->|"dictates"| node_voice
node_user -->|"tracks sleep"| node_sleep
node_user -->|"manages"| node_capsules
node_user -->|"views insights"| node_predictive
node_app -->|"hosts"| node_agustchat
node_agustchat -->|"loads persona"| node_persona
node_app -->|"schedules"| node_notifications
node_user -->|"sends requests"| node_api
node_api -->|"requires auth"| node_auth
node_api -->|"reads and writes"| node_storage
node_api -->|"requests AI"| node_ai
node_api -->|"registers routes"| node_goalsapi
node_goalsapi -->|"generates roadmap"| node_goalengine
node_goalengine -->|"requests completion"| node_openrouter
node_ai -.->|"requests AI"| node_openrouter
node_storage -->|"persists data"| node_database
node_api -->|"uses route contracts"| node_contracts

click node_app "https://github.com/3132ganesh/mood-aware/blob/main/client/src/App.tsx"
click node_dashboard "https://github.com/3132ganesh/mood-aware/blob/main/client/src/pages/Dashboard.tsx"
click node_checkin "https://github.com/3132ganesh/mood-aware/blob/main/client/src/pages/Checkin.tsx"
click node_feelings "https://github.com/3132ganesh/mood-aware/blob/main/client/src/pages/Feelings.tsx"
click node_analytics "https://github.com/3132ganesh/mood-aware/blob/main/client/src/pages/Analytics.tsx"
click node_breathing "https://github.com/3132ganesh/mood-aware/blob/main/client/src/pages/Breathing.tsx"
click node_garden "https://github.com/3132ganesh/mood-aware/blob/main/client/src/components/MoodGarden.tsx"
click node_voice "https://github.com/3132ganesh/mood-aware/blob/main/client/src/components/VoiceRecorder.tsx"
click node_sleep "https://github.com/3132ganesh/mood-aware/blob/main/client/src/components/SleepTrackerCard.tsx"
click node_capsules "https://github.com/3132ganesh/mood-aware/blob/main/shared/routes.ts"
click node_planner "https://github.com/3132ganesh/mood-aware/blob/main/client/src/pages/Planner.tsx"
click node_goalhub "https://github.com/3132ganesh/mood-aware/blob/main/client/src/pages/GoalHub.tsx"
click node_predictive "https://github.com/3132ganesh/mood-aware/blob/main/client/src/components/PredictiveInsights.tsx"
click node_agustchat "https://github.com/3132ganesh/mood-aware/blob/main/client/src/components/agust/AgustChatDrawer.tsx"
click node_persona "https://github.com/3132ganesh/mood-aware/blob/main/client/src/lib/agust-engine.ts"
click node_notifications "https://github.com/3132ganesh/mood-aware/blob/main/client/src/hooks/use-notification-manager.ts"
click node_api "https://github.com/3132ganesh/mood-aware/blob/main/server/routes.ts"
click node_auth "https://github.com/3132ganesh/mood-aware/blob/main/server/auth.ts"
click node_goalsapi "https://github.com/3132ganesh/mood-aware/blob/main/server/goal_routes.ts"
click node_ai "https://github.com/3132ganesh/mood-aware/blob/main/server/openai_helper.ts"
click node_goalengine "https://github.com/3132ganesh/mood-aware/blob/main/server/ai_goal_engine.ts"
click node_storage "https://github.com/3132ganesh/mood-aware/blob/main/server/storage.ts"
click node_database "https://github.com/3132ganesh/mood-aware/blob/main/server/db.ts"
click node_contracts "https://github.com/3132ganesh/mood-aware/blob/main/shared/routes.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_dashboard,node_checkin,node_feelings,node_analytics,node_breathing,node_garden,node_voice,node_sleep,node_capsules,node_planner,node_goalhub,node_predictive,node_user toneBlue
class node_agustchat,node_persona,node_notifications toneAmber
class node_api,node_auth,node_goalsapi,node_ai,node_goalengine,node_openrouter toneMint
class node_storage,node_database,node_contracts toneRose
```

## Components

### Wellness experience

- [App router](https://github.com/3132ganesh/mood-aware/blob/main/client/src/App.tsx): `client/src/App.tsx`
- [Dashboard](https://github.com/3132ganesh/mood-aware/blob/main/client/src/pages/Dashboard.tsx): `client/src/pages/Dashboard.tsx`
- [Mood check-in](https://github.com/3132ganesh/mood-aware/blob/main/client/src/pages/Checkin.tsx): `client/src/pages/Checkin.tsx`
- [Feelings journal](https://github.com/3132ganesh/mood-aware/blob/main/client/src/pages/Feelings.tsx): `client/src/pages/Feelings.tsx`
- [Wellness insights](https://github.com/3132ganesh/mood-aware/blob/main/client/src/pages/Analytics.tsx): `client/src/pages/Analytics.tsx`
- [Guided breathing](https://github.com/3132ganesh/mood-aware/blob/main/client/src/pages/Breathing.tsx): `client/src/pages/Breathing.tsx`
- [Mood Garden](https://github.com/3132ganesh/mood-aware/blob/main/client/src/components/MoodGarden.tsx): `client/src/components/MoodGarden.tsx`
- [Voice journaling](https://github.com/3132ganesh/mood-aware/blob/main/client/src/components/VoiceRecorder.tsx): `client/src/components/VoiceRecorder.tsx`
- [Sleep tracking](https://github.com/3132ganesh/mood-aware/blob/main/client/src/components/SleepTrackerCard.tsx): `client/src/components/SleepTrackerCard.tsx`
- [Future capsules](https://github.com/3132ganesh/mood-aware/blob/main/shared/routes.ts): `shared/routes.ts`
- [Daily planner](https://github.com/3132ganesh/mood-aware/blob/main/client/src/pages/Planner.tsx): `client/src/pages/Planner.tsx`
- [Goal hub](https://github.com/3132ganesh/mood-aware/blob/main/client/src/pages/GoalHub.tsx): `client/src/pages/GoalHub.tsx`
- [Predictive insights](https://github.com/3132ganesh/mood-aware/blob/main/client/src/components/PredictiveInsights.tsx): `client/src/components/PredictiveInsights.tsx`

### Agust assistant

- [Agust chat](https://github.com/3132ganesh/mood-aware/blob/main/client/src/components/agust/AgustChatDrawer.tsx): `client/src/components/agust/AgustChatDrawer.tsx`
- [Persona engine](https://github.com/3132ganesh/mood-aware/blob/main/client/src/lib/agust-engine.ts): `client/src/lib/agust-engine.ts`
- [Notifications](https://github.com/3132ganesh/mood-aware/blob/main/client/src/hooks/use-notification-manager.ts): `client/src/hooks/use-notification-manager.ts`

### Application services

- [API routes](https://github.com/3132ganesh/mood-aware/blob/main/server/routes.ts): `server/routes.ts`
- [Authentication](https://github.com/3132ganesh/mood-aware/blob/main/server/auth.ts): `server/auth.ts`
- [Goal routes](https://github.com/3132ganesh/mood-aware/blob/main/server/goal_routes.ts): `server/goal_routes.ts`
- [AI helpers](https://github.com/3132ganesh/mood-aware/blob/main/server/openai_helper.ts): `server/openai_helper.ts`
- [AI goal engine](https://github.com/3132ganesh/mood-aware/blob/main/server/ai_goal_engine.ts): `server/ai_goal_engine.ts`

### Persistence and contracts

- [Storage layer](https://github.com/3132ganesh/mood-aware/blob/main/server/storage.ts): `server/storage.ts`
- [Application data](https://github.com/3132ganesh/mood-aware/blob/main/server/db.ts): `server/db.ts`
- [API and schemas](https://github.com/3132ganesh/mood-aware/blob/main/shared/routes.ts): `shared/routes.ts`

### Other components

- **User**
- **OpenRouter service**

## Connections

- User → App router: uses
- App router → Dashboard: routes
- App router → Mood check-in: routes
- App router → Feelings journal: routes
- App router → Wellness insights: routes
- App router → Guided breathing: routes
- App router → Daily planner: routes
- App router → Goal hub: routes
- User → Mood Garden: interacts
- User → Voice journaling: dictates
- User → Sleep tracking: tracks sleep
- User → Future capsules: manages
- User → Predictive insights: views insights
- App router → Agust chat: hosts
- Agust chat → Persona engine: loads persona
- App router → Notifications: schedules
- User → API routes: sends requests
- API routes → Authentication: requires auth
- API routes → Storage layer: reads and writes
- API routes → AI helpers: requests AI
- API routes → Goal routes: registers routes
- Goal routes → AI goal engine: generates roadmap
- AI goal engine → OpenRouter service: requests completion
- AI helpers → OpenRouter service: requests AI
- Storage layer → Application data: persists data
- API routes → API and schemas: uses route contracts
