GymFlow uses MariaDB 10.11 as its database, running as theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Lokhy87/gymApp/llms.txt
Use this file to discover all available pages before exploring further.
gymflow_db_server container. Doctrine Migrations manages the schema — a single migration file creates all tables and foreign key constraints. A data.sql dump provides the reference and seed data (exercises, muscle groups, muscles, training goals, work plans, and two example users) that the application depends on to function correctly.
MariaDB container
The database service is defined indocker-compose.yml:
3306 inside the container, mapped to 3350 on the host. Data is persisted in the gymflow_db_mysql named volume so it survives container restarts. The root password is root — suitable for local development only.
To connect to the database from your host machine using the mysql CLI or a GUI like TablePlus or DBeaver:
Run migrations
The single Doctrine migration (Version20260512152226) creates the complete schema. Run it from inside the PHP container after the stack is up:
Load seed data
backend/data.sql is a MariaDB dump that populates the reference tables (exercises, muscle groups, muscles, training goals, work splits, work plans, training methods) and inserts two example user accounts. Load it into the running container:
The dump was generated from MariaDB 10.11 and uses
utf8mb4_general_ci collation throughout. It includes DROP TABLE IF EXISTS statements, so re-running it will truncate all seeded tables before re-inserting. Do not run it against a database that contains real user workout data.| Role | Password (bcrypt) | |
|---|---|---|
admin@florida.es | ROLE_ADMIN | See data.sql — change before any shared deployment |
test@user.es | (none) | See data.sql — change before any shared deployment |
Database schema
The migration creates the following tables:| Table | Description |
|---|---|
user | Registered accounts. Stores email (unique), bcrypt-hashed password, name, username, and location. Roles are stored as a JSON column. |
workout | Individual logged sets. Links to user and exercise via foreign keys; records sets, reps, weight (float), an optional comments text, and a date timestamp. |
exercises | Exercise catalogue. Each exercise has a name, optional image URL, and belongs to one muscle_group. |
muscle_groups | Top-level muscle group categories (Chest, Back, Legs, Shoulder, Arms, Core). Each has a name and image URL. |
muscles | Individual muscles (e.g., Pectoralis major, Quadriceps). Each belongs to a muscle_group and has an optional image URL. |
exercises_muscles | Join table that maps exercises to the muscles they target. The role column classifies each mapping as primary, secondary, or stabilizer. |
exercises_variants | Named variants of a base exercise (e.g., “Dumbbell Bench Press” is a variant of “Bench Press”). Links back to exercises via exercise_id. |
work_split | Training split types (Full Body, Upper Lower, Push Pull Legs, Bro Split, Hybrid). |
work_plan | Structured training programmes. Combines a work_split, training_goal, and training_level with days_per_week, optional duration_weeks, and an is_active flag. |
training_goal | Training objectives (Hypertrophy, Fat Loss, Strength, etc.) with a name and optional description. |
training_level | User experience levels: Beginner, Intermediate, Advanced. |
training_method | Specific training techniques (Progressive Overload, Superset, Drop Set, HIIT, etc.) with a name and optional description. |
messenger_messages | Symfony Messenger async queue table. Created by the migration and used internally by the framework. |
Entity relationships
The key foreign key relationships defined by the migration are:Related pages
Docker Compose setup
Container definitions, port mappings, and the gymflow_network configuration.
Environment variables
Configure DATABASE_URL, APP_SECRET, JWT_PASSPHRASE, and other required variables.
Exercises
How the exercise library and muscle group data are surfaced in the UI.
Workouts API
REST endpoints for creating, reading, updating, and deleting workout entries.