PitchPro uses environment variables to configure database connections, JWT secrets, server ports, and API URLs. Both the backend (Documentation Index
Fetch the complete documentation index at: https://mintlify.com/JuanSerna14/Final-lenguaje-Avanzado/llms.txt
Use this file to discover all available pages before exploring further.
arquimarket/) and the frontend (starter-vite-ts/) need their own .env files — neither project ships a .env in version control, so you must create them before running the application.
Backend Variables (arquimarket/.env)
The Express backend loads its configuration via dotenv at startup (dotenv.config() in src/main.ts). The variables below control the database connection and authentication token signing.
Server
The port on which the Express server listens. Change this if port
8000 is already in use on your machine.Runtime environment. Accepted values:
development | production. Affects logging verbosity and certain middleware behaviours.Database
Hostname or IP address of your PostgreSQL server. Use
localhost when running the database via Docker Compose on the same machine.TCP port PostgreSQL is listening on. The standard PostgreSQL default is
5432 and matches the port mapping in docker-compose.yml.Name of the PostgreSQL database to connect to. Docker Compose will create this database automatically on first start using the value of this variable.
PostgreSQL username. Docker Compose creates this user automatically on first container start.
Password for the PostgreSQL user. Also used by Docker Compose to initialise the container. Change this before deploying to production.
Authentication (JWT)
PitchPro uses a two-token auth strategy: short-lived access tokens (15 minutes) signed withJWT_SECRET, and long-lived refresh tokens (7 days) signed with JWT_REFRESH_SECRET. The two secrets must be different strings.
Signs and verifies access tokens (Bearer tokens sent in
Authorization headers). Access tokens expire after 15 minutes.The fallback value secret_key_123 is hard-coded in src/modules/auth/auth.controller.ts and src/middlewares/verifyToken.ts — never use this default in production.Signs and verifies refresh tokens stored in the
users table. Refresh tokens expire after 7 days.Must be a different value from JWT_SECRET. The fallback refresh_secret_key_456 is for development convenience only.Complete Backend Example
Copy this block intoarquimarket/.env and replace the placeholder values:
Frontend Variables (starter-vite-ts/.env)
The Vite frontend uses environment variables prefixed with VITE_ — only variables with this prefix are bundled into the client build and accessible via import.meta.env. Variables without the prefix are ignored by Vite.
Base URL of the PitchPro backend API. All
axios requests in the frontend are prefixed with this value.- Local development: point to your running Express server.
- Production: point to your deployed API URL (e.g.
https://api.pitchpro.example.com).
Optional base URL for static assets served separately from the main API (e.g. an S3 bucket or CDN). Can be left empty if you are not serving assets from a separate origin.
Vite only exposes variables prefixed with
VITE_ to browser code. Variables without this prefix (e.g. API_KEY=...) are intentionally kept server-side and will be undefined in import.meta.env. See the Vite env docs for details.Complete Frontend Example
Copy this block intostarter-vite-ts/.env:
VITE_HOST_API to the deployed backend URL before running npm run build.
Production Checklist
Generating Secure Secrets
Use Node.js’s built-incrypto module to generate cryptographically secure random strings for your JWT secrets:
JWT_SECRET and JWT_REFRESH_SECRET respectively.
Docker Compose
Start a local PostgreSQL instance with Docker Compose using the DB_* variables defined here.
Backend Setup
Install backend dependencies, apply the database schema, and start the Express server.
Frontend Setup
Configure VITE_HOST_API and run the Vite + React development server.
Backend Configuration
Deep-dive into Express middleware, CORS settings, and JWT token lifecycle.