The CafeteriaPM mobile app is built with React Native and Expo. It provides three distinct role modules — mesero (waiter), caja (cashier), and cocina (kitchen) — each with a purpose-built UI tailored to the specific tasks of that role. The app communicates exclusively with the REST API; there is no direct database connection. JWT tokens obtained at login are persisted locally withDocumentation 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.
@react-native-async-storage/async-storage and attached to every subsequent API request as a Bearer token.
Prerequisites
Before running the app, make sure the following are in place:- Node.js 18+ — check with
node --version - Expo CLI — install globally with
npm install -g expo-cli, or usenpx expofor every command to skip a global install - Expo Go — the Expo Go app installed on your Android or iOS device for development scanning
- The CafeteriaPM API accessible from your device or emulator — the device and API server must be on the same network, or the API must be exposed over the internet
Setup
Install Node dependencies
package.json, including Expo, React Native, Expo Router, and the navigation libraries.Configure the API base URL
The app constructs API request URLs from a base URL constant defined in the screen files. Locate the constant (typically named
API_URL or API_BASE_URL) in the relevant screen files under app/ and update it to your API server’s address:Do not use
localhost or 127.0.0.1 when running on a physical device — the device cannot reach your development machine’s loopback interface. Use the machine’s LAN IP address instead. On an Android emulator, 10.0.2.2 maps to the host machine’s localhost.Start the Expo development server
Open the app on your device or emulator
- Physical device — scan the QR code with the Expo Go app (Android) or the Camera app (iOS)
- Android emulator — press
ain the terminal (Android Studio AVD must be running) - iOS simulator — press
iin the terminal (macOS + Xcode required)
Navigation Structure
After a successful login, the app navigates to a module selection screen (
seleccion-modulo). On this screen the user chooses which role module they want to work in during the current session: mesero, caja, or cocina. This design allows a single staff member to switch modules if needed without logging out. The app uses Expo Router for file-based navigation — each module corresponds to a directory under app/ and its routes are determined by the file structure, matching the expo-router plugin registered in app.json.Role Modules
Mesero (Waiter)
The mesero module is designed for floor staff who take orders at tables.- Table overview — a grid or list of all dining tables showing their real-time status: available (
libre), occupied (ocupada), or reserved (reservada) - Table detail — tap a table to open its active order, see items already added, and browse the full product catalog organized by category
- Create and update orders — add products to an open order, set per-item quantities, and attach observations (special instructions) to individual items
- Order status tracking — monitor the live progression of an order through the kitchen pipeline without leaving the app
- Profile — view the logged-in user’s name and role, and log out
Caja (Cashier)
The caja module handles payment processing and financial logging for front-of-house cash staff.- Active orders queue — lists orders with status
listo(ready) orentregado(delivered) that are awaiting payment - Payment confirmation — confirm an order and select the payment method (cash, card, etc.)
- Change calculator — when cash is selected, enter the amount tendered and the app calculates the change to return to the customer
- PDF ticket — generate and view a printable PDF receipt for the closed order via the API’s ticket endpoint
- Daily sales balance — a running summary of the day’s total revenue processed through the cashier
- Expense logging — register ad-hoc operational expenses (supplies, utilities, etc.) against the daily ledger
Cocina (Kitchen)
The cocina module is the kitchen-facing display for cooks and kitchen staff.- Live order queue — real-time list of orders in
pendiente(pending) oren_preparacion(being prepared) states, showing all items and their observations - Order detail view — expand any order to see the complete breakdown of items, quantities, and any special instructions from the waiter
- Status updates — advance an order from
en_preparaciontolistowith a single action, notifying the waiter and cashier - Ingredient inventory — view current stock levels and identify ingredients that have fallen below their minimum threshold
- Supply purchases — register new ingredient purchases directly from the kitchen, automatically updating stock levels
- Product menu management — add new products to the catalog or edit existing ones (name, price, category, availability) without needing access to the admin web panel
Key Dependencies
The following packages frompackage.json are central to the app’s functionality:
| Package | Version | Purpose |
|---|---|---|
expo | ~54.0.36 | Expo SDK — build toolchain, native module access, and OTA updates |
expo-router | ~6.0.24 | File-based navigation with automatic deep-linking via the cafeteriapm:// URL scheme |
react-native | 0.81.5 | Core React Native framework with the new architecture enabled (newArchEnabled: true) |
@react-native-async-storage/async-storage | 2.2.0 | Persistent key-value storage used to save and restore JWT tokens across app restarts |
@react-navigation/native | ^7.1.8 | Navigation container and core hooks |
@react-navigation/bottom-tabs | ^7.4.0 | Bottom tab bar navigator used inside each role module |
@react-navigation/native-stack | ^7.3.16 | Native stack navigator for screen-to-screen transitions |
react-native-gesture-handler | ~2.28.0 | Required peer dependency for gesture-driven navigation |
react-native-screens | ~4.16.0 | Native screen containers for improved memory and performance |
react-native-safe-area-context | ~5.6.0 | Safe-area insets for notch and home-bar aware layouts |
@expo/vector-icons | ^15.0.3 | Icon library (Ionicons, MaterialIcons, etc.) used throughout the UI |
expo-status-bar | ~3.0.9 | Controls the appearance of the device status bar |