All Blackterz configuration is managed through a singleDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Blackterz2/Proyecto_5to_Semestre/llms.txt
Use this file to discover all available pages before exploring further.
.env file in the project root. The file is loaded at startup by dotenv before any other module initializes, so every variable is available in process.env throughout the entire application. No configuration is hardcoded in source files.
To create your configuration file from the provided template, run:
.env in your editor and fill in the values for your environment. The sections below document every supported variable.
Server
The port the Express server listens on. The server falls back to Change this if port 3000 is already occupied on your machine, or when deploying behind a reverse proxy.
3000 if this variable is unset:Runtime mode. Setting this to
production enables strict security behavior across the application. Any other value (including leaving it blank) is treated as development mode.The most visible effect is on the auth rate limiter:| Value | Max auth attempts per 15 min |
|---|---|
production | 10 (brute-force protection) |
| anything else | 100 (relaxed for local testing) |
Database
AllDB_* variables are passed directly to the mysql2 connection pool in src/config/db.js.
Hostname or IP address of the MySQL server. Use
localhost when MySQL runs on the same machine as the Node.js process. For Docker or remote deployments, set this to the container name or server IP.TCP port MySQL listens on. The MySQL default is
3306. Only change this if you have configured MySQL to use a non-standard port.MySQL username that has
SELECT, INSERT, UPDATE, DELETE, ALTER, and CREATE privileges on the fitness_app database.Password for the MySQL user. Leave this blank (empty string) if your local MySQL install has no password set for the user:
Name of the MySQL database.
.env.example ships this as blackterz, but the actual running database is named fitness_app — that is the name used by all migration files and seed scripts. You must update this value after copying the example file or the server will fail to connect.Discrepancy:
.env.example sets DB_NAME=blackterz, but the application requires a database named fitness_app (an earlier project that was reused as the foundation for Blackterz). Always override this to fitness_app after running cp .env.example .env.JWT
The secret key used to sign and verify all JSON Web Tokens issued by
POST /api/auth/login. Tokens are signed with HMAC-SHA256 (HS256) and expire after 7 days.In development you can use any string. In production use a long cryptographically random value.Email (Password Recovery)
These variables configure the Nodemailer SMTP transport used by the password recovery flow. When a user requests a reset link, the server sends an email containing a time-limited token URL built fromAPP_URL.
SMTP server hostname. Example:
smtp.gmail.comSMTP port. Common values:
587— STARTTLS (recommended)465— SSL/TLS25— plain (not recommended for production)
587SMTP authentication username. This is typically the full sender email address. Example:
[email protected]SMTP authentication password. For Gmail, generate an App Password from your Google Account security settings rather than using your main account password.
Base URL of the application, used to construct the password reset link that is embedded in recovery emails. Must not have a trailing slash.
- Gmail Setup
- Generic SMTP
- Enable 2-Step Verification on your Google Account.
- Go to Google Account → Security → App passwords.
- Generate a new app password for “Mail” on “Other device”.
- Use that 16-character password as
EMAIL_PASS.
AscendAPI (Exercise Videos)
Your RapidAPI subscription key for the “EDB with Videos and Images by AscendAPI” product. This key is required for exercise video playback in the catalog detail panel.To obtain a key:
- Create a free account at rapidapi.com.
- Search for “EDB with Videos and Images by AscendAPI”.
- Subscribe to the Basic (free) plan.
- Copy the
X-RapidAPI-Keyvalue shown in the API playground.
If
ASCENDAPI_KEY is not set, the application will start and function normally — exercise images and text will display correctly, but the video playback feature in the exercise detail panel will not work. Set this variable only when you need video functionality.Complete .env Template
Here is a fully annotated template you can copy directly into your.env file:
