GymSys is built with React 18, Vite, and React Router v6. Vite provides near-instant hot module replacement during development and produces an optimized static bundle for production. React Router handles client-side navigation between the dashboard, clients, payments, access control, and reports pages — all without a full page reload.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Hansel-Pan/sistema-de-informacion-web-para-un-gimnasio/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
Before running the frontend, make sure you have the following installed and available:- Node.js 18 or later — Vite and the project’s dependencies require Node 18+.
- A package manager — npm (bundled with Node.js), yarn, or pnpm all work.
- A running GymSys backend — The frontend makes live API calls to
http://localhost:3001. See the Backend Setup page for the list of required endpoints.
Installation
Start the development server
Launch Vite’s dev server with hot module replacement enabled:Vite will print the local URL once the server is ready — typically in under a second.
Open the application
Navigate to http://localhost:5173 in your browser. The GymSys dashboard will load and immediately begin fetching data from your backend at
http://localhost:3001/api.Changing the Backend URL
By default, every API call the frontend makes is prefixed with the constant defined inservices/api.js:
.env.local file in the project root and set the variable:
.env.local is listed in Vite’s default .gitignore pattern and will not be committed to version control. See the Environment Configuration page for the full list of supported variables.
Building for Production
When you are ready to deploy, generate an optimized static bundle:dist/ directory. The contents of dist/ are plain HTML, CSS, and JavaScript — serve them with any static file host (Nginx, Apache, Vercel, Netlify, Cloudflare Pages, etc.).
Because GymSys uses React Router’s
BrowserRouter, your server must redirect all requests to index.html so that deep links (e.g. /clientes/editar/5) resolve correctly. Consult your hosting provider’s documentation for SPA fallback configuration.Project Structure
The table below describes the purpose of each key file and directory in the repository:| Path | Description |
|---|---|
main.jsx | Application entry point. Mounts the React tree into the #root DOM node using createRoot. |
App.jsx | Top-level component. Configures BrowserRouter, renders the Navbar sidebar, and defines all client-side routes. |
components/Navbar.jsx | Fixed sidebar navigation with links to all main sections of the app. |
pages/Inicio.jsx | Dashboard home page with summary statistics. |
pages/Clientes.jsx | Client list with search and delete actions. |
pages/ClienteForm.jsx | Create and edit form for individual clients (shared route for /clientes/nuevo and /clientes/editar/:id). |
pages/Pagos.jsx | Payment log and new payment registration form. |
pages/Acceso.jsx | Real-time gym occupancy panel with entry and exit recording. |
pages/Reportes.jsx | Reporting and data summary views. |
services/api.js | Centralized API module. Exports clientesApi, pagosApi, and accesoApi objects built on top of the shared peticion() fetch helper. |
App.css | Component-scoped styles: layout, navbar, cards, tables, buttons, forms, badges, and responsive breakpoints. |
index.css | Global reset and base typography (margin/padding reset, Inter font stack, link colours). |