# diegowkx/sharkgym architecture

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

- Interactive diagram: https://gitdiagram.com/diegowkx/sharkgym
- Repository: https://github.com/diegowkx/sharkgym

## Overview

SharkGym is a Flutter app for training and nutrition, aimed at users in Peru. Its apparent user journey starts in the app, then branches into account/profile setup, a dashboard, workout planning and logging, and nutrition planning. The tree also shows exercise demonstrations, streak progress, and local Peruvian nutrition data. Dart implementation excerpts were not provided, so the graph preserves these documented/tree-visible capabilities but marks inferred connections as unverified; it does not assert service calls or external integrations.

Main entry points: [`lib/presentacion/screens/dashboard/dashboard_screen.dart`](https://github.com/diegowkx/sharkgym/blob/main/lib/presentacion/screens/dashboard/dashboard_screen.dart) (Dashboard), [`lib/presentacion/widgets/training`](https://github.com/diegowkx/sharkgym/tree/main/lib/presentacion/widgets/training) (Training Views), [`lib/main.dart`](https://github.com/diegowkx/sharkgym/blob/main/lib/main.dart) (App Entry), [`lib/presentacion/widgets/nutrition/nutrition_screen.dart`](https://github.com/diegowkx/sharkgym/blob/main/lib/presentacion/widgets/nutrition/nutrition_screen.dart) (Nutrition Views)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App and Accounts"]
  node_app_entry["App Entry<br/>[main.dart]"]
  node_auth_screens["Sign-in and Setup"]
  node_auth_service["Authentication"]
  node_dashboard["Dashboard"]
end

subgraph group_training["Training"]
  node_training_views["Training Views"]
  node_training_service["Training Service"]
  node_training_models["Training Models"]
  node_exercise_names["Exercise Names"]
  node_exercise_demos["Exercise Demonstrations"]
  node_exercise_data["Exercise Dataset"]
end

subgraph group_nutrition["Nutrition"]
  node_nutrition_screen["Nutrition Views"]
  node_nutrition_planner["Nutrition Planner"]
  node_nutrition_service["Nutrition Repository"]
  node_nutrition_store["Nutrition Store"]
  node_nutrition_data["Peruvian Food Data"]
end

subgraph group_progress["Profile and Progress"]
  node_profile["Profile"]
  node_profile_service["Profile Service"]
  node_streak["Streak Progress<br/>[streak_card.dart]"]
  node_streak_model["Streak Model"]
end

node_user(("User"))

node_user -.->|"opens"| node_app_entry
node_app_entry -.->|"offers"| node_auth_screens
node_auth_screens -.->|"uses"| node_auth_service
node_app_entry -.->|"opens"| node_dashboard
node_dashboard -.->|"offers"| node_training_views
node_training_views -.->|"uses"| node_training_service
node_training_service -.->|"uses"| node_training_models
node_training_views -.->|"shows"| node_exercise_demos
node_exercise_demos -.->|"reads"| node_exercise_data
node_training_views -.->|"uses"| node_exercise_names
node_dashboard -.->|"offers"| node_nutrition_screen
node_nutrition_screen -.->|"uses"| node_nutrition_planner
node_nutrition_screen -.->|"uses"| node_nutrition_service
node_nutrition_service -.->|"uses"| node_nutrition_store
node_nutrition_service -.->|"reads"| node_nutrition_data
node_dashboard -.->|"offers"| node_profile
node_profile -.->|"uses"| node_profile_service
node_dashboard -.->|"shows"| node_streak
node_streak -.->|"uses"| node_streak_model

click node_app_entry "https://github.com/diegowkx/sharkgym/blob/main/lib/main.dart"
click node_auth_screens "https://github.com/diegowkx/sharkgym/tree/main/lib/presentacion/screens/auth"
click node_auth_service "https://github.com/diegowkx/sharkgym/blob/main/lib/data/services/authentication_service.dart"
click node_dashboard "https://github.com/diegowkx/sharkgym/blob/main/lib/presentacion/screens/dashboard/dashboard_screen.dart"
click node_training_views "https://github.com/diegowkx/sharkgym/tree/main/lib/presentacion/widgets/training"
click node_training_service "https://github.com/diegowkx/sharkgym/blob/main/lib/data/services/training_service.dart"
click node_training_models "https://github.com/diegowkx/sharkgym/blob/main/lib/data/models/training_models.dart"
click node_exercise_names "https://github.com/diegowkx/sharkgym/blob/main/lib/data/models/exercise_names_es.dart"
click node_exercise_demos "https://github.com/diegowkx/sharkgym/blob/main/lib/data/services/exercise_demonstrations.dart"
click node_exercise_data "https://github.com/diegowkx/sharkgym/blob/main/assets/data/exercises_dataset_es.json"
click node_nutrition_screen "https://github.com/diegowkx/sharkgym/blob/main/lib/presentacion/widgets/nutrition/nutrition_screen.dart"
click node_nutrition_planner "https://github.com/diegowkx/sharkgym/blob/main/lib/domain/nutrition_planner.dart"
click node_nutrition_service "https://github.com/diegowkx/sharkgym/blob/main/lib/data/services/peruvian_nutrition_repository.dart"
click node_nutrition_store "https://github.com/diegowkx/sharkgym/blob/main/lib/data/services/nutrition_store.dart"
click node_nutrition_data "https://github.com/diegowkx/sharkgym/blob/main/assets/data/peruvian_nutrition.json"
click node_profile "https://github.com/diegowkx/sharkgym/blob/main/lib/presentacion/screens/dashboard/profile_screen.dart"
click node_profile_service "https://github.com/diegowkx/sharkgym/blob/main/lib/data/services/profile_service.dart"
click node_streak "https://github.com/diegowkx/sharkgym/blob/main/lib/presentacion/widgets/streak/streak_card.dart"
click node_streak_model "https://github.com/diegowkx/sharkgym/blob/main/lib/data/models/streak_progress.dart"

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_entry,node_auth_screens,node_auth_service,node_dashboard,node_user toneBlue
class node_training_views,node_training_service,node_training_models,node_exercise_names,node_exercise_demos,node_exercise_data toneAmber
class node_nutrition_screen,node_nutrition_planner,node_nutrition_service,node_nutrition_store,node_nutrition_data toneMint
class node_profile,node_profile_service,node_streak,node_streak_model toneRose
```

## Components

### App and Accounts

- [App Entry](https://github.com/diegowkx/sharkgym/blob/main/lib/main.dart): `lib/main.dart`
- [Sign-in and Setup](https://github.com/diegowkx/sharkgym/tree/main/lib/presentacion/screens/auth): `lib/presentacion/screens/auth`
- [Authentication](https://github.com/diegowkx/sharkgym/blob/main/lib/data/services/authentication_service.dart): `lib/data/services/authentication_service.dart`
- [Dashboard](https://github.com/diegowkx/sharkgym/blob/main/lib/presentacion/screens/dashboard/dashboard_screen.dart): `lib/presentacion/screens/dashboard/dashboard_screen.dart`

### Training

- [Training Views](https://github.com/diegowkx/sharkgym/tree/main/lib/presentacion/widgets/training): `lib/presentacion/widgets/training`
- [Training Service](https://github.com/diegowkx/sharkgym/blob/main/lib/data/services/training_service.dart): `lib/data/services/training_service.dart`
- [Training Models](https://github.com/diegowkx/sharkgym/blob/main/lib/data/models/training_models.dart): `lib/data/models/training_models.dart`
- [Exercise Names](https://github.com/diegowkx/sharkgym/blob/main/lib/data/models/exercise_names_es.dart): `lib/data/models/exercise_names_es.dart`
- [Exercise Demonstrations](https://github.com/diegowkx/sharkgym/blob/main/lib/data/services/exercise_demonstrations.dart): `lib/data/services/exercise_demonstrations.dart`
- [Exercise Dataset](https://github.com/diegowkx/sharkgym/blob/main/assets/data/exercises_dataset_es.json): `assets/data/exercises_dataset_es.json`

### Nutrition

- [Nutrition Views](https://github.com/diegowkx/sharkgym/blob/main/lib/presentacion/widgets/nutrition/nutrition_screen.dart): `lib/presentacion/widgets/nutrition/nutrition_screen.dart`
- [Nutrition Planner](https://github.com/diegowkx/sharkgym/blob/main/lib/domain/nutrition_planner.dart): `lib/domain/nutrition_planner.dart`
- [Nutrition Repository](https://github.com/diegowkx/sharkgym/blob/main/lib/data/services/peruvian_nutrition_repository.dart): `lib/data/services/peruvian_nutrition_repository.dart`
- [Nutrition Store](https://github.com/diegowkx/sharkgym/blob/main/lib/data/services/nutrition_store.dart): `lib/data/services/nutrition_store.dart`
- [Peruvian Food Data](https://github.com/diegowkx/sharkgym/blob/main/assets/data/peruvian_nutrition.json): `assets/data/peruvian_nutrition.json`

### Profile and Progress

- [Profile](https://github.com/diegowkx/sharkgym/blob/main/lib/presentacion/screens/dashboard/profile_screen.dart): `lib/presentacion/screens/dashboard/profile_screen.dart`
- [Profile Service](https://github.com/diegowkx/sharkgym/blob/main/lib/data/services/profile_service.dart): `lib/data/services/profile_service.dart`
- [Streak Progress](https://github.com/diegowkx/sharkgym/blob/main/lib/presentacion/widgets/streak/streak_card.dart): `lib/presentacion/widgets/streak/streak_card.dart`
- [Streak Model](https://github.com/diegowkx/sharkgym/blob/main/lib/data/models/streak_progress.dart): `lib/data/models/streak_progress.dart`

### Other components

- **User**

## Connections

- User → App Entry: opens
- App Entry → Sign-in and Setup: offers
- Sign-in and Setup → Authentication: uses
- App Entry → Dashboard: opens
- Dashboard → Training Views: offers
- Training Views → Training Service: uses
- Training Service → Training Models: uses
- Training Views → Exercise Demonstrations: shows
- Exercise Demonstrations → Exercise Dataset: reads
- Training Views → Exercise Names: uses
- Dashboard → Nutrition Views: offers
- Nutrition Views → Nutrition Planner: uses
- Nutrition Views → Nutrition Repository: uses
- Nutrition Repository → Nutrition Store: uses
- Nutrition Repository → Peruvian Food Data: reads
- Dashboard → Profile: offers
- Profile → Profile Service: uses
- Dashboard → Streak Progress: shows
- Streak Progress → Streak Model: uses
