La Comanda uses environment variables to configure three separate concerns: Clerk authentication (publishable key on the frontend, future secret key on the backend), database connectivity via Prisma’sDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/JAQA20/Paradigmas-G3/llms.txt
Use this file to discover all available pages before exploring further.
DATABASE_URL, and the API base URL that tells the React client where to send requests. Setting these correctly is required before the application can authenticate users or persist any data.
Frontend variables
The frontend is built with Vite. Only variables prefixed withVITE_ are embedded into the client bundle at build time — any other variable is ignored by Vite and never exposed to the browser.
Place these in a file named frontend/.env.local (which is automatically excluded from version control by Vite’s default .gitignore template).
| Variable | Required | Description |
|---|---|---|
VITE_CLERK_PUBLISHABLE_KEY | ✅ Yes | Your Clerk publishable key from the Clerk Dashboard. The VITE_ prefix is mandatory — without it Vite will not expose the value to browser code. |
VITE_API_URL | Optional | Base URL of the Express backend. When running via Docker Compose this defaults to http://localhost:3000, which is already set in docker-compose.yml. Override it here to point at a staging or production API. |
Backend variables
The backend uses thedotenv package to load variables from backend/.env at startup. These values are never sent to the browser.
| Variable | Required | Description |
|---|---|---|
DATABASE_URL | ✅ Yes | MySQL connection string in Prisma URL format. When running inside Docker Compose, the hostname is the service name db, not localhost. Example: mysql://root:rootpassword@db:3306/la_comanda |
PORT | Optional | Port on which the Express 5 server listens. Defaults to 3000. Must match the port mapping in docker-compose.yml if changed. |
Database (MySQL) variables
These variables are consumed directly by themysql:8.0 Docker image and are set in docker-compose.yml under the db service. They are applied only on the first boot when the container initialises the data directory — changing them after the volume already exists has no effect unless you run docker compose down -v first.
| Variable | Required | Description |
|---|---|---|
MYSQL_ROOT_PASSWORD | ✅ Yes | Root password for the MySQL container. The default value in docker-compose.yml is rootpassword. |
MYSQL_DATABASE | ✅ Yes | Database name to create automatically on first boot. La Comanda uses la_comanda. This name must match the database segment of DATABASE_URL. |
Setup instructions
Create the frontend environment file
Inside the The
frontend/ directory, create a file called .env.local and add your Clerk publishable key:frontend/.env.local
VITE_API_URL is optional when using Docker Compose — the default http://localhost:3000 is already injected via docker-compose.yml. Add it here only if you need to override it (e.g. to point at a remote staging API):frontend/.env.local
Create the backend environment file
Inside the When running inside Docker Compose, the hostname in
backend/ directory, create a file called .env and add the database connection string and port:backend/.env
DATABASE_URL must be db (the Docker Compose service name), not localhost.How to get your Clerk publishable key:
- Sign up or log in at https://clerk.com.
- Create a new application (choose a name and select your preferred sign-in methods).
- In the left sidebar of your application dashboard, navigate to Configure → API Keys.
- Copy the value labelled Publishable key — it begins with
pk_test_for development orpk_live_for production.
VITE_CLERK_PUBLISHABLE_KEY in frontend/.env.local. The publishable key is safe to embed in client-side code; it is not a secret.