Skip to main content

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;
}
FieldTypeRequiredDescription
idstringUnique identifier for the table (e.g. "t1").
numberstringHuman-readable display name shown in the UI (e.g. "Table 08").
seatsnumberMaximum seating capacity of the table.
dinersnumberCurrent 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.
elapsedMinutesnumberMinutes elapsed since the table was seated. Used to surface long-wait alerts in the TableView.
lastActivitystringDescription of the last recorded service action (e.g. "Drinks served").
currentTotalnumberRunning 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;
}
FieldTypeRequiredDescription
idstringUnique ticket ID used for keying React lists and future API operations.
numberstringHuman-readable ticket number displayed on the KDS card (e.g. "1024").
tableNamestringName 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.
timestringElapsed time string displayed on the KDS card (e.g. "18:45").
itemsTicketItem[]Ordered list of items on this ticket. See TicketItem below.
instructionsstringFree-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;
}
FieldTypeRequiredDescription
quantitynumberNumber of portions of this item ordered.
namestringMenu item name as it should appear on the KDS (e.g. "Margherita Pizza").
notesstringPreparation 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;
}
FieldTypeRequiredDescription
idstringUnique product ID.
namestringProduct or menu item name (e.g. "Truffle Risotto").
categorystringCategory label used for grouping in the Inventory view (e.g. "Pizza", "Beverages").
pricenumberUnit price in dollars.
status"active" | "low-stock" | "inactive"Availability status. "low-stock" triggers a warning badge; "inactive" hides the item from active menus.
imageSrcstringURL of the product thumbnail image rendered in the Inventory grid.
imageAltstringAccessible 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;
}
FieldTypeRequiredDescription
idstringUnique user ID.
namestringFull display name shown in the Staff Control panel.
emailstringWork 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.
initialsstringTwo-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;
}
FieldTypeRequiredDescription
activenumberCount of currently active (non-completed) tickets in the kitchen queue.
urgentnumberCount of tickets currently flagged as type: "urgent".
avgTimestringAverage ticket fulfillment time formatted for display (e.g. "18m").
completednumberCount 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.

Build docs developers (and LLMs) love