# silentkeyboard1/justmoods architecture

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

- Interactive diagram: https://gitdiagram.com/silentkeyboard1/justmoods
- Repository: https://github.com/silentkeyboard1/justmoods

## Overview

JustMoods is a mobile mood-tracking app whose main flow is to record a daily mood, view it on a calendar, and review mood history and streaks. The home screen also tracks three daily wins; settings support data import/export, deletion, name changes, and themes, while a notification service schedules reminders. The graph follows the documented capabilities and visible imports/calls. Several screens are only partially sampled, so unverified links between them and the underlying data are omitted.

Main entry points: [`context/CalendarContext.tsx`](https://github.com/silentkeyboard1/justmoods/blob/main/context/CalendarContext.tsx) (Mood state), [`services/NotificationService.ts`](https://github.com/silentkeyboard1/justmoods/blob/main/services/NotificationService.ts) (Reminder service), [`context/ThemeContext.tsx`](https://github.com/silentkeyboard1/justmoods/blob/main/context/ThemeContext.tsx) (Theme state), [`app/(tabs)/index.tsx`](https://github.com/silentkeyboard1/justmoods/blob/main/app/(tabs)/index.tsx) (Daily tasks)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_daily["Daily use"]
  node_home["Daily tasks<br/>[index.tsx]"]
  node_mood_entry["Add mood<br/>[two.tsx]"]
  node_sleep_entry["Sleep tracking<br/>[four.tsx]"]
end

subgraph group_mood["Mood and insights"]
  node_overview["Overview<br/>[three.tsx]"]
  node_calendar["Mood calendar<br/>[Calendar.tsx]"]
  node_donut["Mood chart<br/>[DonutChart.tsx]"]
end

subgraph group_settings["Settings and reminders"]
  node_settings_screen["Settings<br/>[settings.tsx]"]
  node_notifications["Reminder service"]
end

subgraph group_shared["Shared state and UI"]
  node_router["App navigation<br/>[_layout.tsx]"]
  node_app_layout["App providers<br/>[_layout.tsx]"]
  node_mood_state["Mood state"]
  node_theme_state["Theme state<br/>[ThemeContext.tsx]"]
  node_colors["Color palette<br/>[Colors.ts]"]
end

node_user(("App user"))
node_storage[("Local storage")]
node_os_notifications["Device notifications"]

node_user -->|"uses"| node_home
node_user -->|"records mood"| node_mood_entry
node_user -->|"reviews data"| node_overview
node_user -->|"manages settings"| node_settings_screen
node_app_layout -->|"provides"| node_mood_state
node_app_layout -->|"provides"| node_theme_state
node_app_layout -->|"initializes"| node_notifications
node_router -->|"reads"| node_theme_state
node_home -->|"reads/writes"| node_storage
node_home -->|"reads"| node_theme_state
node_home -->|"opens"| node_settings_screen
node_mood_entry -->|"uses"| node_mood_state
node_mood_entry -->|"reschedules"| node_notifications
node_sleep_entry -->|"schedules"| node_notifications
node_overview -->|"reads"| node_mood_state
node_overview -->|"renders"| node_donut
node_calendar -->|"reads"| node_mood_state
node_settings_screen -->|"imports/clears"| node_mood_state
node_settings_screen -->|"changes"| node_theme_state
node_mood_state -->|"loads/saves"| node_storage
node_theme_state -->|"loads/saves"| node_storage
node_notifications -->|"stores IDs"| node_storage
node_notifications -->|"schedules/cancels"| node_os_notifications
node_router -->|"uses"| node_colors
node_overview -->|"uses"| node_colors
node_calendar -->|"uses"| node_colors

click node_home "https://github.com/silentkeyboard1/justmoods/blob/main/app/(tabs)/index.tsx"
click node_mood_entry "https://github.com/silentkeyboard1/justmoods/blob/main/app/(tabs)/two.tsx"
click node_sleep_entry "https://github.com/silentkeyboard1/justmoods/blob/main/app/(tabs)/four.tsx"
click node_overview "https://github.com/silentkeyboard1/justmoods/blob/main/app/(tabs)/three.tsx"
click node_calendar "https://github.com/silentkeyboard1/justmoods/blob/main/components/Calendar.tsx"
click node_donut "https://github.com/silentkeyboard1/justmoods/blob/main/components/DonutChart.tsx"
click node_settings_screen "https://github.com/silentkeyboard1/justmoods/blob/main/app/settings.tsx"
click node_notifications "https://github.com/silentkeyboard1/justmoods/blob/main/services/NotificationService.ts"
click node_router "https://github.com/silentkeyboard1/justmoods/blob/main/app/(tabs)/_layout.tsx"
click node_app_layout "https://github.com/silentkeyboard1/justmoods/blob/main/app/_layout.tsx"
click node_mood_state "https://github.com/silentkeyboard1/justmoods/blob/main/context/CalendarContext.tsx"
click node_theme_state "https://github.com/silentkeyboard1/justmoods/blob/main/context/ThemeContext.tsx"
click node_colors "https://github.com/silentkeyboard1/justmoods/blob/main/constants/Colors.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_mood_entry,node_sleep_entry,node_user toneBlue
class node_overview,node_calendar,node_donut,node_storage toneAmber
class node_settings_screen,node_notifications toneMint
class node_router,node_app_layout,node_mood_state,node_theme_state,node_colors toneRose
class node_os_notifications toneIndigo
```

## Components

### Daily use

- [Daily tasks](https://github.com/silentkeyboard1/justmoods/blob/main/app/(tabs)/index.tsx): `app/(tabs)/index.tsx`
- [Add mood](https://github.com/silentkeyboard1/justmoods/blob/main/app/(tabs)/two.tsx): `app/(tabs)/two.tsx`
- [Sleep tracking](https://github.com/silentkeyboard1/justmoods/blob/main/app/(tabs)/four.tsx): `app/(tabs)/four.tsx`

### Mood and insights

- [Overview](https://github.com/silentkeyboard1/justmoods/blob/main/app/(tabs)/three.tsx): `app/(tabs)/three.tsx`
- [Mood calendar](https://github.com/silentkeyboard1/justmoods/blob/main/components/Calendar.tsx): `components/Calendar.tsx`
- [Mood chart](https://github.com/silentkeyboard1/justmoods/blob/main/components/DonutChart.tsx): `components/DonutChart.tsx`

### Settings and reminders

- [Settings](https://github.com/silentkeyboard1/justmoods/blob/main/app/settings.tsx): `app/settings.tsx`
- [Reminder service](https://github.com/silentkeyboard1/justmoods/blob/main/services/NotificationService.ts): `services/NotificationService.ts`

### Shared state and UI

- [App navigation](https://github.com/silentkeyboard1/justmoods/blob/main/app/(tabs)/_layout.tsx): `app/(tabs)/_layout.tsx`
- [App providers](https://github.com/silentkeyboard1/justmoods/blob/main/app/_layout.tsx): `app/_layout.tsx`
- [Mood state](https://github.com/silentkeyboard1/justmoods/blob/main/context/CalendarContext.tsx): `context/CalendarContext.tsx`
- [Theme state](https://github.com/silentkeyboard1/justmoods/blob/main/context/ThemeContext.tsx): `context/ThemeContext.tsx`
- [Color palette](https://github.com/silentkeyboard1/justmoods/blob/main/constants/Colors.ts): `constants/Colors.ts`

### Other components

- **App user**
- **Local storage**
- **Device notifications**

## Connections

- App user → Daily tasks: uses (evidence: `README.md`)
- App user → Add mood: records mood (evidence: `README.md`)
- App user → Overview: reviews data (evidence: `README.md`)
- App user → Settings: manages settings (evidence: `README.md`)
- App providers → Mood state: provides (evidence: `app/_layout.tsx`)
- App providers → Theme state: provides (evidence: `app/_layout.tsx`)
- App providers → Reminder service: initializes (evidence: `app/_layout.tsx`)
- App navigation → Theme state: reads (evidence: `app/(tabs)/_layout.tsx`)
- Daily tasks → Local storage: reads/writes (evidence: `app/(tabs)/index.tsx`)
- Daily tasks → Theme state: reads (evidence: `app/(tabs)/index.tsx`)
- Daily tasks → Settings: opens (evidence: `app/(tabs)/index.tsx`)
- Add mood → Mood state: uses (evidence: `app/(tabs)/two.tsx`)
- Add mood → Reminder service: reschedules (evidence: `app/(tabs)/two.tsx`)
- Sleep tracking → Reminder service: schedules (evidence: `app/(tabs)/four.tsx`)
- Overview → Mood state: reads (evidence: `app/(tabs)/three.tsx`)
- Overview → Mood chart: renders (evidence: `app/(tabs)/three.tsx`)
- Mood calendar → Mood state: reads (evidence: `components/Calendar.tsx`)
- Settings → Mood state: imports/clears (evidence: `app/settings.tsx`)
- Settings → Theme state: changes (evidence: `app/settings.tsx`)
- Mood state → Local storage: loads/saves (evidence: `context/CalendarContext.tsx`)
- Theme state → Local storage: loads/saves (evidence: `context/ThemeContext.tsx`)
- Reminder service → Local storage: stores IDs (evidence: `services/NotificationService.ts`)
- Reminder service → Device notifications: schedules/cancels (evidence: `services/NotificationService.ts`)
- App navigation → Color palette: uses (evidence: `app/(tabs)/_layout.tsx`)
- Overview → Color palette: uses (evidence: `app/(tabs)/three.tsx`)
- Mood calendar → Color palette: uses (evidence: `components/Calendar.tsx`)
