# ryan-wong123/chorevo architecture

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

- Interactive diagram: https://gitdiagram.com/ryan-wong123/chorevo
- Repository: https://github.com/ryan-wong123/chorevo

## Overview

Chorevo is a dance-learning app: learners browse dances, practise with live pose feedback, and review progress; educators upload dances and pose templates. Its Android/Compose app is the documented primary client, with Firebase functions supporting feed, groups, rewards, and sharing. The tree omits the Android source files, so app features are represented by documented package paths and their internal wiring is not asserted. The repository also contains substantial device/browser replay and dashboard tooling; its links below are limited to relationships visible in the source index.

Main entry points: [`app/src/main/java/com/example/chorevo`](https://github.com/ryan-wong123/chorevo/tree/main/app/src/main/java/com/example/chorevo) (Compose app), [`functions/index.js`](https://github.com/ryan-wong123/chorevo/blob/main/functions/index.js) (Cloud Functions), [`scripts/ecr_replay.py`](https://github.com/ryan-wong123/chorevo/blob/main/scripts/ecr_replay.py) (Replay runner), [`app/src/main/java/com/example/chorevo/danceactivity`](https://github.com/ryan-wong123/chorevo/tree/main/app/src/main/java/com/example/chorevo/danceactivity) (AR practice)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_clients["App clients"]
  node_android["Compose app"]
  node_library["Dance library"]
  node_practice["AR practice"]
  node_pose["Pose detection"]
  node_uploads["Educator uploads"]
  node_analytics["Session analytics"]
  node_auth["Auth and profiles"]
  node_notifications["Reminders"]
  node_leaderboardui["Leaderboard UI"]
  node_ios["iOS host<br/>[ContentView.swift]"]
end

subgraph group_backend["Firebase backend"]
  node_cloud["Cloud Functions<br/>[index.js]"]
  node_discovery["Feed indexing<br/>[discovery.js]"]
  node_maintenance["Feed maintenance<br/>[maintenance.js]"]
  node_share["Dance sharing<br/>[render.js]"]
end

subgraph group_progress["Progress and community"]
  node_groups["Group services<br/>[groups.js]"]
  node_rewards["Rewards engine<br/>[rewards.js]"]
  node_leaderboard["Leaderboard service<br/>[leaderboard.js]"]
end

subgraph group_tools["Replay and inspection"]
  node_replay["Trace builder<br/>[ecr_trace.py]"]
  node_replayrun["Replay runner<br/>[ecr_replay.py]"]
  node_device["Device state<br/>[device_state.py]"]
  node_repair["Replay repair<br/>[repair.py]"]
  node_dashboard["Run dashboard<br/>[dashboard.py]"]
  node_demo["Dashboard demo<br/>[dashboard_demo.py]"]
  node_browser["Web browser driver<br/>[browser.py]"]
  node_pagejs["Page interaction<br/>[page_js.py]"]
  node_a11y["Accessibility checks<br/>[a11y.py]"]
  node_color["Color filtering<br/>[color_filter.py]"]
  node_summarize["Run summaries<br/>[summarize.py]"]
  node_compare["Run comparison<br/>[compare.py]"]
end

node_learner(("Learner / educator"))
node_firebase[("Firebase services")]

node_learner -->|"uses"| node_android
node_android -->|"browses"| node_library
node_android -->|"starts practice"| node_practice
node_practice -->|"uses inference"| node_pose
node_learner -->|"educator uploads"| node_uploads
node_learner -->|"reviews sessions"| node_analytics
node_android -->|"signs in"| node_auth
node_android -->|"sets reminders"| node_notifications
node_android -->|"views rankings"| node_leaderboardui
node_ios -->|"hosts shared UI"| node_android
node_cloud -->|"renders pages"| node_share
node_cloud -->|"uses feed helpers"| node_discovery
node_cloud -->|"runs jobs"| node_maintenance
node_cloud -->|"uses group helpers"| node_groups
node_cloud -->|"computes rewards"| node_rewards
node_cloud -.->|"uses service"| node_leaderboard
node_cloud -->|"reads and writes"| node_firebase
node_android -->|"syncs sessions"| node_firebase
node_replay -->|"creates trace"| node_replayrun
node_replayrun -->|"uses device state"| node_device
node_replayrun -->|"uses repair"| node_repair
node_dashboard -->|"uses demo"| node_demo
node_browser -->|"uses page actions"| node_pagejs
node_compare -->|"uses summaries"| node_summarize
node_a11y -->|"uses filters"| node_color

click node_android "https://github.com/ryan-wong123/chorevo/tree/main/app/src/main/java/com/example/chorevo"
click node_library "https://github.com/ryan-wong123/chorevo/tree/main/app/src/main/java/com/example/chorevo/dancelibrarylist"
click node_practice "https://github.com/ryan-wong123/chorevo/tree/main/app/src/main/java/com/example/chorevo/danceactivity"
click node_pose "https://github.com/ryan-wong123/chorevo/tree/main/app/src/main/java/com/example/chorevo/posedetection"
click node_uploads "https://github.com/ryan-wong123/chorevo/tree/main/app/src/main/java/com/example/chorevo/videouploads"
click node_analytics "https://github.com/ryan-wong123/chorevo/tree/main/app/src/main/java/com/example/chorevo/analytics"
click node_auth "https://github.com/ryan-wong123/chorevo/tree/main/app/src/main/java/com/example/chorevo/firebase"
click node_notifications "https://github.com/ryan-wong123/chorevo/tree/main/app/src/main/java/com/example/chorevo/notification"
click node_leaderboardui "https://github.com/ryan-wong123/chorevo/tree/main/app/src/main/java/com/example/chorevo/leaderboard"
click node_ios "https://github.com/ryan-wong123/chorevo/blob/main/iosApp/iosApp/ContentView.swift"
click node_cloud "https://github.com/ryan-wong123/chorevo/blob/main/functions/index.js"
click node_discovery "https://github.com/ryan-wong123/chorevo/blob/main/functions/discovery.js"
click node_maintenance "https://github.com/ryan-wong123/chorevo/blob/main/functions/maintenance.js"
click node_share "https://github.com/ryan-wong123/chorevo/blob/main/functions/render.js"
click node_groups "https://github.com/ryan-wong123/chorevo/blob/main/functions/groups.js"
click node_rewards "https://github.com/ryan-wong123/chorevo/blob/main/functions/rewards.js"
click node_leaderboard "https://github.com/ryan-wong123/chorevo/blob/main/functions/leaderboard.js"
click node_replay "https://github.com/ryan-wong123/chorevo/blob/main/scripts/ecr_trace.py"
click node_replayrun "https://github.com/ryan-wong123/chorevo/blob/main/scripts/ecr_replay.py"
click node_device "https://github.com/ryan-wong123/chorevo/blob/main/scripts/device_state.py"
click node_repair "https://github.com/ryan-wong123/chorevo/blob/main/scripts/repair.py"
click node_dashboard "https://github.com/ryan-wong123/chorevo/blob/main/scripts/dashboard.py"
click node_demo "https://github.com/ryan-wong123/chorevo/blob/main/scripts/dashboard_demo.py"
click node_browser "https://github.com/ryan-wong123/chorevo/blob/main/scripts/web/browser.py"
click node_pagejs "https://github.com/ryan-wong123/chorevo/blob/main/scripts/web/page_js.py"
click node_a11y "https://github.com/ryan-wong123/chorevo/blob/main/scripts/a11y.py"
click node_color "https://github.com/ryan-wong123/chorevo/blob/main/scripts/color_filter.py"
click node_summarize "https://github.com/ryan-wong123/chorevo/blob/main/scripts/summarize.py"
click node_compare "https://github.com/ryan-wong123/chorevo/blob/main/scripts/compare.py"

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_android,node_library,node_practice,node_pose,node_uploads,node_analytics,node_auth,node_notifications,node_leaderboardui,node_ios toneBlue
class node_cloud,node_discovery,node_maintenance,node_share,node_firebase toneAmber
class node_groups,node_rewards,node_leaderboard toneMint
class node_replay,node_replayrun,node_device,node_repair,node_dashboard,node_demo,node_browser,node_pagejs,node_a11y,node_color,node_summarize,node_compare toneRose
class node_learner toneIndigo
```

## Components

### App clients

- [Compose app](https://github.com/ryan-wong123/chorevo/tree/main/app/src/main/java/com/example/chorevo): `app/src/main/java/com/example/chorevo`
- [Dance library](https://github.com/ryan-wong123/chorevo/tree/main/app/src/main/java/com/example/chorevo/dancelibrarylist): `app/src/main/java/com/example/chorevo/dancelibrarylist`
- [AR practice](https://github.com/ryan-wong123/chorevo/tree/main/app/src/main/java/com/example/chorevo/danceactivity): `app/src/main/java/com/example/chorevo/danceactivity`
- [Pose detection](https://github.com/ryan-wong123/chorevo/tree/main/app/src/main/java/com/example/chorevo/posedetection): `app/src/main/java/com/example/chorevo/posedetection`
- [Educator uploads](https://github.com/ryan-wong123/chorevo/tree/main/app/src/main/java/com/example/chorevo/videouploads): `app/src/main/java/com/example/chorevo/videouploads`
- [Session analytics](https://github.com/ryan-wong123/chorevo/tree/main/app/src/main/java/com/example/chorevo/analytics): `app/src/main/java/com/example/chorevo/analytics`
- [Auth and profiles](https://github.com/ryan-wong123/chorevo/tree/main/app/src/main/java/com/example/chorevo/firebase): `app/src/main/java/com/example/chorevo/firebase`
- [Reminders](https://github.com/ryan-wong123/chorevo/tree/main/app/src/main/java/com/example/chorevo/notification): `app/src/main/java/com/example/chorevo/notification`
- [Leaderboard UI](https://github.com/ryan-wong123/chorevo/tree/main/app/src/main/java/com/example/chorevo/leaderboard): `app/src/main/java/com/example/chorevo/leaderboard`
- [iOS host](https://github.com/ryan-wong123/chorevo/blob/main/iosApp/iosApp/ContentView.swift): `iosApp/iosApp/ContentView.swift`

### Firebase backend

- [Cloud Functions](https://github.com/ryan-wong123/chorevo/blob/main/functions/index.js): `functions/index.js`
- [Feed indexing](https://github.com/ryan-wong123/chorevo/blob/main/functions/discovery.js): `functions/discovery.js`
- [Feed maintenance](https://github.com/ryan-wong123/chorevo/blob/main/functions/maintenance.js): `functions/maintenance.js`
- [Dance sharing](https://github.com/ryan-wong123/chorevo/blob/main/functions/render.js): `functions/render.js`

### Progress and community

- [Group services](https://github.com/ryan-wong123/chorevo/blob/main/functions/groups.js): `functions/groups.js`
- [Rewards engine](https://github.com/ryan-wong123/chorevo/blob/main/functions/rewards.js): `functions/rewards.js`
- [Leaderboard service](https://github.com/ryan-wong123/chorevo/blob/main/functions/leaderboard.js): `functions/leaderboard.js`

### Replay and inspection

- [Trace builder](https://github.com/ryan-wong123/chorevo/blob/main/scripts/ecr_trace.py): `scripts/ecr_trace.py`
- [Replay runner](https://github.com/ryan-wong123/chorevo/blob/main/scripts/ecr_replay.py): `scripts/ecr_replay.py`
- [Device state](https://github.com/ryan-wong123/chorevo/blob/main/scripts/device_state.py): `scripts/device_state.py`
- [Replay repair](https://github.com/ryan-wong123/chorevo/blob/main/scripts/repair.py): `scripts/repair.py`
- [Run dashboard](https://github.com/ryan-wong123/chorevo/blob/main/scripts/dashboard.py): `scripts/dashboard.py`
- [Dashboard demo](https://github.com/ryan-wong123/chorevo/blob/main/scripts/dashboard_demo.py): `scripts/dashboard_demo.py`
- [Web browser driver](https://github.com/ryan-wong123/chorevo/blob/main/scripts/web/browser.py): `scripts/web/browser.py`
- [Page interaction](https://github.com/ryan-wong123/chorevo/blob/main/scripts/web/page_js.py): `scripts/web/page_js.py`
- [Accessibility checks](https://github.com/ryan-wong123/chorevo/blob/main/scripts/a11y.py): `scripts/a11y.py`
- [Color filtering](https://github.com/ryan-wong123/chorevo/blob/main/scripts/color_filter.py): `scripts/color_filter.py`
- [Run summaries](https://github.com/ryan-wong123/chorevo/blob/main/scripts/summarize.py): `scripts/summarize.py`
- [Run comparison](https://github.com/ryan-wong123/chorevo/blob/main/scripts/compare.py): `scripts/compare.py`

### Other components

- **Learner / educator**
- **Firebase services**

## Connections

- Learner / educator → Compose app: uses (evidence: `README.md`)
- Compose app → Dance library: browses (evidence: `README.md`)
- Compose app → AR practice: starts practice (evidence: `README.md`)
- AR practice → Pose detection: uses inference (evidence: `README.md`)
- Learner / educator → Educator uploads: educator uploads (evidence: `README.md`)
- Learner / educator → Session analytics: reviews sessions (evidence: `README.md`)
- Compose app → Auth and profiles: signs in (evidence: `README.md`)
- Compose app → Reminders: sets reminders (evidence: `README.md`)
- Compose app → Leaderboard UI: views rankings (evidence: `README.md`)
- iOS host → Compose app: hosts shared UI (evidence: `iosApp/iosApp/ContentView.swift`)
- Cloud Functions → Dance sharing: renders pages (evidence: `functions/index.js`)
- Cloud Functions → Feed indexing: uses feed helpers (evidence: `functions/index.js`)
- Cloud Functions → Feed maintenance: runs jobs (evidence: `functions/index.js`)
- Cloud Functions → Group services: uses group helpers (evidence: `functions/index.js`)
- Cloud Functions → Rewards engine: computes rewards (evidence: `functions/rewards.js`)
- Cloud Functions → Leaderboard service: uses service (evidence: `functions/index.js`)
- Cloud Functions → Firebase services: reads and writes (evidence: `functions/index.js`)
- Compose app → Firebase services: syncs sessions (evidence: `README.md`)
- Trace builder → Replay runner: creates trace (evidence: `scripts/ecr_replay.py`)
- Replay runner → Device state: uses device state (evidence: `scripts/ecr_replay.py`)
- Replay runner → Replay repair: uses repair (evidence: `scripts/replay_set.py`)
- Run dashboard → Dashboard demo: uses demo (evidence: `scripts/dashboard.py`)
- Web browser driver → Page interaction: uses page actions (evidence: `scripts/web/browser.py`)
- Run comparison → Run summaries: uses summaries (evidence: `scripts/compare.py`)
- Accessibility checks → Color filtering: uses filters (evidence: `scripts/android/screen.py`)
