The Horse Trust platform requires environment variables to be configured for both the server (backend) and client (frontend) applications.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/No-Country-simulation/S02-26-Equipo-33-Web-App/llms.txt
Use this file to discover all available pages before exploring further.
Server Environment Variables
Create a.env file in the server/ directory with the following variables:
Database Configuration
MongoDB connection string for your database.Format:
mongodb+srv://<username>:<password>@<cluster>/<database>Server Configuration
Port number where the Express server will run.
Environment mode for the application.Options:
development, production, testAuthentication & Security
Secret key used to sign JWT tokens for authentication.
JWT token expiration time.Format: Use time notation like
10d (10 days), 24h (24 hours), 30m (30 minutes)Number of salt rounds for bcrypt password hashing.
Higher values increase security but also increase processing time. 12 is a good balance for production.
CORS Configuration
Comma-separated list of allowed origins for CORS.
Client Environment Variables
Create a.env.local file in the client/ directory with the following variables:
API Configuration
Base URL for the backend API.
The
NEXT_PUBLIC_ prefix makes this variable accessible in the browser.Cloudinary Configuration
Your Cloudinary cloud name for image uploads.
Cloudinary upload preset for handling image uploads.
You need to create this upload preset in your Cloudinary dashboard with unsigned upload enabled.
Example Configuration Files
Server .env Example
Client .env.local Example
Security Best Practices
Use Environment-Specific Files
Maintain separate configuration files for development, staging, and production.

