Glossary
Source:
g2labs-in/billuu-docs@604f87c·content/start/glossary.md· updated 2026-09-16
Billuu’s vocabulary is specific and the code is not always consistent about it. Each row below gives the term, what it means in this system, and the identifier that proves it. Where two parts of the code use one word for two things, the row says so.
Tenancy and hierarchy
| Term | Meaning | Where it lives |
|---|---|---|
| Tenant | One customer of Billuu. A tenant owns exactly one PostgreSQL schema. There is no shared tenant table. | tenant_registries.schema_name, TENANT_SCHEMA_PREFIX in src/utils/constants.js |
| Schema per tenant | All tenants share one database and one Sequelize instance. Each tenant gets its own PostgreSQL schema, and models are re-bound to it at runtime with model.schema(schemaName). There is no database per tenant. | ModelFactory.getBoundModels and bindModelsToSchema in src/architecture/modelFactory.js |
| Tenant schema name | The literal string tenant_ followed by the tenant UUID. In every creation path I read, the business id and the organization id are the same UUID, so the same schema is also readable as tenant_<businessId>. onboardBusiness sets tenantId = businessId and schemaName = 'tenant_' + businessId, and createSubFranchise sets newOrgId = newBusinessId with the same schema expression. The middleware resolves the tenant id from user.organizationId and falls back to user.businessId. | TENANT_SCHEMA_PREFIX in src/utils/constants.js, UnifiedTenantMiddleware.resolveOrganizationContext in src/core/tenant/unifiedTenantMiddleware.js, src/services/onboardingService.js, src/services/franchiseService.js |
| Control plane | Everything that lives in the public schema. The constant CONTROL_PLANE holds the string control_plane and PUBLIC_SCHEMA holds public. | src/utils/constants.js |
CONTROL_MODELS | The frozen list of model names that may only exist in public. It holds Business, User, Organization, TenantRegistry, Plan, Subscription, SuperAdminUser, OutletUser, PermissionOverride, UserMenuPermission and others. | src/utils/constants.js |
TENANT_MODELS | The frozen list of model names that may only exist in a tenant schema. Role, Permission and RolePermission are here, so RBAC is per tenant. | src/utils/constants.js |
| Panel type | Which portal a token belongs to. Two values only, ADMIN for a super admin and TENANT for everyone else. Stored on the user row as panel_type and carried in the JWT. The POS frontend also sends a literal x-panel-type: TENANT header on every request, but the server decides from the token claim. | src/control_plane_models/userModel.js, src/core/auth/authService.js, src/core/middleware/tokenVerification.js, brewlabs-billu-frontend/src/https/axiosWrapper.js |
| Business | The commercial account. It owns the subscription. A business has a type of SOLO or FRANCHISE, and parent_business_id for the franchise parent. | Business in src/control_plane_models/businessModel.js, table businesses |
| Organization | The tenant boundary and the identity that names the schema. A business can have one organization or a tree of them. type is single, franchise or chain. | Organization in src/control_plane_models/organizationModel.js, table organizations |
| Franchise | Not a separate entity. A franchise is an organization tree where a child organization points at a parent through parent_organization_id. | Organization.parentOrganizationId |
| Sub franchise | An organization with a non-null parent_organization_id. Also exposed as the virtual field isSubFranchise, which is computed and never stored. | Organization.isSubFranchise |
| Main franchise | The organization with a null parent_organization_id. Also exposed as the virtual field isRoot. The sub franchise list behind it is gated by the permissions VIEW_SUB_FRANCHISES and MANAGE_SUB_FRANCHISES. | Organization.isRoot, src/constants/permissions.js |
| Franchise depth | hierarchy_level is 0 for the root, 1 for a child and 2 for a grandchild. hierarchy_path is a dot separated path for tree traversal. | Organization.hierarchyLevel, Organization.hierarchyPath |
| Permission mode | How permissions resolve for one organization. INHERIT is the default, with ISOLATED and OVERRIDE as alternatives. The sibling column permission_cascade_enabled defaults to true. | Organization.permissionMode, Organization.permissionCascadeEnabled |
| Outlet | One physical shop. Every outlet must belong to an organization, because organization_id is allowNull: false. Outlets live inside the tenant schema, not in public. | Outlet in src/models/outletModel.js, table outlets |
| Main outlet | The outlet flagged as the primary one for its organization. | Outlet.isMain |
| Head office | A second, independent flag for the outlet that acts as head office. It is not the same column as is_main. | Outlet.isHeadOffice |
| Entity scope | The architectural rule that says whether a model’s rows belong to one outlet, to a whole business, or to the organization itself. Every model must be registered or queries throw. | ENTITY_SCOPES in src/utils/entityScopeRegistry.js |
outlet scope | Rows that exist per outlet. Product, Order, InventoryItem, Customer, Table and Payment are outlet scoped. These are the models that need an outlet filter. | entityScopeRegistry.js, isOutletScoped |
business scope | Rows shared by every outlet of a business. Supplier, Setting, Role, Permission and ProductType are business scoped. | entityScopeRegistry.js, isBusinessScoped |
organization scope | Rows that belong to the organization itself. Only Outlet, Organization and SchemaVersion are in this group. | entityScopeRegistry.js, isOrganizationScoped |
| Tenant registry | The public table that maps a tenant id to its schema name and job status. Status values include CREATING, ONBOARDING, ACTIVE, SUSPENDED and INIT_FAILED. | TenantRegistry in src/control_plane_models/tenantRegistryModel.js, table tenant_registries |
| Outlet user | The join row that assigns a user to an outlet, with a role_id and an is_primary flag. It sits in public on purpose, so staff can move between outlets without cross schema writes. | OutletUser in src/control_plane_models/outletUserModel.js, table outlet_users |
| Outlet scoping on a request | Which outlet a request acts on. Resolved from the x-outlet-id header first, then the token, then the primary assignment. The POS frontend sets that header on every tenant request. | src/core/tenant/unifiedTenantMiddleware.js, src/core/tenant/tenantMiddleware.js, brewlabs-billu-frontend/src/https/axiosWrapper.js |
| Outlet switch | The endpoint that validates a user may act as another outlet and tells the client to send the new outlet on later requests. The switch itself is a header, not a session change. | router.post('/outlets/switch', ...) in src/routes/saasRoutes.js, mounted at /api |
Roles and permissions
| Term | Meaning | Where it lives |
|---|---|---|
| Role | A named set of permissions. Roles are per tenant, because Role is in TENANT_MODELS. The platform also has a fixed list of role names used by the middleware. | ROLES in src/constants/permissions.js, Role model |
| Role hierarchy | A numeric level plus a canManage list per role. SUPER_ADMIN is 100, OWNER 90, ADMIN 80, MANAGER 70, CAPTAIN 60, CASHIER 50, WAITER 45 and KITCHEN_STAFF 40. | ROLE_HIERARCHY in src/constants/permissions.js |
normalizeRole | A helper that folds legacy spellings into the current ones. BUSINESSOWNER, BUSINESSADMIN and ADMIN all become OWNER. | normalizeRole in src/constants/permissions.js |
STAFF | A declared role with no permission list and no hierarchy level. getPermissionsForRole('STAFF') returns an empty array. Its menu permissions are computed as the intersection of its own menu permissions and the owning admin’s menu permissions, so staff can never exceed their admin. | ROLES.STAFF in src/constants/permissions.js, getStaffEffectivePermissions in src/modules/permissions/menuPermissionService.js |
SUB_OUTLET and PARTNER | Two role names that exist only inside the RBAC middleware files. They are not in src/constants/permissions.js and have no ROLE_HIERARCHY entry, so getRoleLevel returns 0 for them. | src/core/rbac/rbacMiddleware.js, src/core/middleware/unifiedRbacMiddleware.js, src/core/auth/unifiedAuthMiddleware.js |
| Permission | A named capability string such as CREATE_ORDER or VIEW_KDS. The full list is one flat object with 96 keys. | PERMISSIONS in src/constants/permissions.js |
| Permission category | The grouping used for display, for example orders, menu, inventory, staff, billing and system. | PERMISSION_CATEGORIES in src/constants/permissions.js |
| Menu permission | The second permission system. It works on a menu key plus an action, for example key orders and action create, and it drives which sidebar entries and pages a user sees. Stored as JSONB rows and fetched from /api/me/menu-permissions. Each returned menu carries both the current shape (screen, visible, actions as an object) and legacy fields (key, allowed). Inside that actions object, update is renamed to modify. | user_menu_permissions table, UserMenuPermission in src/control_plane_models/userMenuPermissionModel.js, getUserMenuPermissions in src/modules/permissions/menuPermissionService.js, src/context/PermissionContext.jsx |
| Permission override | One row that changes a single permission for a scope. scope is GLOBAL, ORGANIZATION, OUTLET or USER, and override_type is GRANT, DENY or INHERIT. | PermissionOverride in src/control_plane_models/permissionOverrideModel.js |
| Role permission map | The static table that says which permission strings a role holds by default. It has no entry for STAFF. | ROLE_PERMISSIONS in src/constants/permissions.js |
ALL_MENUS | The sidebar navigation definition, keyed by key, label, route, icon and actions. It is what the word menu means inside the permission system. | src/config/menuActionsConfig.js, mirrored by MENU_PERMISSIONS in src/constants/permissions.js |
ProtectedRoute | The frontend wrapper that hides a page when the user lacks a menu permission. It is used with menuKey and an optional action, and it redirects to / on failure. | src/components/shared/ProtectedRoute.jsx |
Orders, service and the kitchen
| Term | Meaning | Where it lives |
|---|---|---|
| Order | One customer ticket. It carries order_number, type, status, billing_subtotal, billing_tax, billing_discount, billing_total, payment_method and payment_status. | Order in src/models/orderModel.js, table orders |
| Order type | DINE_IN is the model default. TAKEAWAY and DELIVERY are the other values, and each has its own creation permission. | Order.type, CREATE_DINE_IN_ORDER, CREATE_TAKEAWAY_ORDER, CREATE_DELIVERY_ORDER |
| Order item | A line on the order. | OrderItem, table order_items |
| Order status | A string column with a validated set of values. The list is larger than the documented happy path, because it also carries the manual payment chain. | Order.status in src/models/orderModel.js, ORDER_STATUS in src/config/orderStatuses.js |
| Status flow | The map of legal status transitions. PENDING and CREATED lead to KOT_SENT, which leads to IN_PROGRESS or the kitchen pair PREPARING and READY, then SERVED, COMPLETED, CLOSED and ARCHIVED. CANCELLED and ARCHIVED are terminal. | STATUS_FLOW in src/config/orderStatuses.js |
| KOT | Kitchen Order Ticket. It is not a table. A KOT is an order whose status is KOT_SENT, and sending one is the Send KOT action in the order screen. The kitchen status path is KOT_SENT to IN_PROGRESS to READY. | ORDER_STATUS.KOT_SENT, sendKOT path in src/pages/OrderDetails.jsx, src/modules/orders/controllers/kitchenController.js |
| KDS | Kitchen Display System. The screen and the permission family behind it, VIEW_KDS, UPDATE_KDS_STATUS and MARK_ITEM_READY. The kitchen query returns orders in KOT_SENT, PREPARING or READY, oldest first. | src/pages/Kitchen.jsx, src/modules/orders/controllers/kitchenController.js, src/config/menuActionsConfig.js key kitchen |
| Table | A physical table with a tableNo, capacity, area_id and a live status. It also carries qr_code, qr_token, qr_url, qr_token_version and active_session_id. | Table in src/models/tableModel.js, table tables |
| Area | A floor section that groups tables, used for the floor plan filter. | Area in src/models/areaModel.js, table areas |
| Table session | One sitting at one table. It holds session_code, customer_count, subtotal, tax, discount, total, payment_status, order_status and last_activity_at. Several guest sessions can sit inside one table session. | TableSession in src/models/tableSessionModel.js, table table_sessions |
| Guest session | One device inside a table session. It holds device_id, session_token, cart_data, expires_at and active, and it is what a QR code actually creates. | GuestSession in src/models/guestSessionModel.js, table guest_sessions |
| Customer session token | The credential a QR guest receives. It is checked by validateCustomerSession and gates every path in the customer order router. | src/middlewares/sessionMiddleware.js, src/routes/customerOrderRoutes.js |
| QR ordering | The guest path. The client asks for a menu QR from POST /api/qr/menu/generate, opens a session, reads GET /api/customer/menu and posts POST /api/customer/orders. | src/routes/qrRoutes.js, src/routes/sessionRoutes.js, src/routes/customerOrderRoutes.js |
| Customer | A person known to the shop, with total_due, total_paid, visit_count and last_visit_at. A customer is not a user and has no login. | Customer in src/models/customerModel.js, table customers |
| Customer ledger | The append only record of money owed and paid, with entry_type, amount, balance_before and balance_after. | CustomerLedger in src/models/customerLedgerModel.js, table customer_ledger |
| Due | The running unpaid balance on a customer, surfaced in the UI as customer due. | Customer.totalDue, src/pages/admin/CustomerDue.jsx |
Catalogue
| Term | Meaning | Where it lives |
|---|---|---|
| Menu | Two different things. In the permission system the menu is the sidebar, defined by ALL_MENUS. In the restaurant sense the menu is the set of Product rows for an outlet. Outlets also carry a menu_version column that is read and written only through raw SQL. | src/config/menuActionsConfig.js, Product, Outlet comment in src/models/outletModel.js |
| Category | The grouping a product belongs to. category_id is required on every product and the field is outlet scoped. | Category, table categories, Product.categoryId |
| Product | A sellable item. It has name, price, cost, tax_rate, sku, barcode, is_active, and the behavioural fields below. Every product must belong to one outlet. | Product in src/models/productModel.js, table products |
| Product type | A business wide grouping above category, for example a department. | ProductType, table product_types, scope business |
| Product variant | A size or flavour of a product, with its own sku, barcode, price, cost and inventory_strategy. has_variants and default_variant_id on the product point into it. | ProductVariant in src/models/productVariantModel.js, table product_variants |
| Product kind | How the product is produced and sold. One of RECIPE_BASED, DIRECT_STOCK, COMBO, PREPARED, SERVICE or MANUAL_AVAILABILITY. The default is RECIPE_BASED. | Product.productKind |
| Inventory strategy | How the product consumes stock. One of TRACK_RECIPE, TRACK_STOCK, MANUAL_CONTROL or NO_TRACKING. The default is TRACK_RECIPE. | Product.inventoryStrategy |
| Lifecycle state | The setup state of a product, from DRAFT through CONFIG_REQUIRED and READY to ACTIVE. The default is CONFIG_REQUIRED, so a new product is not sellable until it is finished. | Product.lifecycleState |
| Modifier | A paid or free add on attached to a product, such as an extra shot. In this codebase the modifier itself is an option row with a price, and the stock it consumes is a separate recipe row. | ModifierOption in src/models/modifierOptionModel.js, table modifier_options |
| Modifier recipe | The inventory cost of a modifier. It links one modifier option to one inventory item with a required quantity. | ModifierRecipe in src/models/modifierRecipeModel.js, table modifier_recipes |
| Recipe | The bill of materials for one product or product variant. A recipe has a version, a prep_time, and optionally an instructions blob. Uniqueness is enforced per outlet, product and variant. | Recipe in src/models/recipeModel.js, table recipes |
| Recipe item | One ingredient line of a recipe, linking one inventory item with quantity_required, unit and an is_optional flag. | RecipeItem in src/models/recipeItemModel.js, table recipe_items |
| Order item recipe snapshot | A frozen copy of the recipe cost and version at the moment an item was sold, so later recipe edits do not rewrite history. | OrderItemRecipeSnapshot in src/models/orderItemRecipeSnapshotModel.js, table order_item_recipe_snapshots |
| Availability projection | A cached answer to whether a product can be made right now. It stores can_make, availability_status, blocking_ingredients, estimated_depletion_at and calculated_at. | ProductAvailabilityProjection in src/models/productAvailabilityProjectionModel.js, table product_availability_projections |
Inventory and production
| Term | Meaning | Where it lives |
|---|---|---|
| Inventory item | A raw material, not a sellable product. It holds current_stock, minimum_stock, cost_per_unit, unit and an optional supplier. | InventoryItem in src/models/inventoryItemModel.js, table inventory_items |
| Inventory | The per product stock row. This is a different table from inventory items, and it is keyed by product_id, not by ingredient. | Inventory in src/models/inventoryModel.js, table inventory |
| Inventory transaction | A movement against the per product stock row, keyed by inventory_id and optionally by batch_id. | InventoryTransaction in src/models/inventoryTransactionModel.js, table inventory_transactions |
| Stock transaction | A separate, raw material movement record keyed by inventory_item_id. The two transaction tables coexist, so always check which one a screen writes. | StockTransaction in src/models/stockTransactionModel.js |
| Inventory batch | A delivery lot with an expiry date, used for first expiry first out consumption. The purchase_date and invoice_number columns were added for it. | InventoryBatch, table inventory_batches, src/migrations/tenant/033_fefo_batch_columns.js |
| FEFO | First Expiry First Out. The rule that stock is consumed from the batch that expires soonest. The batch status set includes LOW_EXPIRY. | src/migrations/tenant/033_fefo_batch_columns.js |
| Inventory reservation | A hold placed against stock for a cart or an order, with an expires_at. It is what stops two carts from selling the same last portion. | InventoryReservation in src/models/inventoryReservationModel.js, table inventory_reservations |
| Inventory action approval | A queued stock change that needs a second person to approve it. It records action_type, direction, quantity, requires_approval, anomaly_detected and the approve or reject trail. | InventoryActionApproval in src/models/inventoryActionApprovalModel.js, table inventory_action_approvals |
| Stock transfer | A movement of stock between two outlets, with an in transit state and separate requested_by and received_by stamps. | StockTransfer in src/models/stockTransferModel.js, table stock_transfers |
| Wastage | Stock thrown away or spilled, with quantity, reason, cost_value and recorded_by. It can point at either an inventory row or an inventory item. | Wastage in src/models/wastageModel.js, table wastages |
| Purchase order | A supplier order with a po_number, totals, an expected delivery date, and an approve or cancel trail. | PurchaseOrder in src/models/purchaseOrderModel.js, table purchase_orders |
| Goods receipt | The note that records what actually arrived against a purchase order, with grn_number, received_items, failed_items, a qc_status and a posted_to_inventory flag. | GoodsReceipt in src/models/goodsReceiptModel.js, table goods_receipts |
| Production batch | A kitchen production run that consumes a recipe and yields an output product, tracking planned against actual quantity and yield_percentage. | ProductionBatch in src/models/productionBatchModel.js, table production_batches |
| Stock alert | A low stock or expiry alert row raised against stock. | StockAlert, table stock_alerts |
Money, billing and platform plans
| Term | Meaning | Where it lives |
|---|---|---|
| Payment | One money movement. It carries amount, currency, status, method, gateway and a verification_status. gateway defaults to RAZORPAY. | Payment in src/models/paymentModel.js, table payments |
| Payment verification | The manual UPI path. A guest uploads a screenshot and a utr_number, and a staff user reviews it. verification_status defaults to PENDING, and verified_by, verified_at and rejection_reason record the outcome. | Payment fields, src/pages/admin/PaymentVerificationQueue.jsx, src/migrations/tenant/030_manual_payment_verification.js |
| Settle | To close a bill. It sets the order to CLOSED and records a payment method. It is not a status value. | settleOrder in brewlabs-billu-frontend/src/pages/OrderDetails.jsx, permission SETTLE_ORDER |
| Billing config | The printable identity of the shop, holding business_name, address, GST number, tax_rate, service_charge_rate, paper_size, theme_color, footer_text and upi_id. | BillingConfig in src/models/billingConfigModel.js, table billing_configs, scope business |
| Account | A money account in the accounting module, with opening_balance, current_balance, account_number and bank_name. | Account in src/models/accountModel.js, table accounts |
| Account transaction | A single posting against an account. | AccountTransaction, table account_transactions |
| Income and expense | The accounting entries used by the income and expense screens, with expense rows typed by ExpenseType. | Income, Expense, ExpenseType, src/pages/admin/IncomeExpense.jsx |
| Plan | A platform subscription tier in the control plane. It holds slug, price, billing_cycle, features and limits as JSONB, plus trial_days. | Plan in src/control_plane_models/planModel.js, table plans |
| Subscription | The link between a business and a plan, with billing_cycle, current_period_start and current_period_end. A subscription is resolved on every tenant request and cached. | Subscription in src/control_plane_models/subscriptionModel.js, UnifiedTenantMiddleware.getSubscriptionDetails |
| Membership plan | A second, tenant scoped plan shaped table with duration_days, outlets_limit, staff_limit, max_products, max_invoices and api_rate_limit. It is easy to confuse with Plan, which is the control plane subscription tier. | MembershipPlan in src/models/membershipPlanModel.js, table membership_plans |
| Feature flag | A per business switch with is_enabled, rollout_percentage, target_users and target_plan. | FeatureFlag in src/models/featureFlagModel.js, table feature_flags, scope business |
| Operation timing | The opening hours of a business, with open_time, close_time, is_open and special_hours. | OperationTiming in src/models/operationTimingModel.js, table operation_timings, scope business |
Names that are used inconsistently
- Menu means the sidebar in the permission system and the food catalogue in the restaurant sense.
ALL_MENUSis the sidebar.ProductandCategoryare the food menu. - Roles are declared five times, once in
src/constants/permissions.jsand once in each of four middleware files. The constants file lists nine.src/core/rbac/rbacMiddleware.js,src/core/middleware/unifiedRbacMiddleware.js,src/middlewares/unifiedRbacMiddleware.jsandsrc/core/auth/unifiedAuthMiddleware.jseach list eleven, addingSUB_OUTLETandPARTNER. ADMINandOWNERare one role for permission lookups and two rows inROLE_HIERARCHY.normalizeRolesendsADMINtoOWNER, so theADMINrow at level 80 is not reached throughgetRoleLevelorcanManageRole./api/inventoryand/api/reportsare mounted with the same router file as/api/tenant. The prefix does not imply a different module.Staffis mapped toCASHIERbyLEGACY_ROLE_MAPin the frontend, while the backend keepsSTAFFas its own role name with the intersection rule described above.- The frontend
ALL_MENUShas thefranchiseentry commented out, yetsrc/App.jsxstill guards/admin/franchise-managementwithProtectedRoute menuKey="franchise"and the backendMENU_PERMISSIONSstill defines afranchisekey. src/components/sidebar/PermissionSidebar.jsxis dead code that reads like the canonical sidebar. It destructurespermissionsandisLoadingfromusePermission(), butPermissionContextexposespermissionMap,effectivePermissions,loadingandrefreshPermissions. Nothing imports it. The live sidebar issrc/components/shared/Sidebar.jsx, whichsrc/App.jsxrenders directly.src/modules/permissions/README.mdpoints atcomponents/auth/ProtectedRoute.jsxandcomponents/sidebar/PermissionSidebar.jsx. The real guard lives atsrc/components/shared/ProtectedRoute.jsx. Thecomponents/auth/directory holds the login and outlet selection screens instead.src/modules/permissions/README.mddocuments the menu permission response with anactionsarray plusavailableActions. The service now returnsactionsas an object withupdaterenamed tomodify, alongside the legacykeyandallowedfields. The frontend reads the new shape, andcan()insrc/context/PermissionContext.jsxmapsupdatetomodifyas well.- The order status default is declared twice and the two disagree.
src/models/orderModel.jssetsdefaultValue: 'PENDING', whilesrc/migrations/tenant/005_order_tables.jscreates the column with"status" VARCHAR(50) DEFAULT 'KOT_SENT'. - Two middleware trees exist for the same job. The tenant routes import
src/core/rbac/rbacMiddleware.jsandsrc/core/auth/unifiedAuthMiddleware.js.src/middlewares/unifiedRbacMiddleware.jsandsrc/core/middleware/unifiedRbacMiddleware.jsare near duplicates of the first.
Infrastructure vocabulary is out of scope for this page. Deployment, observability and host terms are pinned in the Language section of /home/codejack/code/linode/CONTEXT.md.
Sources
/home/codejack/code/linode/CONTEXT.mdbrewlabs-billu-backend/app.jsbrewlabs-billu-backend/src/architecture/databaseMiddlewareChain.jsbrewlabs-billu-backend/src/architecture/modelFactory.jsbrewlabs-billu-backend/src/config/orderStatuses.jsbrewlabs-billu-backend/src/constants/permissions.jsbrewlabs-billu-backend/src/control_plane_models/businessModel.jsbrewlabs-billu-backend/src/control_plane_models/organizationModel.jsbrewlabs-billu-backend/src/control_plane_models/outletUserModel.jsbrewlabs-billu-backend/src/control_plane_models/permissionOverrideModel.jsbrewlabs-billu-backend/src/control_plane_models/planModel.jsbrewlabs-billu-backend/src/control_plane_models/subscriptionModel.jsbrewlabs-billu-backend/src/control_plane_models/tenantRegistryModel.jsbrewlabs-billu-backend/src/control_plane_models/userModel.jsbrewlabs-billu-backend/src/core/auth/authService.jsbrewlabs-billu-backend/src/core/auth/unifiedAuthMiddleware.jsbrewlabs-billu-backend/src/core/middleware/tokenVerification.jsbrewlabs-billu-backend/src/core/middleware/unifiedRbacMiddleware.jsbrewlabs-billu-backend/src/core/rbac/rbacMiddleware.jsbrewlabs-billu-backend/src/core/tenant/unifiedTenantMiddleware.jsbrewlabs-billu-backend/src/core/tenant/tenantMiddleware.jsbrewlabs-billu-backend/src/middlewares/unifiedRbacMiddleware.jsbrewlabs-billu-backend/src/migrations/tenant/005_order_tables.jsbrewlabs-billu-backend/src/migrations/tenant/030_manual_payment_verification.jsbrewlabs-billu-backend/src/migrations/tenant/033_fefo_batch_columns.jsbrewlabs-billu-backend/src/models/accountModel.jsbrewlabs-billu-backend/src/models/areaModel.jsbrewlabs-billu-backend/src/models/billingConfigModel.jsbrewlabs-billu-backend/src/models/customerLedgerModel.jsbrewlabs-billu-backend/src/models/customerModel.jsbrewlabs-billu-backend/src/models/featureFlagModel.jsbrewlabs-billu-backend/src/models/goodsReceiptModel.jsbrewlabs-billu-backend/src/models/guestSessionModel.jsbrewlabs-billu-backend/src/models/inventoryActionApprovalModel.jsbrewlabs-billu-backend/src/models/inventoryBatchModel.jsbrewlabs-billu-backend/src/models/inventoryItemModel.jsbrewlabs-billu-backend/src/models/inventoryModel.jsbrewlabs-billu-backend/src/models/inventoryReservationModel.jsbrewlabs-billu-backend/src/models/inventoryTransactionModel.jsbrewlabs-billu-backend/src/models/membershipPlanModel.jsbrewlabs-billu-backend/src/models/modifierOptionModel.jsbrewlabs-billu-backend/src/models/modifierRecipeModel.jsbrewlabs-billu-backend/src/models/operationTimingModel.jsbrewlabs-billu-backend/src/models/orderItemRecipeSnapshotModel.jsbrewlabs-billu-backend/src/models/orderModel.jsbrewlabs-billu-backend/src/models/outletModel.jsbrewlabs-billu-backend/src/models/paymentModel.jsbrewlabs-billu-backend/src/models/productAvailabilityProjectionModel.jsbrewlabs-billu-backend/src/models/productModel.jsbrewlabs-billu-backend/src/models/productVariantModel.jsbrewlabs-billu-backend/src/models/productionBatchModel.jsbrewlabs-billu-backend/src/models/purchaseOrderModel.jsbrewlabs-billu-backend/src/models/recipeItemModel.jsbrewlabs-billu-backend/src/models/recipeModel.jsbrewlabs-billu-backend/src/models/stockTransactionModel.jsbrewlabs-billu-backend/src/models/stockTransferModel.jsbrewlabs-billu-backend/src/models/tableModel.jsbrewlabs-billu-backend/src/models/tableSessionModel.jsbrewlabs-billu-backend/src/models/wastageModel.jsbrewlabs-billu-backend/src/modules/orders/controllers/kitchenController.jsbrewlabs-billu-backend/src/modules/permissions/README.mdbrewlabs-billu-backend/src/modules/permissions/menuPermissionService.jsbrewlabs-billu-backend/src/routes/customerOrderRoutes.jsbrewlabs-billu-backend/src/routes/saasRoutes.jsbrewlabs-billu-backend/src/routes/tenantRoutes.jsbrewlabs-billu-backend/src/services/franchiseService.jsbrewlabs-billu-backend/src/services/onboardingService.jsbrewlabs-billu-backend/src/utils/constants.jsbrewlabs-billu-backend/src/utils/entityScopeRegistry.jsbrewlabs-billu-frontend/src/App.jsxbrewlabs-billu-frontend/src/components/shared/ProtectedRoute.jsxbrewlabs-billu-frontend/src/components/shared/Sidebar.jsxbrewlabs-billu-frontend/src/components/sidebar/PermissionSidebar.jsxbrewlabs-billu-frontend/src/config/menuActionsConfig.jsbrewlabs-billu-frontend/src/constants/permissions.jsbrewlabs-billu-frontend/src/https/axiosWrapper.jsbrewlabs-billu-frontend/src/pages/OrderDetails.jsx