GymSys separates runtime configuration from source code through environment variable files. This lets you point the frontend at a local development backend, a staging server, or a production API without modifying any JavaScript. The frontend reads one Vite environment variable; the backend variables below are a reference for whichever separate server implementation you choose to build or connect.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.
Frontend Environment Variables
The GymSys frontend reads one environment variable at startup:| Variable | Default | Description |
|---|---|---|
VITE_API_URL | http://localhost:3001/api | Base URL for the backend REST API. All fetch calls are prefixed with this value. |
.env.local file in the project root (next to package.json) and set the variable:
.env.local during both vite dev and vite build. Because the filename matches Vite’s built-in gitignore pattern, the file is not committed to version control — keeping secrets and environment-specific URLs out of your repository history.
You can also use .env.production to set values that apply only when running vite build:
Backend Environment Variables
The backend server is not included in this repository, but a typical Node.js implementation will need the following variables. Create a.env file in your backend project root:
| Variable | Description |
|---|---|
PORT | The port the backend HTTP server binds to. The frontend defaults to 3001 — change both values together if you use a different port. |
DB_CONNECTION | Full connection string for your database (PostgreSQL, MySQL, SQLite, etc.). |
CORS_ORIGIN | The frontend origin that the backend permits in its CORS policy. Use http://localhost:5173 for local development and your production domain in staging/production. |
Production Checklist
Before deploying GymSys to a public environment, verify each of the following items:- Set
VITE_API_URLto your production API URL and rebuild withnpm run build. - Enable HTTPS on both the frontend host and the backend API server. Browsers will block mixed-content requests (HTTPS page → HTTP API).
- Configure the backend
CORS_ORIGINto allow exactly your production frontend domain — avoid wildcard (*) origins in production. - Run
npm run buildand deploy the contents of thedist/folder to your static file host. - Configure your static host to redirect all unmatched paths to
index.htmlto support React Router’s client-side navigation. - Verify that the backend is running, reachable from the frontend host, and returning the expected JSON shapes described in the Backend Setup guide.