# sukuna938588-web/shadowrise architecture

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

- Interactive diagram: https://gitdiagram.com/sukuna938588-web/shadowrise
- Repository: https://github.com/sukuna938588-web/shadowrise

## Overview

ShadowRise is a gamified fitness and wellness app. A user registers as a Hunter, then uses the home dashboard and feature screens to track health, log workouts, complete quests, manage reminders, and review XP and rank progress. The shared store coordinates app state and persistence, while screens and components present and update that state. Source excerpts substantiate the main navigation, selected dashboard features, sound customization, and audio storage; other feature branches are included from the source index, with uncertain internal call paths omitted.

Main entry points: [`src/store.ts`](https://github.com/sukuna938588-web/shadowrise/blob/main/src/store.ts) (Application state), [`src/App.tsx`](https://github.com/sukuna938588-web/shadowrise/blob/main/src/App.tsx) (App navigation), [`src/screens/HomeScreen.tsx`](https://github.com/sukuna938588-web/shadowrise/blob/main/src/screens/HomeScreen.tsx) (Home dashboard), [`src/screens/ProfileScreen.tsx`](https://github.com/sukuna938588-web/shadowrise/blob/main/src/screens/ProfileScreen.tsx) (Hunter profile)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App shell"]
  node_app["App navigation<br/>[App.tsx]"]
  node_registration["Hunter registration"]
  node_home["Home dashboard<br/>[HomeScreen.tsx]"]
  node_alarms["Alarm management<br/>[AlarmsScreen.tsx]"]
  node_notes["Notes<br/>[NotesScreen.tsx]"]
end

subgraph group_training["Training and quests"]
  node_quests["Quest screen<br/>[QuestsScreen.tsx]"]
  node_workout["Workout logging<br/>[AddScreen.tsx]"]
  node_workout_history["Workout history"]
  node_exercise_catalog["Exercise catalog<br/>[exerciseCatalog.ts]"]
  node_initial_data["Initial quests and notes<br/>[initialData.ts]"]
end

subgraph group_wellness["Health and recovery"]
  node_bmi["BMI calculator<br/>[BMICalculator.tsx]"]
  node_health["Health issues"]
  node_water["Water tracking<br/>[WaterTracker.tsx]"]
  node_water_reminder["Water reminders"]
  node_sleep["Sleep tracking<br/>[SleepTracker.tsx]"]
  node_ai_coach["AI coaching<br/>[aiCoachEngine.ts]"]
  node_health_calculations["Health calculations"]
end

subgraph group_progress["Progression system"]
  node_profile["Hunter profile<br/>[ProfileScreen.tsx]"]
  node_rank_badge["Rank display<br/>[RankBadge.tsx]"]
  node_rank_history["Rank history"]
  node_rank_data["Rank milestones"]
  node_xp_history["XP history<br/>[XPHistoryModal.tsx]"]
end

subgraph group_platform["State and sound"]
  node_store["Application state<br/>[store.ts]"]
  node_supabase["Supabase client<br/>[supabase.ts]"]
  node_sound_settings["Sound settings"]
  node_sound_types["Sound configuration<br/>[soundSystem.ts]"]
  node_audio_storage[("Custom audio storage<br/>[audioStorage.ts]")]
  node_custom_sound["Sound playback"]
  node_audio_effects["Audio effects<br/>[audioEffects.ts]"]
end

node_user(("Hunter"))

node_user -->|"opens"| node_app
node_app -->|"routes to"| node_registration
node_app -->|"routes to"| node_home
node_app -->|"routes to"| node_quests
node_app -->|"routes to"| node_alarms
node_app -->|"routes to"| node_workout
node_app -->|"routes to"| node_notes
node_app -->|"routes to"| node_profile
node_app -->|"uses"| node_store
node_home -->|"updates"| node_store
node_home -->|"renders"| node_bmi
node_home -->|"renders"| node_health
node_home -.->|"renders"| node_water
node_home -.->|"renders"| node_sleep
node_home -.->|"offers"| node_ai_coach
node_workout -->|"updates"| node_store
node_workout -->|"opens"| node_workout_history
node_workout -->|"saves custom exercise"| node_exercise_catalog
node_workout_history -->|"reads"| node_exercise_catalog
node_quests -->|"uses"| node_store
node_alarms -->|"uses"| node_store
node_profile -->|"updates"| node_store
node_profile -->|"renders"| node_rank_badge
node_profile -->|"opens"| node_rank_history
node_profile -->|"opens"| node_xp_history
node_bmi -->|"uses"| node_health_calculations
node_health -.->|"uses"| node_health_calculations
node_store -->|"syncs profile"| node_supabase
node_store -->|"plays events"| node_custom_sound
node_store -->|"plays tones"| node_audio_effects
node_sound_settings -->|"saves and lists files"| node_audio_storage
node_sound_settings -.->|"configures"| node_store
node_sound_settings -->|"uses settings"| node_sound_types
node_audio_storage -->|"stores metadata"| node_sound_types
node_custom_sound -->|"uses effects"| node_audio_effects
node_custom_sound -->|"loads audio"| node_audio_storage
node_store -->|"initializes state"| node_initial_data
node_store -->|"generates rank history"| node_rank_data
node_rank_history -->|"reads milestones"| node_rank_data

click node_app "https://github.com/sukuna938588-web/shadowrise/blob/main/src/App.tsx"
click node_registration "https://github.com/sukuna938588-web/shadowrise/blob/main/src/screens/HunterRegistrationScreen.tsx"
click node_home "https://github.com/sukuna938588-web/shadowrise/blob/main/src/screens/HomeScreen.tsx"
click node_quests "https://github.com/sukuna938588-web/shadowrise/blob/main/src/screens/QuestsScreen.tsx"
click node_workout "https://github.com/sukuna938588-web/shadowrise/blob/main/src/screens/AddScreen.tsx"
click node_workout_history "https://github.com/sukuna938588-web/shadowrise/blob/main/src/components/WorkoutHistoryModal.tsx"
click node_exercise_catalog "https://github.com/sukuna938588-web/shadowrise/blob/main/src/data/exerciseCatalog.ts"
click node_alarms "https://github.com/sukuna938588-web/shadowrise/blob/main/src/screens/AlarmsScreen.tsx"
click node_notes "https://github.com/sukuna938588-web/shadowrise/blob/main/src/screens/NotesScreen.tsx"
click node_profile "https://github.com/sukuna938588-web/shadowrise/blob/main/src/screens/ProfileScreen.tsx"
click node_bmi "https://github.com/sukuna938588-web/shadowrise/blob/main/src/components/BMICalculator.tsx"
click node_health "https://github.com/sukuna938588-web/shadowrise/blob/main/src/components/HealthIssuesTracker.tsx"
click node_water "https://github.com/sukuna938588-web/shadowrise/blob/main/src/components/WaterTracker.tsx"
click node_water_reminder "https://github.com/sukuna938588-web/shadowrise/blob/main/src/components/WaterReminderModal.tsx"
click node_sleep "https://github.com/sukuna938588-web/shadowrise/blob/main/src/components/SleepTracker.tsx"
click node_ai_coach "https://github.com/sukuna938588-web/shadowrise/blob/main/src/utils/aiCoachEngine.ts"
click node_rank_badge "https://github.com/sukuna938588-web/shadowrise/blob/main/src/components/RankBadge.tsx"
click node_rank_history "https://github.com/sukuna938588-web/shadowrise/blob/main/src/components/RankHistoryTimeline.tsx"
click node_rank_data "https://github.com/sukuna938588-web/shadowrise/blob/main/src/data/rankTimelineData.ts"
click node_xp_history "https://github.com/sukuna938588-web/shadowrise/blob/main/src/components/XPHistoryModal.tsx"
click node_store "https://github.com/sukuna938588-web/shadowrise/blob/main/src/store.ts"
click node_supabase "https://github.com/sukuna938588-web/shadowrise/blob/main/src/lib/supabase.ts"
click node_sound_settings "https://github.com/sukuna938588-web/shadowrise/blob/main/src/components/SoundsAndAlertsModal.tsx"
click node_sound_types "https://github.com/sukuna938588-web/shadowrise/blob/main/src/types/soundSystem.ts"
click node_audio_storage "https://github.com/sukuna938588-web/shadowrise/blob/main/src/utils/audioStorage.ts"
click node_custom_sound "https://github.com/sukuna938588-web/shadowrise/blob/main/src/utils/customSoundSystem.ts"
click node_audio_effects "https://github.com/sukuna938588-web/shadowrise/blob/main/src/utils/audioEffects.ts"
click node_initial_data "https://github.com/sukuna938588-web/shadowrise/blob/main/src/data/initialData.ts"
click node_health_calculations "https://github.com/sukuna938588-web/shadowrise/blob/main/src/utils/healthCalculations.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_registration,node_home,node_alarms,node_notes toneBlue
class node_quests,node_workout,node_workout_history,node_exercise_catalog,node_initial_data toneAmber
class node_bmi,node_health,node_water,node_water_reminder,node_sleep,node_ai_coach,node_health_calculations toneMint
class node_profile,node_rank_badge,node_rank_history,node_rank_data,node_xp_history toneRose
class node_store,node_supabase,node_sound_settings,node_sound_types,node_audio_storage,node_custom_sound,node_audio_effects,node_user toneIndigo
```

## Components

### App shell

- [App navigation](https://github.com/sukuna938588-web/shadowrise/blob/main/src/App.tsx): `src/App.tsx`
- [Hunter registration](https://github.com/sukuna938588-web/shadowrise/blob/main/src/screens/HunterRegistrationScreen.tsx): `src/screens/HunterRegistrationScreen.tsx`
- [Home dashboard](https://github.com/sukuna938588-web/shadowrise/blob/main/src/screens/HomeScreen.tsx): `src/screens/HomeScreen.tsx`
- [Alarm management](https://github.com/sukuna938588-web/shadowrise/blob/main/src/screens/AlarmsScreen.tsx): `src/screens/AlarmsScreen.tsx`
- [Notes](https://github.com/sukuna938588-web/shadowrise/blob/main/src/screens/NotesScreen.tsx): `src/screens/NotesScreen.tsx`

### Training and quests

- [Quest screen](https://github.com/sukuna938588-web/shadowrise/blob/main/src/screens/QuestsScreen.tsx): `src/screens/QuestsScreen.tsx`
- [Workout logging](https://github.com/sukuna938588-web/shadowrise/blob/main/src/screens/AddScreen.tsx): `src/screens/AddScreen.tsx`
- [Workout history](https://github.com/sukuna938588-web/shadowrise/blob/main/src/components/WorkoutHistoryModal.tsx): `src/components/WorkoutHistoryModal.tsx`
- [Exercise catalog](https://github.com/sukuna938588-web/shadowrise/blob/main/src/data/exerciseCatalog.ts): `src/data/exerciseCatalog.ts`
- [Initial quests and notes](https://github.com/sukuna938588-web/shadowrise/blob/main/src/data/initialData.ts): `src/data/initialData.ts`

### Health and recovery

- [BMI calculator](https://github.com/sukuna938588-web/shadowrise/blob/main/src/components/BMICalculator.tsx): `src/components/BMICalculator.tsx`
- [Health issues](https://github.com/sukuna938588-web/shadowrise/blob/main/src/components/HealthIssuesTracker.tsx): `src/components/HealthIssuesTracker.tsx`
- [Water tracking](https://github.com/sukuna938588-web/shadowrise/blob/main/src/components/WaterTracker.tsx): `src/components/WaterTracker.tsx`
- [Water reminders](https://github.com/sukuna938588-web/shadowrise/blob/main/src/components/WaterReminderModal.tsx): `src/components/WaterReminderModal.tsx`
- [Sleep tracking](https://github.com/sukuna938588-web/shadowrise/blob/main/src/components/SleepTracker.tsx): `src/components/SleepTracker.tsx`
- [AI coaching](https://github.com/sukuna938588-web/shadowrise/blob/main/src/utils/aiCoachEngine.ts): `src/utils/aiCoachEngine.ts`
- [Health calculations](https://github.com/sukuna938588-web/shadowrise/blob/main/src/utils/healthCalculations.ts): `src/utils/healthCalculations.ts`

### Progression system

- [Hunter profile](https://github.com/sukuna938588-web/shadowrise/blob/main/src/screens/ProfileScreen.tsx): `src/screens/ProfileScreen.tsx`
- [Rank display](https://github.com/sukuna938588-web/shadowrise/blob/main/src/components/RankBadge.tsx): `src/components/RankBadge.tsx`
- [Rank history](https://github.com/sukuna938588-web/shadowrise/blob/main/src/components/RankHistoryTimeline.tsx): `src/components/RankHistoryTimeline.tsx`
- [Rank milestones](https://github.com/sukuna938588-web/shadowrise/blob/main/src/data/rankTimelineData.ts): `src/data/rankTimelineData.ts`
- [XP history](https://github.com/sukuna938588-web/shadowrise/blob/main/src/components/XPHistoryModal.tsx): `src/components/XPHistoryModal.tsx`

### State and sound

- [Application state](https://github.com/sukuna938588-web/shadowrise/blob/main/src/store.ts): `src/store.ts`
- [Supabase client](https://github.com/sukuna938588-web/shadowrise/blob/main/src/lib/supabase.ts): `src/lib/supabase.ts`
- [Sound settings](https://github.com/sukuna938588-web/shadowrise/blob/main/src/components/SoundsAndAlertsModal.tsx): `src/components/SoundsAndAlertsModal.tsx`
- [Sound configuration](https://github.com/sukuna938588-web/shadowrise/blob/main/src/types/soundSystem.ts): `src/types/soundSystem.ts`
- [Custom audio storage](https://github.com/sukuna938588-web/shadowrise/blob/main/src/utils/audioStorage.ts): `src/utils/audioStorage.ts`
- [Sound playback](https://github.com/sukuna938588-web/shadowrise/blob/main/src/utils/customSoundSystem.ts): `src/utils/customSoundSystem.ts`
- [Audio effects](https://github.com/sukuna938588-web/shadowrise/blob/main/src/utils/audioEffects.ts): `src/utils/audioEffects.ts`

### Other components

- **Hunter**

## Connections

- Hunter → App navigation: opens
- App navigation → Hunter registration: routes to (evidence: `src/App.tsx`)
- App navigation → Home dashboard: routes to (evidence: `src/App.tsx`)
- App navigation → Quest screen: routes to (evidence: `src/App.tsx`)
- App navigation → Alarm management: routes to (evidence: `src/App.tsx`)
- App navigation → Workout logging: routes to (evidence: `src/App.tsx`)
- App navigation → Notes: routes to (evidence: `src/App.tsx`)
- App navigation → Hunter profile: routes to (evidence: `src/App.tsx`)
- App navigation → Application state: uses (evidence: `src/App.tsx`)
- Home dashboard → Application state: updates (evidence: `src/screens/HomeScreen.tsx`)
- Home dashboard → BMI calculator: renders (evidence: `src/screens/HomeScreen.tsx`)
- Home dashboard → Health issues: renders (evidence: `src/screens/HomeScreen.tsx`)
- Home dashboard → Water tracking: renders (evidence: `src/screens/HomeScreen.tsx`)
- Home dashboard → Sleep tracking: renders (evidence: `src/screens/HomeScreen.tsx`)
- Home dashboard → AI coaching: offers
- Workout logging → Application state: updates (evidence: `src/screens/AddScreen.tsx`)
- Workout logging → Workout history: opens (evidence: `src/screens/AddScreen.tsx`)
- Workout logging → Exercise catalog: saves custom exercise (evidence: `src/screens/AddScreen.tsx`)
- Workout history → Exercise catalog: reads (evidence: `src/components/WorkoutHistoryModal.tsx`)
- Quest screen → Application state: uses
- Alarm management → Application state: uses (evidence: `src/screens/AlarmsScreen.tsx`)
- Hunter profile → Application state: updates (evidence: `src/screens/ProfileScreen.tsx`)
- Hunter profile → Rank display: renders (evidence: `src/screens/ProfileScreen.tsx`)
- Hunter profile → Rank history: opens (evidence: `src/screens/ProfileScreen.tsx`)
- Hunter profile → XP history: opens (evidence: `src/screens/ProfileScreen.tsx`)
- BMI calculator → Health calculations: uses (evidence: `src/components/BMICalculator.tsx`)
- Health issues → Health calculations: uses
- Application state → Supabase client: syncs profile (evidence: `src/store.ts`)
- Application state → Sound playback: plays events (evidence: `src/store.ts`)
- Application state → Audio effects: plays tones (evidence: `src/store.ts`)
- Sound settings → Custom audio storage: saves and lists files (evidence: `src/components/SoundsAndAlertsModal.tsx`)
- Sound settings → Application state: configures
- Sound settings → Sound configuration: uses settings (evidence: `src/components/SoundsAndAlertsModal.tsx`)
- Custom audio storage → Sound configuration: stores metadata (evidence: `src/utils/audioStorage.ts`)
- Sound playback → Audio effects: uses effects (evidence: `src/utils/customSoundSystem.ts`)
- Sound playback → Custom audio storage: loads audio (evidence: `src/utils/customSoundSystem.ts`)
- Application state → Initial quests and notes: initializes state (evidence: `src/store.ts`)
- Application state → Rank milestones: generates rank history (evidence: `src/store.ts`)
- Rank history → Rank milestones: reads milestones (evidence: `src/components/RankHistoryTimeline.tsx`)
