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.

Running Restaurant Equis locally gives you a full-fidelity development environment — the React 19 frontend on port 3000, the FastAPI backend on port 5000, and a PostgreSQL 15+ database. You can spin up the database either as a native service or via Docker, then start the frontend and backend processes independently for the fastest development loop.

Prerequisites

Before you begin, make sure the following tools are installed on your machine:
  • Node.js 18+ — required to install frontend dependencies and run npm run dev
  • Python 3.11+ — required to run the FastAPI backend with Uvicorn
  • PostgreSQL 15+ or Docker — to provide the database (see Option B for the Docker path)
  • Git — to clone the repository

Option A: Manual Setup

1

Clone the repository

git clone https://github.com/teofilobetancourt/Restaurant-Equis.git
cd Restaurant-Equis
2

Install frontend dependencies

From the project root, install all Node.js packages:
npm install
3

Create the frontend environment file

Create a .env.local file in the project root with the following variables:
# URL base of the FastAPI backend
VITE_API_URL=http://localhost:5000

# WhatsApp number for order sharing (country code + number, no symbols)
# Venezuela format example: 58414XXXXXXX
VITE_WHATSAPP_NUMERO=584140000000
VITE_API_URL tells the React app where to reach the backend. VITE_WHATSAPP_NUMERO is the restaurant’s WhatsApp number used by the POS module to pre-fill order messages.
4

Install Python dependencies

Navigate into the backend/ directory and install the required packages:
cd backend
pip install -r requirements.txt
5

Configure the backend environment

Copy the provided example file and fill in your local PostgreSQL credentials:
cp .env.example .env
Open backend/.env and update the values:
DB_HOST=localhost
DB_PORT=5432
DB_NAME=restaurant_equis
DB_USER=equis_user
DB_PASSWORD=your_local_password
API_PORT=5000
CORS_ORIGINS=http://localhost:5173,http://localhost:3000
Make sure a PostgreSQL database named restaurant_equis exists and the user has full privileges on it.
6

Start the FastAPI backend

From inside the backend/ directory, launch the Uvicorn development server:
uvicorn main:app --reload --port 5000
The backend will be available at http://localhost:5000. On first start, SQLAlchemy automatically creates all required tables (productos, pedidos, items_pedido, inventario, proveedores).
7

Start the React frontend

Open a new terminal, return to the project root, and run the Vite dev server:
cd ..
npm run dev
Vite will start the frontend at http://localhost:3000.
8

Open the application

Navigate to http://localhost:3000 in your browser. The React SPA will load and connect to the FastAPI backend running on port 5000.

Option B: PostgreSQL via Docker

If you prefer not to install PostgreSQL natively, the included docker-compose.yml starts only the database in a container. You still run the frontend and backend processes manually on your host machine. 1. Start the PostgreSQL container:
docker-compose up -d postgres
This launches a postgres:16-alpine container named restaurant_equis_db with the following defaults:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: restaurant_equis
The database is exposed on localhost:5432 and data is persisted in the postgres_data Docker volume. 2. Update backend/.env to match the Docker credentials:
DB_HOST=localhost
DB_PORT=5432
DB_NAME=restaurant_equis
DB_USER=postgres
DB_PASSWORD=postgres
API_PORT=5000
CORS_ORIGINS=http://localhost:5173,http://localhost:3000
3. Start the backend and frontend exactly as described in Option A, Steps 4–8. Stop the database container when done:
docker-compose down

Verifying the Stack

Once both processes are running, confirm each layer is healthy:
CheckURLExpected Result
Backend healthhttp://localhost:5000/api/JSON response — {"status": "ok"}
Swagger UIhttp://localhost:5000/api/docsInteractive API documentation
React frontendhttp://localhost:3000Restaurant Equis app loads
On the very first run, SQLAlchemy creates all database tables automatically — no manual SQL migrations are needed. The application is ready to use immediately after the backend starts; you can begin adding dishes, tables, and orders straight away.
The --reload flag passed to uvicorn enables hot-reload: any change you save to a Python file in backend/ is picked up instantly without restarting the process. Use --reload exclusively in development — it adds overhead that is not suitable for production.

Build docs developers (and LLMs) love