Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/teofilobetancourt/Restaurant-Equis/llms.txt

Use this file to discover all available pages before exploring further.

Restaurant Equis is configured entirely through environment variables — no values are hard-coded. The frontend reads variables at build time via Vite (prefixed VITE_), while the backend reads them at runtime from a backend/.env file loaded by the systemd service or the shell that runs Uvicorn. This page documents every variable, shows the provided example files, and explains the Docker Compose database defaults.

Frontend Environment Variables

Frontend variables are defined in .env.local at the project root and must be prefixed with VITE_ to be exposed to the React application by Vite.
VITE_API_URL
string
Base URL of the FastAPI backend. All API requests from the React app are prefixed with this value. When left as an empty string, requests are made relative to the same origin — which is the correct behavior when Nginx serves both the SPA and proxies /api/* from the same host. Set to http://localhost:5000 during local development when the frontend and backend run on different ports.Default: empty string (same-origin)Example: http://localhost:5000
VITE_WHATSAPP_NUMERO
string
The restaurant’s WhatsApp number used by the POS module to pre-fill order messages via the wa.me deep-link. The value must include the country code with no + sign, spaces, or dashes.Format: 58 (Venezuela country code) + area code + subscriber number — e.g. 584140000000Example: 584140000000

Backend Environment Variables

Backend variables are stored in backend/.env. The systemd service file points to this file via EnvironmentFile=, so all variables are available to the Uvicorn process at runtime.
DB_HOST
string
Hostname or IP address of the PostgreSQL server.Default: localhost
DB_PORT
number
TCP port on which PostgreSQL is listening.Default: 5432
DB_NAME
string
Name of the PostgreSQL database. The database must already exist before the backend starts; SQLAlchemy creates the tables automatically on first boot but does not create the database itself.Default: restaurant_equis
DB_USER
string
required
PostgreSQL username that has full privileges on DB_NAME.Example: equis_user
DB_PASSWORD
string
required
Password for DB_USER. Replace the placeholder CAMBIA_ESTA_CONTRASENA with a strong, unique password before deploying to any non-local environment.
API_PORT
number
Port on which Uvicorn listens. The Nginx reverse proxy and the systemd ExecStart command both reference port 5000 — change all three in sync if you need a different port.Default: 5000
CORS_ORIGINS
string
Comma-separated list of origins that the FastAPI CORS middleware will accept requests from. Include every hostname from which the frontend is served. In local development this is typically http://localhost:5173,http://localhost:3000; in production it should be limited to the exact production URL(s).Example: http://158.220.100.226,http://localhost:5173,http://localhost:3000

Frontend .env.local Example

The .env.example file at the project root is the canonical template for frontend configuration:
# URL base de la API del Backend
# Cambia esto según donde esté corriendo el servidor del Backend
VITE_API_URL=http://localhost:5000

# Número de WhatsApp del restaurante (sin signos, con código de país)
# Ejemplo Venezuela (+58): 58414XXXXXXX
VITE_WHATSAPP_NUMERO=584140000000
Copy this file to .env.local and update the values before running npm run dev or npm run build.
cp .env.example .env.local

Backend .env Example

The backend/.env.example file is the canonical template for backend configuration:
# ══════════════════════════════════════════════════════════════
#  Restaurant Equis — Backend Configuration
#  Copia este archivo como .env y rellena los valores reales
# ══════════════════════════════════════════════════════════════

# ── Base de Datos (PostgreSQL) ─────────────────────────────
# Proveídos por el equipo de BD
DB_HOST=localhost
DB_PORT=5432
DB_NAME=restaurant_equis
DB_USER=equis_user
DB_PASSWORD=CAMBIA_ESTA_CONTRASENA

# ── Servidor API ───────────────────────────────────────────
API_PORT=5000

# ── CORS ──────────────────────────────────────────────────
# Lista separada por comas de orígenes permitidos
CORS_ORIGINS=http://158.220.100.226,http://localhost:5173,http://localhost:3000
Copy this file to backend/.env before starting the backend:
cp backend/.env.example backend/.env

Docker Compose

The docker-compose.yml file defines a single postgres service for running the database in a container. This is used during local development to avoid installing PostgreSQL natively, or can serve as the basis for a fully containerised deployment.
version: '3.8'

services:
  # ── Base de Datos PostgreSQL 16 ──────────────────────────────
  postgres:
    image: postgres:16-alpine
    container_name: restaurant_equis_db
    restart: always
    environment:
      POSTGRES_USER: postgres
      POSTGRES_PASSWORD: postgres
      POSTGRES_DB: restaurant_equis
    ports:
      - "5432:5432"
    volumes:
      - postgres_data:/var/lib/postgresql/data

volumes:
  postgres_data:
Service variables explained:
VariableValueDescription
POSTGRES_USERpostgresSuperuser account created inside the container
POSTGRES_PASSWORDpostgresPassword for the superuser — change this for any shared or production environment
POSTGRES_DBrestaurant_equisDatabase created automatically on first container start
When using this container, set the corresponding values in backend/.env:
DB_HOST=localhost
DB_PORT=5432
DB_NAME=restaurant_equis
DB_USER=postgres
DB_PASSWORD=postgres
Data is persisted in the named volume postgres_data, so it survives docker-compose down and is only removed with docker-compose down -v.
Never commit .env or .env.local files to source control. Both files are listed in .gitignore by convention — verify this before your first push. The .env.example and backend/.env.example templates are safe to commit because they contain only placeholder values, not real credentials.
You can maintain separate environment files for different targets and reference them explicitly:
# Local development — points to localhost:5000
VITE_API_URL=http://localhost:5000   # .env.local

# Production build — empty string so Nginx proxies /api/ on the same origin
VITE_API_URL=                        # .env.production
Run npm run build and Vite will pick up .env.production automatically, or pass the file explicitly with --mode production. This lets you use a single codebase for both development and production without changing any source files.

Build docs developers (and LLMs) love