# kumarvalavala66/replog architecture

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

- Interactive diagram: https://gitdiagram.com/kumarvalavala66/replog
- Repository: https://github.com/kumarvalavala66/replog

## Overview

RepLog is a local workout tracker: users create plans or start live/manual workouts, record exercise sets, then review workout history and analytics. The React app uses an API client to communicate with the FastAPI backend, which persists sessions, plans, exercises, and users in SQLite. The README confirms live sessions resume from persisted records and describes volume and estimated one-rep-max analytics. Some routes and UI pages were not sampled, so those capability links are shown only where documented or left unverified.

Main entry points: [`backend/app/main.py`](https://github.com/kumarvalavala66/replog/blob/main/backend/app/main.py) (FastAPI app), [`backend/app/api/routes/workouts.py`](https://github.com/kumarvalavala66/replog/blob/main/backend/app/api/routes/workouts.py) (Workout routes), [`backend/app/api/routes/auth.py`](https://github.com/kumarvalavala66/replog/blob/main/backend/app/api/routes/auth.py) (Authentication routes), [`frontend/src/App.jsx`](https://github.com/kumarvalavala66/replog/blob/main/frontend/src/App.jsx) (RepLog app)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Workout interface"]
  node_app["RepLog app<br/>[App.jsx]"]
  node_liveui["Live workout UI<br/>[LiveWorkout.jsx]"]
  node_exerciseui["Exercise previews"]
  node_catalog["Exercise catalog<br/>[catalog.js]"]
  node_client["API client<br/>[api.js]"]
end

subgraph group_api["Backend API"]
  node_apiapp["FastAPI app<br/>[main.py]"]
  node_workoutroute["Workout routes<br/>[workouts.py]"]
  node_planroute["Plan routes<br/>[plans.py]"]
  node_exerciseroute["Exercise routes<br/>[exercises.py]"]
  node_analyticsroute["Analytics routes<br/>[analytics.py]"]
  node_authroute["Authentication routes<br/>[auth.py]"]
  node_authschemas["Auth schemas<br/>[auth.py]"]
  node_dependencies["Request dependencies<br/>[deps.py]"]
end

subgraph group_domain["Workout domain"]
  node_plans["Training plans<br/>[plan.py]"]
  node_workouts["Workout records<br/>[workout.py]"]
  node_exercises["Exercise records<br/>[exercise.py]"]
  node_users["User records<br/>[user.py]"]
  node_analytics["Training analytics<br/>[analytics.py]"]
end

subgraph group_storage["Persistence"]
  node_config["Database settings<br/>[config.py]"]
  node_session["SQLAlchemy session<br/>[session.py]"]
  node_database[("SQLite database")]
end

node_user(("Tracker user"))

node_user -->|"uses"| node_app
node_app -->|"requests data"| node_client
node_app -->|"renders"| node_liveui
node_liveui -->|"renders"| node_exerciseui
node_client -.->|"sends HTTP requests"| node_apiapp
node_apiapp -->|"registers"| node_workoutroute
node_apiapp -->|"registers"| node_planroute
node_apiapp -->|"registers"| node_exerciseroute
node_apiapp -->|"registers"| node_analyticsroute
node_workoutroute -->|"reads and writes"| node_workouts
node_workoutroute -->|"reads"| node_plans
node_workoutroute -->|"validates"| node_exercises
node_planroute -->|"reads and writes"| node_plans
node_exerciseroute -.->|"manages"| node_exercises
node_analyticsroute -.->|"computes"| node_analytics
node_authroute -->|"requires user"| node_dependencies
node_authroute -->|"reads and writes"| node_users
node_authroute -->|"validates payloads"| node_authschemas
node_dependencies -->|"gets database session"| node_session
node_dependencies -->|"loads current user"| node_users
node_session -->|"reads settings"| node_config
node_session -->|"connects"| node_database
node_workouts -.->|"persists sessions"| node_database

click node_app "https://github.com/kumarvalavala66/replog/blob/main/frontend/src/App.jsx"
click node_liveui "https://github.com/kumarvalavala66/replog/blob/main/frontend/src/components/LiveWorkout.jsx"
click node_exerciseui "https://github.com/kumarvalavala66/replog/blob/main/frontend/src/components/ExerciseAnimation.jsx"
click node_catalog "https://github.com/kumarvalavala66/replog/blob/main/frontend/src/exercises/catalog.js"
click node_client "https://github.com/kumarvalavala66/replog/blob/main/frontend/src/services/api.js"
click node_apiapp "https://github.com/kumarvalavala66/replog/blob/main/backend/app/main.py"
click node_workoutroute "https://github.com/kumarvalavala66/replog/blob/main/backend/app/api/routes/workouts.py"
click node_planroute "https://github.com/kumarvalavala66/replog/blob/main/backend/app/api/routes/plans.py"
click node_exerciseroute "https://github.com/kumarvalavala66/replog/blob/main/backend/app/api/routes/exercises.py"
click node_analyticsroute "https://github.com/kumarvalavala66/replog/blob/main/backend/app/api/routes/analytics.py"
click node_authroute "https://github.com/kumarvalavala66/replog/blob/main/backend/app/api/routes/auth.py"
click node_authschemas "https://github.com/kumarvalavala66/replog/blob/main/backend/app/schemas/auth.py"
click node_dependencies "https://github.com/kumarvalavala66/replog/blob/main/backend/app/api/deps.py"
click node_plans "https://github.com/kumarvalavala66/replog/blob/main/backend/app/models/plan.py"
click node_workouts "https://github.com/kumarvalavala66/replog/blob/main/backend/app/models/workout.py"
click node_exercises "https://github.com/kumarvalavala66/replog/blob/main/backend/app/models/exercise.py"
click node_users "https://github.com/kumarvalavala66/replog/blob/main/backend/app/models/user.py"
click node_analytics "https://github.com/kumarvalavala66/replog/blob/main/backend/app/services/analytics.py"
click node_config "https://github.com/kumarvalavala66/replog/blob/main/backend/app/core/config.py"
click node_session "https://github.com/kumarvalavala66/replog/blob/main/backend/app/db/session.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_app,node_liveui,node_exerciseui,node_catalog,node_client,node_user toneBlue
class node_apiapp,node_workoutroute,node_planroute,node_exerciseroute,node_analyticsroute,node_authroute,node_authschemas,node_dependencies toneAmber
class node_plans,node_workouts,node_exercises,node_users,node_analytics toneMint
class node_config,node_session,node_database toneRose
```

## Components

### Workout interface

- [RepLog app](https://github.com/kumarvalavala66/replog/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Live workout UI](https://github.com/kumarvalavala66/replog/blob/main/frontend/src/components/LiveWorkout.jsx): `frontend/src/components/LiveWorkout.jsx`
- [Exercise previews](https://github.com/kumarvalavala66/replog/blob/main/frontend/src/components/ExerciseAnimation.jsx): `frontend/src/components/ExerciseAnimation.jsx`
- [Exercise catalog](https://github.com/kumarvalavala66/replog/blob/main/frontend/src/exercises/catalog.js): `frontend/src/exercises/catalog.js`
- [API client](https://github.com/kumarvalavala66/replog/blob/main/frontend/src/services/api.js): `frontend/src/services/api.js`

### Backend API

- [FastAPI app](https://github.com/kumarvalavala66/replog/blob/main/backend/app/main.py): `backend/app/main.py`
- [Workout routes](https://github.com/kumarvalavala66/replog/blob/main/backend/app/api/routes/workouts.py): `backend/app/api/routes/workouts.py`
- [Plan routes](https://github.com/kumarvalavala66/replog/blob/main/backend/app/api/routes/plans.py): `backend/app/api/routes/plans.py`
- [Exercise routes](https://github.com/kumarvalavala66/replog/blob/main/backend/app/api/routes/exercises.py): `backend/app/api/routes/exercises.py`
- [Analytics routes](https://github.com/kumarvalavala66/replog/blob/main/backend/app/api/routes/analytics.py): `backend/app/api/routes/analytics.py`
- [Authentication routes](https://github.com/kumarvalavala66/replog/blob/main/backend/app/api/routes/auth.py): `backend/app/api/routes/auth.py`
- [Auth schemas](https://github.com/kumarvalavala66/replog/blob/main/backend/app/schemas/auth.py): `backend/app/schemas/auth.py`
- [Request dependencies](https://github.com/kumarvalavala66/replog/blob/main/backend/app/api/deps.py): `backend/app/api/deps.py`

### Workout domain

- [Training plans](https://github.com/kumarvalavala66/replog/blob/main/backend/app/models/plan.py): `backend/app/models/plan.py`
- [Workout records](https://github.com/kumarvalavala66/replog/blob/main/backend/app/models/workout.py): `backend/app/models/workout.py`
- [Exercise records](https://github.com/kumarvalavala66/replog/blob/main/backend/app/models/exercise.py): `backend/app/models/exercise.py`
- [User records](https://github.com/kumarvalavala66/replog/blob/main/backend/app/models/user.py): `backend/app/models/user.py`
- [Training analytics](https://github.com/kumarvalavala66/replog/blob/main/backend/app/services/analytics.py): `backend/app/services/analytics.py`

### Persistence

- [Database settings](https://github.com/kumarvalavala66/replog/blob/main/backend/app/core/config.py): `backend/app/core/config.py`
- [SQLAlchemy session](https://github.com/kumarvalavala66/replog/blob/main/backend/app/db/session.py): `backend/app/db/session.py`
- **SQLite database**

### Other components

- **Tracker user**

## Connections

- Tracker user → RepLog app: uses
- RepLog app → API client: requests data (evidence: `frontend/src/App.jsx`)
- RepLog app → Live workout UI: renders (evidence: `frontend/src/App.jsx`)
- Live workout UI → Exercise previews: renders (evidence: `frontend/src/components/LiveWorkout.jsx`)
- API client → FastAPI app: sends HTTP requests
- FastAPI app → Workout routes: registers (evidence: `backend/app/main.py`)
- FastAPI app → Plan routes: registers (evidence: `backend/app/main.py`)
- FastAPI app → Exercise routes: registers (evidence: `backend/app/main.py`)
- FastAPI app → Analytics routes: registers (evidence: `backend/app/main.py`)
- Workout routes → Workout records: reads and writes (evidence: `backend/app/api/routes/workouts.py`)
- Workout routes → Training plans: reads (evidence: `backend/app/api/routes/workouts.py`)
- Workout routes → Exercise records: validates (evidence: `backend/app/api/routes/workouts.py`)
- Plan routes → Training plans: reads and writes (evidence: `backend/app/api/routes/plans.py`)
- Exercise routes → Exercise records: manages
- Analytics routes → Training analytics: computes
- Authentication routes → Request dependencies: requires user (evidence: `backend/app/api/routes/auth.py`)
- Authentication routes → User records: reads and writes (evidence: `backend/app/api/routes/auth.py`)
- Authentication routes → Auth schemas: validates payloads (evidence: `backend/app/api/routes/auth.py`)
- Request dependencies → SQLAlchemy session: gets database session (evidence: `backend/app/api/deps.py`)
- Request dependencies → User records: loads current user (evidence: `backend/app/api/deps.py`)
- SQLAlchemy session → Database settings: reads settings (evidence: `backend/app/db/session.py`)
- SQLAlchemy session → SQLite database: connects (evidence: `backend/app/db/session.py`)
- Workout records → SQLite database: persists sessions
