The Configuration page (Documentation Index
Fetch the complete documentation index at: https://mintlify.com/azahel79/Spartans-gym/llms.txt
Use this file to discover all available pages before exploring further.
/config) is the central control panel for your Spartans Gym installation. It is accessible to administrators only — receptionists are redirected away by the frontend route guard before the page loads. From here you can update your gym’s public identity, manage the membership plans available to clients, administer staff user accounts, and review security options.
Spartans Gym is designed for single-gym deployments. Only one
GymConfig record exists per installation. All reads and writes target that single row; if it does not yet exist, the API creates it automatically with default values on the first request.Navigating the Config Tabs
The Config page is organized into six tabs. Use the sidebar navigation on the left to switch between them.Detalles del Gimnasio
Edit your gym’s name, email, phone number, address, and logo. Changes are persisted to the
GymConfig table via PUT /api/config/gym.Planes y Membresías
Create, edit, and soft-delete the membership plans available to clients. Each plan has a name, price, and billing period.
Roles y Permisos
Manage staff user accounts and their access levels. You can create new users and toggle roles directly from this tab.
Seguridad
Change your admin password and close all active sessions. Both actions are presented as UI controls in the current release.
Notificaciones
Coming soon — notification and alert configuration will be available in a future update.
Pagos y Facturación
Coming soon — payment gateway integration and invoicing settings will be available in a future update.
Gym Identity Settings
The Detalles del Gimnasio tab lets you update the information displayed throughout the application and on any client-facing output.GymConfig Model
| Field | Type | Default | Description |
|---|---|---|---|
id | Int | auto-increment | Primary key |
name | String | SPARTAN'S GYM | Gym’s commercial name |
email | String | contacto@spartansgym.com | Contact email address |
phone | String | +52 55 1234 5678 | Contact phone number |
address | String | Avenida de los Deportes 123, CDMX | Physical address |
logo | String? | null | Cloudinary URL for the gym logo |
createdAt | DateTime | now() | Record creation timestamp |
updatedAt | DateTime | auto | Last update timestamp |
Updating Gym Info
Send aPUT request to /api/config/gym with any combination of the writable fields. Only the fields you include are updated — omitted fields keep their current values.
{ "success": true, "data": { ...updatedConfig } }.
Logo Upload
The logo uploader in the Detalles del Gimnasio tab sends the selected image file to Cloudinary and stores the resulting URL inGymConfig.logo.
Upload Endpoint
logo. The file must be an image (image/*) and must not exceed 5 MB. Files that exceed the size limit or are not images are rejected client-side before the request is made.
Upload Flow
Select an image
Click Subir logo on the Detalles del Gimnasio tab and choose a JPG, PNG, or WEBP file under 5 MB. A local preview renders immediately.
Save changes
Click Guardar cambios. The frontend first POSTs the file to
/api/upload/logo, receives the Cloudinary URL in the response, then includes that URL in the subsequent PUT /api/config/gym request.PUT /api/config/gym with { "logo": "" }, clearing the stored URL.
Membership Plans
The Planes y Membresías tab surfaces the Plan management interface.Plan fields
Plan fields
| Field | Type | Description |
|---|---|---|
id | String (UUID) | Unique plan identifier |
name | String | Unique plan name (e.g., “Plan Premium”) |
price | Decimal | Price in MXN |
period | String | Billing period: Mes, 3 Meses, 6 Meses, or Ano |
color | String | UI accent color class (default: bg-primary) |
isActive | Boolean | Whether the plan appears in client-facing selectors |
createdAt | DateTime | Creation timestamp |
updatedAt | DateTime | Last modification timestamp |
isActive flag is set to false and existing client records that reference the plan are not modified.
Security Tab
The Seguridad tab (admin only) presents two actions:| Action | Description |
|---|---|
| Cambiar Contraseña | Opens a form to update your admin account password |
| Cerrar todas las sesiones | Terminates all active login sessions for your account |
Both security actions are currently UI-only controls in this release. Backend endpoints for password change and session invalidation are not yet exposed via the API.