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.Access Organization Settings
Super admins can access the organization management section from the admin panel.
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.)
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
Navigate to Branches
From your dashboard, go to Settings > Branches or the branch management section.
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
- Timezone: Branch timezone (e.g.,
America/Lima) - Currency: Currency code (e.g.,
PEN) - Tax Rate: Percentage tax rate as decimal (e.g.,
0.18for 18%)
Branch Switching
Staff users can switch between branches they have access to:- Click the branch selector in the top navigation
- Select the branch you want to manage
- All data (orders, inventory, reports) updates to reflect the selected branch
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 Permissionsorg:read- View organization detailsorg:update- Update organization settings
branch:read- View branchesbranch:create- Create new branchesbranch:update- Update branch settings
orders:read- View ordersorders:create- Create new orders (POS/Customer)orders:update- Update order statusorders:update_item_status- Update individual item status (Kitchen)
inventory:read- View inventory itemsinventory:create- Add items and record movementsinventory:update- Update item details
customers:read- View customer profilescustomers:create- Register new customerscustomers:delete- Remove customersloyalty:read- View loyalty programsloyalty:create- Manage loyalty programs and rewards
payments:read- View paymentspayments:create- Process paymentsreports: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
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
- User logs in and receives a JWT token
- Token includes their organization ID, branch ID, and role
- Every API request uses this context to filter data
- Database queries automatically include tenant filters
- Customer scans QR code with branch slug and table code
- Session is created with branch context
- Customer can only order from that specific branch
- Order is associated with the correct organization and branch