CafeteriaPM is a full-stack cafeteria management system that centralises order taking, kitchen coordination, payment processing, inventory tracking, and financial reporting into a single platform. It replaces paper-based or fragmented workflows by providing each staff role — admin, waiter, kitchen, and cashier — with purpose-built tooling suited to their daily tasks. Whether a waiter is creating an order at a table, a cook is working through the kitchen queue, or a cashier is closing out a sale, every action flows through a shared PostgreSQL database so the entire team always works from the same up-to-date state.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/123048152-JJDS/CafeteriaPM_S203/llms.txt
Use this file to discover all available pages before exploring further.
Quickstart
Clone the repo, seed the database, and make your first API call in under 10 minutes.
Architecture
Understand how the FastAPI backend, Flask admin panel, and React Native app fit together.
Authentication
Learn how JWT tokens are issued and how role-based access control works across the system.
API Reference
Browse every endpoint, request body, and response schema in the full API reference.
System Components
CafeteriaPM is built from three distinct applications that all share the same PostgreSQL database. FastAPI REST API — The authoritative backend, running on Python 3.11 with FastAPI 0.111 and SQLAlchemy 2.0.30. Every client — web or mobile — communicates exclusively through this API. Authentication is handled with JWT tokens signed viapython-jose, passwords are hashed with passlib[bcrypt], and report generation relies on reportlab (PDF) and openpyxl (Excel). The API is self-documenting: interactive Swagger UI is available at /docs and ReDoc at /redoc.
Flask Admin Web Panel — A server-side Flask application running on port 5050, restricted exclusively to users with the admin role. It does not query the database directly; instead it proxies every request to the FastAPI backend using a Bearer token stored in the server-side session. The panel exposes dashboards, user management, product and inventory management, order oversight, expense tracking, table management, and downloadable sales and inventory reports in both PDF and Excel formats.
React Native Mobile App (Expo) — A cross-platform mobile application built with React Native 0.81.5 and Expo 54.0.36. The app is divided into three role-specific modules — Mesero (waiter), Caja (cashier), and Cocina (kitchen) — each presenting only the screens relevant to that role. Token persistence between sessions is handled by @react-native-async-storage/async-storage.
Staff Roles
CafeteriaPM recognises four staff roles. Each role restricts which API endpoints a user may call and which mobile screens or web panel sections are visible to them.| Role | Display Name | Key Capabilities |
|---|---|---|
admin | Administrator | Full access to all endpoints and the Flask web panel. Manages users, products, categories, tables, ingredients, and all reports. Can view statistics, change any order state, and delete records. |
mesero | Waiter | Creates and submits orders, manages table assignments, tracks order status, and updates order details for their assigned tables. |
cocina | Kitchen | Views the live kitchen queue (/pedidos/cola-cocina), manages products and ingredients (create, update, availability toggle), and logs supply purchases to update ingredient stock. |
caja | Cashier | Views active orders ready for payment, registers sales with a chosen payment method, issues tickets, logs operational expenses, and reviews the daily balance. |
For deployment instructions including Docker setup, environment configuration, and running the Flask web panel alongside the API, see the API Deployment guide.