# xuantruong5/be-fitlife architecture

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

- Interactive diagram: https://gitdiagram.com/xuantruong5/be-fitlife
- Repository: https://github.com/xuantruong5/be-fitlife

## Overview

1. **Overall shape**
   - This is a Laravel 11-style monolith for a fitness/gym management system branded **FITLIFE**.
   - The main architecture is classic Laravel: HTTP routes → middleware/request validation → controllers → Eloquent models → MySQL-style relational persistence via migrations/seeders.

2. **Primary business domains**
   - The repo centers on managing **members**, **trainers**, **branches**, **packages**, **schedules**, **attendance**, **reschedules**, **trainer notes**, and **trainer salaries**.
   - The controllers and migrations line up closely, so these are the core bounded areas the diagram should show.

3. **Entry points**
   - `routes/web.php` is the main application surface for browser-based flows.
   - `routes/api.php` exists as a separate API boundary, and `config/sanctum.php` plus `personal_access_tokens` migration indicate token-based API auth is supported.
   - `public/index.php` is the Laravel front controller; `resources/views` contains the only obvious server-rendered templates.

4. **Role-based access boundaries**
   - There are explicit middleware classes for **members** and **trainers**: `MemberMiddleware` and `TrainerMiddleware`.
   - Separate request classes exist for admin login and member registration/profile updates, which suggests role-specific auth and validation rules.
   - The app distinguishes at least three actor types: **admin**, **member**, and **trainer**, with admin-specific controllers and an `Admin` model.

5. **Admin and operational management**
   - `AdminController` likely handles admin authentication/administrative dashboard flows.
   - Operational CRUD controllers manage the system’s master data: `BranchController`, `PackageController`, `TrainerController`, `MemberController`/`MembersController`.
   - This is the administrative control plane for setting up the gym’s data before member-facing workflows use it.

6. **Scheduling and attendance flow**
   - Scheduling is split into dedicated parts: `TrainerScheduleController`, `ScheduleMemberController`, and `RescheduleController`.
   - `AttendanceController` sits downstream of scheduling, implying attendance is recorded against a member’s scheduled sessions.
   - The related models/migrations (`TrainerSchedule`, `ScheduleMember`, `Attendance`, `Reschedule`) show a relational workflow from planned sessions to check-ins and exceptions.

7. **Trainer-centric payroll and notes**
   - `TrainerSalaryController` and `TrainerNoteController` indicate the system also supports internal trainer administration, not just member booking.
   - This adds an HR/operations branch to the architecture: trainer schedules generate salary-related records, while notes likely capture performance or session details.

8. **Persistence model**
   - The data layer is Eloquent-based with one migration per business table under `database/migrations`.
   - Seeders populate baseline entities such as admins, branches, packages, trainers, trainer schedules, and members.
   - There are some duplicated/lowercase model files (`branches.php`, `packages.php`, etc.), which suggests legacy naming or compatibility artifacts; the canonical models appear to be the capitalized classes.

9. **Communication and email**
   - `app/Mail/MasterMail.php` plus `resources/views/view_mail_register.blade.php` show a mail notification path, likely used during member registration.
   - This is the only explicit asynchronous/external communication visible beyond the database, so email is a small but important side channel.

10. **Frontend and assets**
   - UI is minimal and server-rendered: `resources/views/welcome.blade.php` plus the mail template.
   - `resources/js`, `resources/css`, and `vite.config.js` indicate the app uses Vite for asset bundling, but the repository is still predominantly backend-driven.

11. **Runtime and infrastructure**
   - Standard Laravel runtime components are present: cache, session, logging, filesystem, queue, and mail config.
   - `storage` and `bootstrap/cache` are normal framework runtime stores; queue support exists, but no custom job-heavy subsystem is visible in the tree.

12. **Testing and delivery**
   - PHPUnit tests are present under `tests/`.
   - GitHub Actions workflows cover tests, pull requests, issues, and changelog updates, so CI/CD is part of the project’s operational boundary.
   - `README` links to external FITLIFE documentation, which likely serves as the higher-level product/spec reference for this codebase.

13. **Architecture summary for a diagram**
   - Draw the system as a **Laravel monolith** with three actor lanes: admin, trainer, member.
   - Show the request path through middleware and validation into controllers, then into Eloquent models and relational tables.
   - Put scheduling/attendance as the central domain workflow, with branch/package/member/trainer master data feeding it, and email as an outward notification edge.

