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.

This guide walks you through cloning the repository, installing dependencies, configuring environment variables, and running both the React frontend and the FastAPI backend on your local machine. By the end you will have a fully functional Restaurant Equis instance with a live POS, kitchen display, inventory module, and Swagger API docs — all running at http://localhost:3000.

Prerequisites

Before you begin, make sure the following tools are installed on your system:

Local Setup

1

Clone the repository

Clone the Restaurant Equis repository from GitHub and navigate into the project root:
git clone https://github.com/teofilobetancourt/Restaurant-Equis.git
cd Restaurant-Equis
2

Install frontend dependencies

Install all Node.js packages from the project root. This installs React 19, Vite 6, Tailwind CSS 4, Lucide React, and all other frontend dependencies declared in package.json:
npm install
3

Configure the frontend environment

Create a .env.local file in the project root with the following variables. VITE_API_URL tells the frontend where your FastAPI backend is listening, and VITE_WHATSAPP_NUMERO is the restaurant’s WhatsApp number used by the POS to generate order summary links.
.env.local
# URL base of the Backend API
# Change this to wherever your backend server is running
VITE_API_URL=http://localhost:5000

# Restaurant WhatsApp number (no symbols, with country code)
# Example Venezuela (+58): 58414XXXXXXX
VITE_WHATSAPP_NUMERO=584140000000
4

Install backend dependencies

Move into the backend/ directory, install the Python packages, and copy the environment template:
cd backend
pip install -r requirements.txt
cp .env.example .env
The requirements.txt pins the following packages:
backend/requirements.txt
fastapi==0.115.0
uvicorn[standard]==0.30.6
sqlalchemy==2.0.35
psycopg2-binary==2.9.9
python-dotenv==1.0.1
pydantic==2.9.2
5

Configure the backend environment

Open backend/.env and fill in your PostgreSQL connection details. The file uses the following variables:
backend/.env
# ── Database (PostgreSQL) ──────────────────────────────────
DB_HOST=localhost
DB_PORT=5432
DB_NAME=restaurant_equis
DB_USER=equis_user
DB_PASSWORD=CAMBIA_ESTA_CONTRASENA

# ── API Server ─────────────────────────────────────────────
API_PORT=5000

# ── CORS ───────────────────────────────────────────────────
# Comma-separated list of allowed origins
CORS_ORIGINS=http://158.220.100.226,http://localhost:5173,http://localhost:3000
Replace DB_USER and DB_PASSWORD with the credentials for your local PostgreSQL instance. The database (DB_NAME) will be created automatically by SQLAlchemy on first startup if it does not already exist.
6

Start the backend server

From the backend/ directory, launch the FastAPI application with Uvicorn on port 5000:
uvicorn main:app --reload --port 5000
On startup, the backend automatically:
  1. Creates the Inventario PostgreSQL schema if it does not exist.
  2. Runs Base.metadata.create_all() to create all tables.
  3. Seeds initial demo data (see tip below).
You should see output confirming the tables were created and the Uvicorn server is running on http://127.0.0.1:5000.
7

Start the frontend development server

Open a new terminal, go back to the project root, and start Vite:
cd ..
npm run dev
The application will be available at http://localhost:3000.
On the very first run, the backend automatically seeds the database with demo data so you can explore every module immediately — no manual SQL required:
  • 10 menu dishes across 5 categories (starters, mains, desserts, sides, drinks)
  • 5 tables across Terraza, Salón Principal, and VIP zones
  • 1 general-purpose customer (used for walk-in / counter orders)
  • 3 inventory items (Carne de Res Molida, Queso Cheddar, Papas Congeladas)
  • 1 sample supplier (Distribuidora Alimentos Express C.A.)
This seed logic is idempotent — it only inserts records if the corresponding table is empty, so it is safe to restart the server repeatedly.

Start Commands Reference

# From the backend/ directory
uvicorn main:app --reload --port 5000
The interactive Swagger UI for the REST API is available at http://localhost:5000/api/docs. You can use it to explore all endpoints, inspect request/response schemas, and send test requests directly from the browser.

Using Docker Compose

If you prefer not to install PostgreSQL locally, the project includes a docker-compose.yml that spins up a PostgreSQL 16 container with persistent data storage:
docker-compose.yml
version: '3.8'

services:
  # ── PostgreSQL 16 Database ─────────────────────────────────
  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:
Start the database container with:
docker compose up -d postgres
Then update your backend/.env to match the Docker credentials:
DB_HOST=localhost
DB_PORT=5432
DB_NAME=restaurant_equis
DB_USER=postgres
DB_PASSWORD=postgres
After the container is running, proceed from Step 6 to start the backend and frontend as normal.

Build docs developers (and LLMs) love