Skip to main content

Overview

RestAI is built as a multi-tenant platform, allowing you to manage multiple restaurant organizations and branches from a single system. Each organization operates with complete data isolation, while branches within an organization can share menus, loyalty programs, and customer data.

Organization Management

Creating an Organization

Organizations represent the top-level entity in RestAI - typically a restaurant brand or company.
1

Access Organization Settings

Super admins can access the organization management section from the admin panel.
2

Create New Organization

Click “New Organization” and provide:
  • Organization Name: Your restaurant brand name
  • Logo URL: Brand logo for customer-facing pages
  • Settings: Custom configuration (currency, timezone defaults, etc.)
3

Configure Organization

Each organization maintains isolated:
  • User accounts and roles
  • Branch locations
  • Menu items and categories
  • Customer database
  • Loyalty programs
  • Inventory and reports
Only super_admin users can create and manage multiple organizations. Organization admins (org_admin) can only view and update their own organization.

Organization Settings

Update organization details at any time:
  • Name: Update your brand name
  • Logo: Change the organization logo displayed on QR ordering pages
  • Custom Settings: JSON-based configuration for organization-wide preferences

Branch Management

Branches represent physical restaurant locations within an organization.

Creating a Branch

1

Navigate to Branches

From your dashboard, go to Settings > Branches or the branch management section.
2

Add New Branch

Click “Add Branch” and configure:Basic Information
  • Name: Branch location name (e.g., “Downtown Lima”)
  • Slug: URL-friendly identifier (e.g., downtown-lima)
  • Address: Full street address
  • Phone: Contact number
Regional Settings
  • Timezone: Branch timezone (e.g., America/Lima)
  • Currency: Currency code (e.g., PEN)
  • Tax Rate: Percentage tax rate as decimal (e.g., 0.18 for 18%)
3

Generate QR Codes

After creating the branch, generate QR codes for each table. Customers scan these to access the digital menu.
The branch slug must be unique within your organization. It’s used in customer-facing URLs like /{branchSlug}/{tableCode}

Branch Switching

Staff users can switch between branches they have access to:
  1. Click the branch selector in the top navigation
  2. Select the branch you want to manage
  3. All data (orders, inventory, reports) updates to reflect the selected branch
Use branch switching to manage multiple locations from a single dashboard without logging out.

Role-Based Access Control (RBAC)

RestAI implements role-based permissions to control what users can do:

Available Roles

super_admin

Full system access. Can create organizations, view all data across all organizations.

org_admin

Organization administrator. Manages all branches, staff, and settings within their organization.

branch_manager

Manages a specific branch. Can access orders, inventory, reports, and settings for their branch.

staff

Restaurant staff. Can take orders (POS), manage tables, and view kitchen display.

kitchen_staff

Kitchen personnel. Access to kitchen display system (KDS) to manage order preparation.

customer

End customers. Can scan QR codes, browse menus, place orders from their table.

Permission System

Permissions are granular and checked at the API level: Organization Permissions
  • org:read - View organization details
  • org:update - Update organization settings
Branch Permissions
  • branch:read - View branches
  • branch:create - Create new branches
  • branch:update - Update branch settings
Order Permissions
  • orders:read - View orders
  • orders:create - Create new orders (POS/Customer)
  • orders:update - Update order status
  • orders:update_item_status - Update individual item status (Kitchen)
Inventory Permissions
  • inventory:read - View inventory items
  • inventory:create - Add items and record movements
  • inventory:update - Update item details
Customer & Loyalty Permissions
  • customers:read - View customer profiles
  • customers:create - Register new customers
  • customers:delete - Remove customers
  • loyalty:read - View loyalty programs
  • loyalty:create - Manage loyalty programs and rewards
Payment & Report Permissions
  • payments:read - View payments
  • payments:create - Process payments
  • reports:read - Access analytics and reports
Permissions are automatically assigned based on role. Custom permission sets can be configured per user if needed.

Data Isolation

Organization Level

Each organization’s data is completely isolated:
  • Organizations cannot see each other’s data
  • Customer databases are separate per organization
  • Menus, inventory, and reports are organization-scoped

Branch Level

Within an organization, branches share certain data:
  • Shared: Customers, loyalty programs, organization settings
  • Isolated: Orders, inventory, tables, payments, staff assignments
This design allows a customer registered at Branch A to use their loyalty points at Branch B within the same organization.

Tenant Context

The system uses middleware to automatically inject tenant context:
  • API requests include organization ID and branch ID
  • All queries are automatically scoped to the current tenant
  • Users can only access data within their organization/branch scope
How it works for staff users:
  1. User logs in and receives a JWT token
  2. Token includes their organization ID, branch ID, and role
  3. Every API request uses this context to filter data
  4. Database queries automatically include tenant filters
For customer users:
  1. Customer scans QR code with branch slug and table code
  2. Session is created with branch context
  3. Customer can only order from that specific branch
  4. Order is associated with the correct organization and branch

Build docs developers (and LLMs) love