Main entry points: [`routes/web.php`](https://github.com/xuantruong5/be-fitlife/blob/main/routes/web.php) (Web routes), [`database/migrations`](https://github.com/xuantruong5/be-fitlife/tree/main/database/migrations) (Migrations), [`database/seeders`](https://github.com/xuantruong5/be-fitlife/tree/main/database/seeders) (Seed data), [`app/Http/Controllers/MemberController.php`](https://github.com/xuantruong5/be-fitlife/blob/main/app/Http/Controllers/MemberController.php) (Members)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_group_actors["Actors"]
  node_public_index["Front controller<br/>Laravel entrypoint<br/>[index.php]"]
end

subgraph group_group_web["HTTP Layer"]
  node_routes_web["Web routes<br/>Route surface<br/>[web.php]"]
  node_routes_api["API routes<br/>Route surface<br/>[api.php]"]
  node_member_mw{{"Member guard<br/>Middleware"}}
  node_trainer_mw{{"Trainer guard<br/>Middleware"}}
  node_admin_req["Admin login<br/>Form request"]
  node_member_req["Member requests<br/>Form requests"]
  node_sanctum["Sanctum auth<br/>Token auth<br/>[sanctum.php]"]
end

subgraph group_group_domain["Core Domain"]
  node_admin_ctrl["Admin panel<br/>Controller"]
  node_member_ctrl["Members<br/>Controller"]
  node_trainer_ctrl["Trainers<br/>Controller"]
  node_branch_ctrl["Branches<br/>Controller"]
  node_package_ctrl["Packages<br/>Controller"]
  node_schedule_ctrl["Schedules<br/>Controller"]
  node_schedule_member_ctrl["Enrollments<br/>Controller"]
  node_attendance_ctrl["Attendance<br/>Controller"]
  node_reschedule_ctrl["Reschedules<br/>Controller"]
  node_note_ctrl["Trainer notes<br/>Controller"]
  node_salary_ctrl["Trainer salary<br/>Controller"]
  node_mail["Mail notify<br/>[MasterMail.php]"]
end

subgraph group_group_data["Data Layer"]
  node_admin_model[("Admin<br/>Eloquent model<br/>[Admin.php]")]
  node_member_model[("Member<br/>Eloquent model<br/>[Member.php]")]
  node_trainer_model[("Trainer<br/>Eloquent model<br/>[Trainer.php]")]
  node_branch_model[("Branch<br/>Eloquent model<br/>[Branch.php]")]
  node_package_model[("Package<br/>Eloquent model<br/>[Package.php]")]
  node_schedule_model[("Schedule member<br/>Eloquent model<br/>[ScheduleMember.php]")]
  node_attendance_model[("Attendance<br/>Eloquent model<br/>[Attendance.php]")]
  node_reschedule_model[("Reschedule<br/>Eloquent model<br/>[reschedule.php]")]
  node_trainer_note_model[("Trainer note<br/>Eloquent model<br/>[TrainerNote.php]")]
  node_trainer_salary_model[("Trainer salary<br/>Eloquent model<br/>[TrainerSalary.php]")]
  node_migrations["Migrations<br/>Schema"]
  node_seeders["Seed data<br/>Seeder set"]
end

node_public_index -->|"boots"| node_routes_web
node_public_index -->|"serves"| node_routes_api
node_routes_web -->|"admin flows"| node_admin_ctrl
node_routes_web -->|"member flows"| node_member_ctrl
node_routes_web -->|"trainer flows"| node_trainer_ctrl
node_routes_web -->|"master data"| node_branch_ctrl
node_routes_web -->|"master data"| node_package_ctrl
node_routes_web -->|"scheduling"| node_schedule_ctrl
node_routes_web -->|"booking"| node_schedule_member_ctrl
node_routes_web -->|"check-in"| node_attendance_ctrl
node_routes_web -->|"changes"| node_reschedule_ctrl
node_routes_web -->|"notes"| node_note_ctrl
node_routes_web -->|"payroll"| node_salary_ctrl
node_routes_api -->|"auth"| node_sanctum
node_member_mw -->|"protects"| node_member_ctrl
node_trainer_mw -->|"protects"| node_trainer_ctrl
node_admin_req -->|"validates"| node_admin_ctrl
node_member_req -->|"validates"| node_member_ctrl
node_admin_ctrl -->|"uses"| node_admin_model
node_member_ctrl -->|"uses"| node_member_model
node_trainer_ctrl -->|"uses"| node_trainer_model
node_branch_ctrl -->|"uses"| node_branch_model
node_package_ctrl -->|"uses"| node_package_model
node_schedule_ctrl -->|"uses"| node_schedule_model
node_schedule_member_ctrl -->|"uses"| node_schedule_model
node_attendance_ctrl -->|"uses"| node_attendance_model
node_reschedule_ctrl -->|"uses"| node_reschedule_model
node_note_ctrl -->|"uses"| node_trainer_note_model
node_salary_ctrl -->|"uses"| node_trainer_salary_model
node_member_ctrl -.->|"notifies"| node_mail
node_admin_model -->|"persisted by"| node_migrations
node_member_model -->|"persisted by"| node_migrations
node_trainer_model -->|"persisted by"| node_migrations
node_branch_model -->|"persisted by"| node_migrations
node_package_model -->|"persisted by"| node_migrations
node_schedule_model -->|"persisted by"| node_migrations
node_attendance_model -->|"persisted by"| node_migrations
node_reschedule_model -->|"persisted by"| node_migrations
node_trainer_note_model -->|"persisted by"| node_migrations
node_trainer_salary_model -->|"persisted by"| node_migrations
node_seeders -->|"seeds"| node_admin_model
node_seeders -->|"seeds"| node_branch_model
node_seeders -->|"seeds"| node_package_model
node_seeders -->|"seeds"| node_trainer_model
node_seeders -->|"seeds"| node_member_model
node_seeders -->|"seeds"| node_schedule_model
node_schedule_ctrl -->|"depends on"| node_trainer_model
node_schedule_ctrl -->|"depends on"| node_branch_model

click node_public_index "https://github.com/xuantruong5/be-fitlife/blob/main/public/index.php"
click node_routes_web "https://github.com/xuantruong5/be-fitlife/blob/main/routes/web.php"
click node_routes_api "https://github.com/xuantruong5/be-fitlife/blob/main/routes/api.php"
click node_member_mw "https://github.com/xuantruong5/be-fitlife/blob/main/app/Http/Middleware/MemberMiddleware.php"
click node_trainer_mw "https://github.com/xuantruong5/be-fitlife/blob/main/app/Http/Middleware/TrainerMiddleware.php"
click node_admin_req "https://github.com/xuantruong5/be-fitlife/blob/main/app/Http/Requests/Admin/LoginAdminRequest.php"
click node_member_req "https://github.com/xuantruong5/be-fitlife/blob/main/app/Http/Requests/Member/RegisterMemberRequest.php"
click node_admin_ctrl "https://github.com/xuantruong5/be-fitlife/blob/main/app/Http/Controllers/AdminController.php"
click node_member_ctrl "https://github.com/xuantruong5/be-fitlife/blob/main/app/Http/Controllers/MemberController.php"
click node_trainer_ctrl "https://github.com/xuantruong5/be-fitlife/blob/main/app/Http/Controllers/TrainerController.php"
click node_branch_ctrl "https://github.com/xuantruong5/be-fitlife/blob/main/app/Http/Controllers/BranchController.php"
click node_package_ctrl "https://github.com/xuantruong5/be-fitlife/blob/main/app/Http/Controllers/PackageController.php"
click node_schedule_ctrl "https://github.com/xuantruong5/be-fitlife/blob/main/app/Http/Controllers/TrainerScheduleController.php"
click node_schedule_member_ctrl "https://github.com/xuantruong5/be-fitlife/blob/main/app/Http/Controllers/ScheduleMemberController.php"
click node_attendance_ctrl "https://github.com/xuantruong5/be-fitlife/blob/main/app/Http/Controllers/AttendanceController.php"
click node_reschedule_ctrl "https://github.com/xuantruong5/be-fitlife/blob/main/app/Http/Controllers/RescheduleController.php"
click node_note_ctrl "https://github.com/xuantruong5/be-fitlife/blob/main/app/Http/Controllers/TrainerNoteController.php"
click node_salary_ctrl "https://github.com/xuantruong5/be-fitlife/blob/main/app/Http/Controllers/TrainerSalaryController.php"
click node_mail "https://github.com/xuantruong5/be-fitlife/blob/main/app/Mail/MasterMail.php"
click node_admin_model "https://github.com/xuantruong5/be-fitlife/blob/main/app/Models/Admin.php"
click node_member_model "https://github.com/xuantruong5/be-fitlife/blob/main/app/Models/Member.php"
click node_trainer_model "https://github.com/xuantruong5/be-fitlife/blob/main/app/Models/Trainer.php"
click node_branch_model "https://github.com/xuantruong5/be-fitlife/blob/main/app/Models/Branch.php"
click node_package_model "https://github.com/xuantruong5/be-fitlife/blob/main/app/Models/Package.php"
click node_schedule_model "https://github.com/xuantruong5/be-fitlife/blob/main/app/Models/ScheduleMember.php"
click node_attendance_model "https://github.com/xuantruong5/be-fitlife/blob/main/app/Models/Attendance.php"
click node_reschedule_model "https://github.com/xuantruong5/be-fitlife/blob/main/app/Models/reschedule.php"
click node_trainer_note_model "https://github.com/xuantruong5/be-fitlife/blob/main/app/Models/TrainerNote.php"
click node_trainer_salary_model "https://github.com/xuantruong5/be-fitlife/blob/main/app/Models/TrainerSalary.php"
click node_migrations "https://github.com/xuantruong5/be-fitlife/tree/main/database/migrations"
click node_seeders "https://github.com/xuantruong5/be-fitlife/tree/main/database/seeders"
click node_sanctum "https://github.com/xuantruong5/be-fitlife/blob/main/config/sanctum.php"

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_public_index toneBlue
class node_routes_web,node_routes_api,node_member_mw,node_trainer_mw,node_admin_req,node_member_req,node_sanctum toneAmber
class node_admin_ctrl,node_member_ctrl,node_trainer_ctrl,node_branch_ctrl,node_package_ctrl,node_schedule_ctrl,node_schedule_member_ctrl,node_attendance_ctrl,node_reschedule_ctrl,node_note_ctrl,node_salary_ctrl,node_mail toneMint
class node_admin_model,node_member_model,node_trainer_model,node_branch_model,node_package_model,node_schedule_model,node_attendance_model,node_reschedule_model,node_trainer_note_model,node_trainer_salary_model,node_migrations,node_seeders toneRose
```

## Components

### Actors

Primary user roles and entry surfaces

- [Front controller](https://github.com/xuantruong5/be-fitlife/blob/main/public/index.php): Laravel entrypoint · Main web entry point for all browser requests · `public/index.php`

### HTTP Layer

Laravel request handling and policy boundaries

- [Web routes](https://github.com/xuantruong5/be-fitlife/blob/main/routes/web.php): Route surface · Primary browser-facing routing boundary · `routes/web.php`
- [API routes](https://github.com/xuantruong5/be-fitlife/blob/main/routes/api.php): Route surface · Separate token-based API boundary · `routes/api.php`
- [Member guard](https://github.com/xuantruong5/be-fitlife/blob/main/app/Http/Middleware/MemberMiddleware.php): Middleware · Restricts member-only flows · `app/Http/Middleware/MemberMiddleware.php`
- [Trainer guard](https://github.com/xuantruong5/be-fitlife/blob/main/app/Http/Middleware/TrainerMiddleware.php): Middleware · Restricts trainer-only flows · `app/Http/Middleware/TrainerMiddleware.php`
- [Admin login](https://github.com/xuantruong5/be-fitlife/blob/main/app/Http/Requests/Admin/LoginAdminRequest.php): Form request · Validates admin authentication input · `app/Http/Requests/Admin/LoginAdminRequest.php`
- [Member requests](https://github.com/xuantruong5/be-fitlife/blob/main/app/Http/Requests/Member/RegisterMemberRequest.php): Form requests · Validates member registration and profile updates · `app/Http/Requests/Member/RegisterMemberRequest.php`
- [Sanctum auth](https://github.com/xuantruong5/be-fitlife/blob/main/config/sanctum.php): Token auth · Token-based API authentication support · `config/sanctum.php`

### Core Domain

Business controllers and workflows

- [Admin panel](https://github.com/xuantruong5/be-fitlife/blob/main/app/Http/Controllers/AdminController.php): Controller · Admin authentication and operational dashboard flows · `app/Http/Controllers/AdminController.php`
- [Members](https://github.com/xuantruong5/be-fitlife/blob/main/app/Http/Controllers/MemberController.php): Controller · Member-facing and admin member management · `app/Http/Controllers/MemberController.php`
- [Trainers](https://github.com/xuantruong5/be-fitlife/blob/main/app/Http/Controllers/TrainerController.php): Controller · Trainer management and related admin flows · `app/Http/Controllers/TrainerController.php`
- [Branches](https://github.com/xuantruong5/be-fitlife/blob/main/app/Http/Controllers/BranchController.php): Controller · Branch master data management · `app/Http/Controllers/BranchController.php`
- [Packages](https://github.com/xuantruong5/be-fitlife/blob/main/app/Http/Controllers/PackageController.php): Controller · Membership package management · `app/Http/Controllers/PackageController.php`
- [Schedules](https://github.com/xuantruong5/be-fitlife/blob/main/app/Http/Controllers/TrainerScheduleController.php): Controller · Trainer schedule creation and member assignment · `app/Http/Controllers/TrainerScheduleController.php`
- [Enrollments](https://github.com/xuantruong5/be-fitlife/blob/main/app/Http/Controllers/ScheduleMemberController.php): Controller · Links members to scheduled sessions · `app/Http/Controllers/ScheduleMemberController.php`
- [Attendance](https://github.com/xuantruong5/be-fitlife/blob/main/app/Http/Controllers/AttendanceController.php): Controller · Records session check-ins against schedules · `app/Http/Controllers/AttendanceController.php`
- [Reschedules](https://github.com/xuantruong5/be-fitlife/blob/main/app/Http/Controllers/RescheduleController.php): Controller · Handles schedule changes and exceptions · `app/Http/Controllers/RescheduleController.php`
- [Trainer notes](https://github.com/xuantruong5/be-fitlife/blob/main/app/Http/Controllers/TrainerNoteController.php): Controller · Captures trainer session notes and observations · `app/Http/Controllers/TrainerNoteController.php`
- [Trainer salary](https://github.com/xuantruong5/be-fitlife/blob/main/app/Http/Controllers/TrainerSalaryController.php): Controller · Manages trainer compensation records · `app/Http/Controllers/TrainerSalaryController.php`
- [Mail notify](https://github.com/xuantruong5/be-fitlife/blob/main/app/Mail/MasterMail.php): Mail · Registration email notification path · `app/Mail/MasterMail.php`

### Data Layer

Eloquent models and relational tables

- [Admin](https://github.com/xuantruong5/be-fitlife/blob/main/app/Models/Admin.php): Eloquent model · Administrative actor model · `app/Models/Admin.php`
- [Member](https://github.com/xuantruong5/be-fitlife/blob/main/app/Models/Member.php): Eloquent model · Member account and profile model · `app/Models/Member.php`
- [Trainer](https://github.com/xuantruong5/be-fitlife/blob/main/app/Models/Trainer.php): Eloquent model · Trainer account and profile model · `app/Models/Trainer.php`
- [Branch](https://github.com/xuantruong5/be-fitlife/blob/main/app/Models/Branch.php): Eloquent model · Gym branch model · `app/Models/Branch.php`
- [Package](https://github.com/xuantruong5/be-fitlife/blob/main/app/Models/Package.php): Eloquent model · Membership package model · `app/Models/Package.php`
- [Schedule member](https://github.com/xuantruong5/be-fitlife/blob/main/app/Models/ScheduleMember.php): Eloquent model · Member-to-schedule linkage model · `app/Models/ScheduleMember.php`
- [Attendance](https://github.com/xuantruong5/be-fitlife/blob/main/app/Models/Attendance.php): Eloquent model · Check-in record model · `app/Models/Attendance.php`
- [Reschedule](https://github.com/xuantruong5/be-fitlife/blob/main/app/Models/reschedule.php): Eloquent model · Schedule exception and change model · `app/Models/reschedule.php`
- [Trainer note](https://github.com/xuantruong5/be-fitlife/blob/main/app/Models/TrainerNote.php): Eloquent model · Trainer note model · `app/Models/TrainerNote.php`
- [Trainer salary](https://github.com/xuantruong5/be-fitlife/blob/main/app/Models/TrainerSalary.php): Eloquent model · Trainer salary model · `app/Models/TrainerSalary.php`
- [Migrations](https://github.com/xuantruong5/be-fitlife/tree/main/database/migrations): Schema · Relational tables for users, admins, trainers, members, packages, branches, schedules, attendance, reschedules, notes, salaries, and tokens · `database/migrations`
- [Seed data](https://github.com/xuantruong5/be-fitlife/tree/main/database/seeders): Seeder set · Baseline admins, branches, packages, trainers, members, and schedules · `database/seeders`

## Connections

- Front controller → Web routes: boots · Laravel front controller dispatches web traffic
- Front controller → API routes: serves · Front controller also supports API entry through Laravel routing
- Web routes → Admin panel: admin flows · Web routes send admin requests to the admin controller
- Web routes → Members: member flows · Web routes expose member management and profile flows
- Web routes → Trainers: trainer flows · Web routes expose trainer management flows
- Web routes → Branches: master data · Web routes expose branch administration
- Web routes → Packages: master data · Web routes expose package administration
- Web routes → Schedules: scheduling · Web routes expose schedule management
- Web routes → Enrollments: booking · Web routes expose member-to-schedule assignment
- Web routes → Attendance: check-in · Web routes expose attendance capture
- Web routes → Reschedules: changes · Web routes expose reschedule handling
- Web routes → Trainer notes: notes · Web routes expose trainer note capture
- Web routes → Trainer salary: payroll · Web routes expose trainer salary management
- API routes → Sanctum auth: auth · API routes rely on token-based authentication
- Member guard → Members: protects · Member-only middleware guards member operations
- Trainer guard → Trainers: protects · Trainer-only middleware guards trainer operations
- Admin login → Admin panel: validates · Admin login request validates controller input
- Member requests → Members: validates · Member request classes validate registration and profile updates
- Admin panel → Admin: uses · Admin controller reads and authenticates admin accounts
- Members → Member: uses · Member controller manages member records
- Trainers → Trainer: uses · Trainer controller manages trainer records
- Branches → Branch: uses · Branch controller manages branch records
- Packages → Package: uses · Package controller manages package records
- Schedules → Schedule member: uses · Schedule controller creates trainer-to-member sessions
- Enrollments → Schedule member: uses · Enrollment controller links members to schedules
- Attendance → Attendance: uses · Attendance controller records check-ins
- Reschedules → Reschedule: uses · Reschedule controller manages schedule exceptions
- Trainer notes → Trainer note: uses · Trainer note controller stores session notes
- Trainer salary → Trainer salary: uses · Salary controller manages compensation records
- Members → Mail notify: notifies · Member registration can trigger email notification
- Admin → Migrations: persisted by · Admin records are defined in schema migrations
- Member → Migrations: persisted by · Member records are defined in schema migrations
- Trainer → Migrations: persisted by · Trainer records are defined in schema migrations
- Branch → Migrations: persisted by · Branch records are defined in schema migrations
- Package → Migrations: persisted by · Package records are defined in schema migrations
- Schedule member → Migrations: persisted by · Schedule-member links are defined in schema migrations
- Attendance → Migrations: persisted by · Attendance records are defined in schema migrations
- Reschedule → Migrations: persisted by · Reschedule records are defined in schema migrations
- Trainer note → Migrations: persisted by · Trainer notes are defined in schema migrations
- Trainer salary → Migrations: persisted by · Trainer salaries are defined in schema migrations
- Seed data → Admin: seeds · Seeder set bootstraps admin data
- Seed data → Branch: seeds · Seeder set bootstraps branches
- Seed data → Package: seeds · Seeder set bootstraps packages
- Seed data → Trainer: seeds · Seeder set bootstraps trainers
- Seed data → Member: seeds · Seeder set bootstraps members
- Seed data → Schedule member: seeds · Seeder set bootstraps trainer schedules
- Schedules → Trainer: depends on · Schedules are built around trainers
- Schedules → Branch: depends on · Schedules likely depend on branch placement
