# richardhtoomyat/emg_hackatlantic architecture

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

- Interactive diagram: https://gitdiagram.com/richardhtoomyat/emg_hackatlantic
- Repository: https://github.com/richardhtoomyat/emg_hackatlantic

## Overview

activateMyo is a React front-end prototype for an athlete and coach to review muscle activation, fatigue, readiness, and training quality; its data is currently hardcoded, not sensor-fed. The principal workflow moves from the Today readiness and training overview to a live-set display, then a session summary with muscle recruitment and performance details. History, coach access, and athlete/device profile are separate product areas. The README documents these capabilities; unsampled page implementations are represented by their exact paths, but their internal behavior is not inferred.

Main entry points: [`src/App.tsx`](https://github.com/richardhtoomyat/emg_hackatlantic/blob/main/src/App.tsx) (App router), [`src/pages/Today.tsx`](https://github.com/richardhtoomyat/emg_hackatlantic/blob/main/src/pages/Today.tsx) (Today overview), [`src/pages/Session.tsx`](https://github.com/richardhtoomyat/emg_hackatlantic/blob/main/src/pages/Session.tsx) (Session summary), [`src/components/Layout.tsx`](https://github.com/richardhtoomyat/emg_hackatlantic/blob/main/src/components/Layout.tsx) (Navigation layout)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_navigation["App navigation"]
  node_app["App router<br/>[App.tsx]"]
  node_layout["Navigation layout<br/>[Layout.tsx]"]
end

subgraph group_training["Training workflow"]
  node_today["Today overview<br/>[Today.tsx]"]
  node_workout["Live workout<br/>[Workout.tsx]"]
  node_session["Session summary<br/>[Session.tsx]"]
end

subgraph group_insights["Athlete insights"]
  node_history["Session history<br/>[History.tsx]"]
  node_coach_access["Coach access<br/>[Coach.tsx]"]
  node_profile["Athlete profile<br/>[Profile.tsx]"]
end

subgraph group_domain["Data and presentation"]
  node_mock_data["Mock domain data<br/>[mockData.ts]"]
  node_types["Domain types<br/>[types.ts]"]
  node_muscle_map["Muscle map logic<br/>[muscleMap.ts]"]
  node_body_map["Anatomical map<br/>[BodyMap.tsx]"]
  node_activation_ring["Activation rings<br/>[ActivationRing.tsx]"]
  node_score_card["Score display<br/>[ScoreCard.tsx]"]
  node_week_bars["Weekly bars<br/>[WeekBars.tsx]"]
  node_stat_grid["Metric displays<br/>[StatGrid.tsx]"]
  node_legend["Map legend<br/>[Legend.tsx]"]
end

node_athlete(("Athlete"))
node_coach(("Coach"))

node_athlete -->|"uses app"| node_app
node_coach -.->|"views shared app"| node_app
node_app -->|"renders layout"| node_layout
node_app -->|"routes to"| node_today
node_app -->|"routes to"| node_workout
node_app -->|"routes to"| node_session
node_app -->|"routes to"| node_history
node_app -->|"routes to"| node_coach_access
node_app -->|"routes to"| node_profile
node_layout -->|"hosts route"| node_today
node_layout -->|"hosts route"| node_workout
node_layout -->|"hosts route"| node_history
node_layout -->|"hosts route"| node_coach_access
node_layout -->|"hosts route"| node_profile
node_today -->|"reads overview data"| node_mock_data
node_workout -->|"reads live set"| node_mock_data
node_session -->|"reads session"| node_mock_data
node_today -->|"merges exercises"| node_muscle_map
node_session -->|"builds exercise map"| node_muscle_map
node_muscle_map -->|"reads exercise definitions"| node_mock_data
node_today -->|"renders readiness"| node_score_card
node_today -->|"renders weekly rollup"| node_week_bars
node_today -->|"renders muscle map"| node_body_map
node_today -->|"renders key"| node_legend
node_today -->|"renders metrics"| node_stat_grid
node_workout -->|"renders activation"| node_activation_ring
node_workout -->|"renders set metrics"| node_stat_grid
node_session -->|"renders score"| node_score_card
node_session -->|"renders muscle map"| node_body_map
node_session -->|"renders key"| node_legend
node_session -->|"renders session metrics"| node_stat_grid

click node_app "https://github.com/richardhtoomyat/emg_hackatlantic/blob/main/src/App.tsx"
click node_layout "https://github.com/richardhtoomyat/emg_hackatlantic/blob/main/src/components/Layout.tsx"
click node_today "https://github.com/richardhtoomyat/emg_hackatlantic/blob/main/src/pages/Today.tsx"
click node_workout "https://github.com/richardhtoomyat/emg_hackatlantic/blob/main/src/pages/Workout.tsx"
click node_session "https://github.com/richardhtoomyat/emg_hackatlantic/blob/main/src/pages/Session.tsx"
click node_history "https://github.com/richardhtoomyat/emg_hackatlantic/blob/main/src/pages/History.tsx"
click node_coach_access "https://github.com/richardhtoomyat/emg_hackatlantic/blob/main/src/pages/Coach.tsx"
click node_profile "https://github.com/richardhtoomyat/emg_hackatlantic/blob/main/src/pages/Profile.tsx"
click node_mock_data "https://github.com/richardhtoomyat/emg_hackatlantic/blob/main/src/data/mockData.ts"
click node_types "https://github.com/richardhtoomyat/emg_hackatlantic/blob/main/src/data/types.ts"
click node_muscle_map "https://github.com/richardhtoomyat/emg_hackatlantic/blob/main/src/lib/muscleMap.ts"
click node_body_map "https://github.com/richardhtoomyat/emg_hackatlantic/blob/main/src/components/BodyMap.tsx"
click node_activation_ring "https://github.com/richardhtoomyat/emg_hackatlantic/blob/main/src/components/ActivationRing.tsx"
click node_score_card "https://github.com/richardhtoomyat/emg_hackatlantic/blob/main/src/components/ScoreCard.tsx"
click node_week_bars "https://github.com/richardhtoomyat/emg_hackatlantic/blob/main/src/components/WeekBars.tsx"
click node_stat_grid "https://github.com/richardhtoomyat/emg_hackatlantic/blob/main/src/components/StatGrid.tsx"
click node_legend "https://github.com/richardhtoomyat/emg_hackatlantic/blob/main/src/components/Legend.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_layout toneBlue
class node_today,node_workout,node_session toneAmber
class node_history,node_coach_access,node_profile toneMint
class node_mock_data,node_types,node_muscle_map,node_body_map,node_activation_ring,node_score_card,node_week_bars,node_stat_grid,node_legend toneRose
class node_athlete,node_coach toneIndigo
```

## Components

### App navigation

- [App router](https://github.com/richardhtoomyat/emg_hackatlantic/blob/main/src/App.tsx): `src/App.tsx`
- [Navigation layout](https://github.com/richardhtoomyat/emg_hackatlantic/blob/main/src/components/Layout.tsx): `src/components/Layout.tsx`

### Training workflow

- [Today overview](https://github.com/richardhtoomyat/emg_hackatlantic/blob/main/src/pages/Today.tsx): `src/pages/Today.tsx`
- [Live workout](https://github.com/richardhtoomyat/emg_hackatlantic/blob/main/src/pages/Workout.tsx): `src/pages/Workout.tsx`
- [Session summary](https://github.com/richardhtoomyat/emg_hackatlantic/blob/main/src/pages/Session.tsx): `src/pages/Session.tsx`

### Athlete insights

- [Session history](https://github.com/richardhtoomyat/emg_hackatlantic/blob/main/src/pages/History.tsx): `src/pages/History.tsx`
- [Coach access](https://github.com/richardhtoomyat/emg_hackatlantic/blob/main/src/pages/Coach.tsx): `src/pages/Coach.tsx`
- [Athlete profile](https://github.com/richardhtoomyat/emg_hackatlantic/blob/main/src/pages/Profile.tsx): `src/pages/Profile.tsx`

### Data and presentation

- [Mock domain data](https://github.com/richardhtoomyat/emg_hackatlantic/blob/main/src/data/mockData.ts): `src/data/mockData.ts`
- [Domain types](https://github.com/richardhtoomyat/emg_hackatlantic/blob/main/src/data/types.ts): `src/data/types.ts`
- [Muscle map logic](https://github.com/richardhtoomyat/emg_hackatlantic/blob/main/src/lib/muscleMap.ts): `src/lib/muscleMap.ts`
- [Anatomical map](https://github.com/richardhtoomyat/emg_hackatlantic/blob/main/src/components/BodyMap.tsx): `src/components/BodyMap.tsx`
- [Activation rings](https://github.com/richardhtoomyat/emg_hackatlantic/blob/main/src/components/ActivationRing.tsx): `src/components/ActivationRing.tsx`
- [Score display](https://github.com/richardhtoomyat/emg_hackatlantic/blob/main/src/components/ScoreCard.tsx): `src/components/ScoreCard.tsx`
- [Weekly bars](https://github.com/richardhtoomyat/emg_hackatlantic/blob/main/src/components/WeekBars.tsx): `src/components/WeekBars.tsx`
- [Metric displays](https://github.com/richardhtoomyat/emg_hackatlantic/blob/main/src/components/StatGrid.tsx): `src/components/StatGrid.tsx`
- [Map legend](https://github.com/richardhtoomyat/emg_hackatlantic/blob/main/src/components/Legend.tsx): `src/components/Legend.tsx`

### Other components

- **Athlete**
- **Coach**

## Connections

- Athlete → App router: uses app
- Coach → App router: views shared app
- App router → Navigation layout: renders layout
- App router → Today overview: routes to
- App router → Live workout: routes to
- App router → Session summary: routes to
- App router → Session history: routes to
- App router → Coach access: routes to
- App router → Athlete profile: routes to
- Navigation layout → Today overview: hosts route
- Navigation layout → Live workout: hosts route
- Navigation layout → Session history: hosts route
- Navigation layout → Coach access: hosts route
- Navigation layout → Athlete profile: hosts route
- Today overview → Mock domain data: reads overview data
- Live workout → Mock domain data: reads live set
- Session summary → Mock domain data: reads session
- Today overview → Muscle map logic: merges exercises
- Session summary → Muscle map logic: builds exercise map
- Muscle map logic → Mock domain data: reads exercise definitions
- Today overview → Score display: renders readiness
- Today overview → Weekly bars: renders weekly rollup
- Today overview → Anatomical map: renders muscle map
- Today overview → Map legend: renders key
- Today overview → Metric displays: renders metrics
- Live workout → Activation rings: renders activation
- Live workout → Metric displays: renders set metrics
- Session summary → Score display: renders score
- Session summary → Anatomical map: renders muscle map
- Session summary → Map legend: renders key
- Session summary → Metric displays: renders session metrics
