Documentation Index
Fetch the complete documentation index at: https://mintlify.com/JAQA20/Paradigmas-G3/llms.txt
Use this file to discover all available pages before exploring further.
La Comanda’s data shapes are defined as TypeScript interfaces in src/types/index.ts (LaComanda-SaaS). These same shapes drive state management, component props, and will map to database tables as the backend grows. Every interface is exported so that any page, component, or utility can import only what it needs — keeping the type dependency graph explicit and tree-shakeable.
Table
Represents a physical dining table in the restaurant, including its current occupancy state and running bill.
export interface Table {
id: string;
number: string;
seats: number;
diners?: number;
status: "occupied" | "available" | "pending-billing";
elapsedMinutes?: number;
lastActivity?: string;
currentTotal?: number;
}
| Field | Type | Required | Description |
|---|
id | string | ✅ | Unique identifier for the table (e.g. "t1"). |
number | string | ✅ | Human-readable display name shown in the UI (e.g. "Table 08"). |
seats | number | ✅ | Maximum seating capacity of the table. |
diners | number | ❌ | Current number of diners seated. Absent for tables with status: "available". |
status | "occupied" | "available" | "pending-billing" | ✅ | Current occupancy state. "pending-billing" indicates the table has requested the check. |
elapsedMinutes | number | ❌ | Minutes elapsed since the table was seated. Used to surface long-wait alerts in the TableView. |
lastActivity | string | ❌ | Description of the last recorded service action (e.g. "Drinks served"). |
currentTotal | number | ❌ | Running bill total in dollars. Present only when the table is occupied or pending billing. |
KitchenTicket
Represents a single order ticket displayed on the Kitchen Display System (KDS). Each ticket belongs to one table and contains one or more TicketItem entries.
export interface KitchenTicket {
id: string;
number: string;
tableName: string;
status: "preparing" | "new" | "completed";
type: "urgent" | "normal";
time: string;
items: TicketItem[];
instructions?: string;
}
| Field | Type | Required | Description |
|---|
id | string | ✅ | Unique ticket ID used for keying React lists and future API operations. |
number | string | ✅ | Human-readable ticket number displayed on the KDS card (e.g. "1024"). |
tableName | string | ✅ | Name of the originating table or bar seat (e.g. "Table 12"). |
status | "new" | "preparing" | "completed" | ✅ | Lifecycle state of the ticket. "new" means it has just arrived; "preparing" means a cook has acknowledged it; "completed" means it is ready or delivered. |
type | "urgent" | "normal" | ✅ | Priority flag. "urgent" is used for allergy notices or high-priority orders and triggers a visual highlight on the KDS. |
time | string | ✅ | Elapsed time string displayed on the KDS card (e.g. "18:45"). |
items | TicketItem[] | ✅ | Ordered list of items on this ticket. See TicketItem below. |
instructions | string | ❌ | Free-text special preparation instructions, such as allergy notices (e.g. "ALLERGY: No nuts"). |
TicketItem
Represents a single line item within a KitchenTicket. Kept intentionally minimal — the kitchen only needs quantity, name, and optional modifiers.
export interface TicketItem {
quantity: number;
name: string;
notes?: string;
}
| Field | Type | Required | Description |
|---|
quantity | number | ✅ | Number of portions of this item ordered. |
name | string | ✅ | Menu item name as it should appear on the KDS (e.g. "Margherita Pizza"). |
notes | string | ❌ | Preparation modifiers or customizations (e.g. "Medium Rare • No Butter"). |
Product
Represents a menu item or inventory product visible in the Inventory management view. Includes pricing, categorisation, and stock status.
export interface Product {
id: string;
name: string;
category: string;
price: number;
status: "active" | "low-stock" | "inactive";
imageSrc: string;
imageAlt: string;
}
| Field | Type | Required | Description |
|---|
id | string | ✅ | Unique product ID. |
name | string | ✅ | Product or menu item name (e.g. "Truffle Risotto"). |
category | string | ✅ | Category label used for grouping in the Inventory view (e.g. "Pizza", "Beverages"). |
price | number | ✅ | Unit price in dollars. |
status | "active" | "low-stock" | "inactive" | ✅ | Availability status. "low-stock" triggers a warning badge; "inactive" hides the item from active menus. |
imageSrc | string | ✅ | URL of the product thumbnail image rendered in the Inventory grid. |
imageAlt | string | ✅ | Accessible alt text for the product image, required for screen reader support. |
User
Represents a staff member account. Role drives access control throughout the application — the frontend uses Clerk for authentication and maps Clerk user data onto this shape.
export interface User {
id: string;
name: string;
email: string;
role: "MANAGER" | "WAITER" | "KITCHEN";
status: "online" | "offline";
initials: string;
}
| Field | Type | Required | Description |
|---|
id | string | ✅ | Unique user ID. |
name | string | ✅ | Full display name shown in the Staff Control panel. |
email | string | ✅ | Work email address. |
role | "MANAGER" | "WAITER" | "KITCHEN" | ✅ | Role-based access level. "MANAGER" has full access; "WAITER" manages tables and orders; "KITCHEN" accesses the KDS only. |
status | "online" | "offline" | ✅ | Current session status, surfaced in the Staff Control view. |
initials | string | ✅ | Two-letter initials used as the avatar fallback when no profile image is available (e.g. "AS"). |
KitchenStats
A summary statistics snapshot displayed in the KitchenMonitor dashboard header. All fields are numeric counts except avgTime, which is a pre-formatted display string.
export interface KitchenStats {
active: number;
urgent: number;
avgTime: string;
completed: number;
}
| Field | Type | Required | Description |
|---|
active | number | ✅ | Count of currently active (non-completed) tickets in the kitchen queue. |
urgent | number | ✅ | Count of tickets currently flagged as type: "urgent". |
avgTime | string | ✅ | Average ticket fulfillment time formatted for display (e.g. "18m"). |
completed | number | ✅ | Count of tickets completed during the current service session. |
These interfaces are defined in LaComanda-SaaS/src/types/index.ts and shared across pages, components, and mock data. As the Express backend matures, each interface will be mirrored by a corresponding Prisma model in prisma/schema.prisma and backed by a MySQL 8 table, with the TypeScript types regenerated from the Prisma client to maintain a single source of truth.