# praneetatmuri/flexipulse architecture

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

- Interactive diagram: https://gitdiagram.com/praneetatmuri/flexipulse
- Repository: https://github.com/praneetatmuri/flexipulse

## Overview

FlexiPulse is a member-wellness and gym-operations platform. Members and trainers use a React dashboard to authenticate, track health and goals, book appointments, and access AI-generated diet or workout plans; trainers also manage rosters and leave blocks. The frontend API client sends requests to a Spring Boot REST layer, whose services and repositories persist domain data. README documents Gemini integration for diet generation. Backend implementation files were not sampled, so backend relationships below reflect documented architecture rather than inspected calls.

Main entry points: [`frontend/src/App.jsx`](https://github.com/praneetatmuri/flexipulse/blob/main/frontend/src/App.jsx) (React app), [`backend/src/main/java/com/example/demo/controller`](https://github.com/praneetatmuri/flexipulse/tree/main/backend/src/main/java/com/example/demo/controller) (REST controllers), [`frontend/src/services/apiService.js`](https://github.com/praneetatmuri/flexipulse/blob/main/frontend/src/services/apiService.js) (API client), [`backend/src/main/java/com/example/demo/repository`](https://github.com/praneetatmuri/flexipulse/tree/main/backend/src/main/java/com/example/demo/repository) (JPA repositories)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Web experience"]
  node_app["React app<br/>[App.jsx]"]
  node_navigation["Navigation<br/>[Navigation.jsx]"]
  node_auth_ui["Sign in<br/>[Auth.jsx]"]
  node_dashboard["Wellness dashboard<br/>[Dashboard.jsx]"]
  node_booking_ui["Appointment booking<br/>[Booking.jsx]"]
  node_diet_ui["Diet planner<br/>[AIDiet.jsx]"]
  node_workout_ui["Workout coach<br/>[WorkoutAI.jsx]"]
  node_trainer_ui["Trainer roster<br/>[TrainerMembers.jsx]"]
  node_api_client["API client<br/>[apiService.js]"]
end

subgraph group_backend["Backend API"]
  node_rest["REST controllers"]
end

subgraph group_domain["Wellness services"]
  node_auth_service["User and auth<br/>[UserService.java]"]
  node_health_service["Health and goals<br/>[HealthService.java]"]
  node_appointment_service["Appointments"]
  node_leave_service["Trainer leave"]
  node_nutrition_service["Nutrition planning"]
  node_workout_service["Workout planning"]
end

subgraph group_storage["Persistence and AI"]
  node_repositories["JPA repositories"]
  node_database[("H2 database")]
end

node_member(("Member"))
node_trainer(("Trainer"))
node_gemini{{"Gemini API"}}

node_member -->|"uses"| node_app
node_trainer -->|"uses"| node_app
node_app -->|"renders"| node_navigation
node_app -->|"routes to"| node_auth_ui
node_app -->|"routes to"| node_dashboard
node_app -->|"routes to"| node_booking_ui
node_app -->|"routes to"| node_diet_ui
node_app -->|"routes to"| node_workout_ui
node_app -->|"routes to"| node_trainer_ui
node_auth_ui -->|"calls"| node_api_client
node_dashboard -->|"calls"| node_api_client
node_booking_ui -->|"calls"| node_api_client
node_diet_ui -->|"calls"| node_api_client
node_workout_ui -->|"calls"| node_api_client
node_trainer_ui -->|"calls"| node_api_client
node_api_client -->|"HTTP requests"| node_rest
node_rest -.->|"dispatches"| node_auth_service
node_rest -.->|"dispatches"| node_health_service
node_rest -.->|"dispatches"| node_appointment_service
node_rest -.->|"dispatches"| node_leave_service
node_rest -.->|"dispatches"| node_nutrition_service
node_rest -.->|"dispatches"| node_workout_service
node_auth_service -.->|"uses"| node_repositories
node_health_service -.->|"uses"| node_repositories
node_appointment_service -.->|"uses"| node_repositories
node_leave_service -.->|"uses"| node_repositories
node_nutrition_service -.->|"uses"| node_repositories
node_workout_service -.->|"uses"| node_repositories
node_repositories -->|"persists"| node_database
node_nutrition_service -.->|"generates plans"| node_gemini

click node_app "https://github.com/praneetatmuri/flexipulse/blob/main/frontend/src/App.jsx"
click node_navigation "https://github.com/praneetatmuri/flexipulse/blob/main/frontend/src/components/Navigation.jsx"
click node_auth_ui "https://github.com/praneetatmuri/flexipulse/blob/main/frontend/src/pages/Auth.jsx"
click node_dashboard "https://github.com/praneetatmuri/flexipulse/blob/main/frontend/src/pages/Dashboard.jsx"
click node_booking_ui "https://github.com/praneetatmuri/flexipulse/blob/main/frontend/src/pages/Booking.jsx"
click node_diet_ui "https://github.com/praneetatmuri/flexipulse/blob/main/frontend/src/pages/AIDiet.jsx"
click node_workout_ui "https://github.com/praneetatmuri/flexipulse/blob/main/frontend/src/pages/WorkoutAI.jsx"
click node_trainer_ui "https://github.com/praneetatmuri/flexipulse/blob/main/frontend/src/pages/TrainerMembers.jsx"
click node_api_client "https://github.com/praneetatmuri/flexipulse/blob/main/frontend/src/services/apiService.js"
click node_rest "https://github.com/praneetatmuri/flexipulse/tree/main/backend/src/main/java/com/example/demo/controller"
click node_auth_service "https://github.com/praneetatmuri/flexipulse/blob/main/backend/src/main/java/com/example/demo/service/UserService.java"
click node_health_service "https://github.com/praneetatmuri/flexipulse/blob/main/backend/src/main/java/com/example/demo/service/HealthService.java"
click node_appointment_service "https://github.com/praneetatmuri/flexipulse/blob/main/backend/src/main/java/com/example/demo/service/AppointmentService.java"
click node_leave_service "https://github.com/praneetatmuri/flexipulse/blob/main/backend/src/main/java/com/example/demo/service/TrainerLeaveBlockService.java"
click node_nutrition_service "https://github.com/praneetatmuri/flexipulse/blob/main/backend/src/main/java/com/example/demo/service/NutritionService.java"
click node_workout_service "https://github.com/praneetatmuri/flexipulse/blob/main/backend/src/main/java/com/example/demo/service/WorkoutService.java"
click node_repositories "https://github.com/praneetatmuri/flexipulse/tree/main/backend/src/main/java/com/example/demo/repository"
click node_database "https://github.com/praneetatmuri/flexipulse/blob/main/backend/src/main/resources/application.properties"

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_navigation,node_auth_ui,node_dashboard,node_booking_ui,node_diet_ui,node_workout_ui,node_trainer_ui,node_api_client toneBlue
class node_rest toneAmber
class node_auth_service,node_health_service,node_appointment_service,node_leave_service,node_nutrition_service,node_workout_service,node_gemini toneMint
class node_repositories,node_database toneRose
class node_member,node_trainer toneIndigo
```

## Components

### Web experience

- [React app](https://github.com/praneetatmuri/flexipulse/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Navigation](https://github.com/praneetatmuri/flexipulse/blob/main/frontend/src/components/Navigation.jsx): `frontend/src/components/Navigation.jsx`
- [Sign in](https://github.com/praneetatmuri/flexipulse/blob/main/frontend/src/pages/Auth.jsx): `frontend/src/pages/Auth.jsx`
- [Wellness dashboard](https://github.com/praneetatmuri/flexipulse/blob/main/frontend/src/pages/Dashboard.jsx): `frontend/src/pages/Dashboard.jsx`
- [Appointment booking](https://github.com/praneetatmuri/flexipulse/blob/main/frontend/src/pages/Booking.jsx): `frontend/src/pages/Booking.jsx`
- [Diet planner](https://github.com/praneetatmuri/flexipulse/blob/main/frontend/src/pages/AIDiet.jsx): `frontend/src/pages/AIDiet.jsx`
- [Workout coach](https://github.com/praneetatmuri/flexipulse/blob/main/frontend/src/pages/WorkoutAI.jsx): `frontend/src/pages/WorkoutAI.jsx`
- [Trainer roster](https://github.com/praneetatmuri/flexipulse/blob/main/frontend/src/pages/TrainerMembers.jsx): `frontend/src/pages/TrainerMembers.jsx`
- [API client](https://github.com/praneetatmuri/flexipulse/blob/main/frontend/src/services/apiService.js): `frontend/src/services/apiService.js`

### Backend API

- [REST controllers](https://github.com/praneetatmuri/flexipulse/tree/main/backend/src/main/java/com/example/demo/controller): `backend/src/main/java/com/example/demo/controller`

### Wellness services

- [User and auth](https://github.com/praneetatmuri/flexipulse/blob/main/backend/src/main/java/com/example/demo/service/UserService.java): `backend/src/main/java/com/example/demo/service/UserService.java`
- [Health and goals](https://github.com/praneetatmuri/flexipulse/blob/main/backend/src/main/java/com/example/demo/service/HealthService.java): `backend/src/main/java/com/example/demo/service/HealthService.java`
- [Appointments](https://github.com/praneetatmuri/flexipulse/blob/main/backend/src/main/java/com/example/demo/service/AppointmentService.java): `backend/src/main/java/com/example/demo/service/AppointmentService.java`
- [Trainer leave](https://github.com/praneetatmuri/flexipulse/blob/main/backend/src/main/java/com/example/demo/service/TrainerLeaveBlockService.java): `backend/src/main/java/com/example/demo/service/TrainerLeaveBlockService.java`
- [Nutrition planning](https://github.com/praneetatmuri/flexipulse/blob/main/backend/src/main/java/com/example/demo/service/NutritionService.java): `backend/src/main/java/com/example/demo/service/NutritionService.java`
- [Workout planning](https://github.com/praneetatmuri/flexipulse/blob/main/backend/src/main/java/com/example/demo/service/WorkoutService.java): `backend/src/main/java/com/example/demo/service/WorkoutService.java`

### Persistence and AI

- [JPA repositories](https://github.com/praneetatmuri/flexipulse/tree/main/backend/src/main/java/com/example/demo/repository): `backend/src/main/java/com/example/demo/repository`
- [H2 database](https://github.com/praneetatmuri/flexipulse/blob/main/backend/src/main/resources/application.properties): `backend/src/main/resources/application.properties`

### Other components

- **Member**
- **Trainer**
- **Gemini API**

## Connections

- Member → React app: uses (evidence: `README.md`)
- Trainer → React app: uses (evidence: `README.md`)
- React app → Navigation: renders (evidence: `frontend/src/App.jsx`)
- React app → Sign in: routes to (evidence: `frontend/src/App.jsx`)
- React app → Wellness dashboard: routes to (evidence: `frontend/src/App.jsx`)
- React app → Appointment booking: routes to (evidence: `frontend/src/App.jsx`)
- React app → Diet planner: routes to (evidence: `frontend/src/App.jsx`)
- React app → Workout coach: routes to (evidence: `frontend/src/App.jsx`)
- React app → Trainer roster: routes to (evidence: `frontend/src/App.jsx`)
- Sign in → API client: calls (evidence: `frontend/src/pages/Auth.jsx`)
- Wellness dashboard → API client: calls (evidence: `frontend/src/pages/Dashboard.jsx`)
- Appointment booking → API client: calls (evidence: `frontend/src/pages/Booking.jsx`)
- Diet planner → API client: calls (evidence: `frontend/src/pages/AIDiet.jsx`)
- Workout coach → API client: calls (evidence: `frontend/src/pages/WorkoutAI.jsx`)
- Trainer roster → API client: calls (evidence: `frontend/src/pages/TrainerMembers.jsx`)
- API client → REST controllers: HTTP requests (evidence: `README.md`)
- REST controllers → User and auth: dispatches
- REST controllers → Health and goals: dispatches
- REST controllers → Appointments: dispatches
- REST controllers → Trainer leave: dispatches
- REST controllers → Nutrition planning: dispatches
- REST controllers → Workout planning: dispatches
- User and auth → JPA repositories: uses
- Health and goals → JPA repositories: uses
- Appointments → JPA repositories: uses
- Trainer leave → JPA repositories: uses
- Nutrition planning → JPA repositories: uses
- Workout planning → JPA repositories: uses
- JPA repositories → H2 database: persists (evidence: `README.md`)
- Nutrition planning → Gemini API: generates plans (evidence: `README.md`)
