AI-assisted workout planning and gym client management for fitness professionals.
GymIA is a full-stack web application exploring how large language models (LLMs) can assist physical education professionals and personal trainers in creating, customizing, and managing personalized training plans. It combines client activity tracking, AI chat coaching sessions, structured workout plan generation via OpenAI, and interactive PDF/print export capabilities.
Disclaimer: GymIA is designed as an assistant tool for qualified physical education professionals to review and validate, not as an autonomous prescription or medical advice service.
- Personal Trainer & Client Management: Secure JWT authentication for instructors, client profile tracking, anamnesis, and check-in history.
- Smart Inactivity Analytics: Dashboard tracking client activity trends, peak gym hours, and retention, categorizing inactive vs. critically inactive members.
- AI Workout Plan Generation: Tailors training plans based on client experience, goals, weekly frequency, and physical limitations using OpenAI fine-tuned models.
- Interactive Workout Plan Editor: Professionals can adjust exercises, sets, reps, intervals, and load dynamically before finalizing.
- AI Coach Chat Sessions: Integrated chat session management for instructors to converse with an AI fitness assistant directly inside the workspace.
- Export & Print Ready: Export workout sheets to PDF and print-friendly layouts for clients.
| Dashboard & Plan Overview | Workout Plan & Client Management |
|---|---|
![]() |
![]() |
GymIA/
├── backend/ # Node.js + Express API
│ ├── prisma/ # Prisma schema & MySQL migrations
│ ├── src/
│ │ ├── app/
│ │ │ ├── controllers/ # Auth, Clients, WorkoutPlans, Dashboard, Chat
│ │ │ ├── routes/ # Express route definitions
│ │ │ ├── services/ # Business logic & OpenAI service
│ │ │ └── middlewares/ # JWT auth & error handling
│ │ └── index.ts # Server entrypoint
│ ├── docker-compose.yml # Local MySQL container setup
│ └── .env.example # Backend environment template
│
└── frontend/ # React + Vite Client
├── src/
│ ├── components/ # Reusable UI components & layouts
│ ├── contexts/ # Authentication & preferences context
│ ├── pages/ # Dashboard, Clients, WorkoutPlan, Chat, Login
│ ├── services/ # Axios API client & endpoints
│ └── styles/ # styled-components global theme
├── public/images/ # Demo previews & brand assets
└── .env.example # Frontend environment template
- Node.js (v18+) and
npm - Docker & Docker Compose (or a local MySQL 8 instance)
- OpenAI API Key
Start the MySQL database container:
cd backend
docker compose up -dFrom the backend/ directory:
- Copy the environment template and fill in your keys:
cp .env.example .env
- Configure
.env:DATABASE_URL="mysql://root:password@localhost:3306/gym" JWT_SECRET="your-super-secret-jwt-key" OPENAI_API_KEY="sk-..." OPENAI_FINE_TUNED_MODEL="ft:gpt-4o-mini-2024-07-18:your-org:model" PORT=3000
- Install dependencies and apply Prisma database migrations:
npm install npx prisma generate npx prisma migrate deploy
- Start the backend development server:
The API will be running at
npm run dev
http://localhost:3000.
From the repository root, navigate to frontend/:
- Copy the environment template:
cd frontend cp .env.example .env - Configure
.env(optional, defaults tohttp://localhost:3000):VITE_API_URL="http://localhost:3000"
- Install dependencies and start the Vite development server:
Open
npm install npm run dev
http://localhost:5173in your browser.
| Method | Endpoint | Description |
|---|---|---|
POST |
/api/auth/register |
Register new instructor |
POST |
/api/auth/login |
Authenticate instructor & return JWT |
GET |
/api/auth/me |
Fetch authenticated user profile |
GET |
/api/clients |
List instructor's clients |
POST |
/api/clients |
Create new client |
GET |
/api/dashboard/statistics |
Dashboard retention & inactivity statistics |
GET |
/api/workout-plans |
List workout plans |
POST |
/api/workout-plans |
Request AI-generated workout plan |
POST |
/api/chat-sessions |
Create coaching chat session |
POST |
/api/chat-sessions/:id/messages |
Send message in chat session |
- Never commit real credentials, API tokens, or production database strings.
- Always configure
.envlocally using the provided.env.exampletemplates. - Any generated workout recommendations must be evaluated and approved by a qualified personal trainer or fitness professional.
This project is licensed under the MIT License.
Developed by João Gabriel Alves Junior.

