Applications

OneKitchen

The restaurant application: shop-scoped data, its capability declarations and its limit table.

OneKitchen is the restaurant product — orders, kitchen display, menu, products, customers and staff, all scoped to a shop inside a business.

Shape of the data

A business is an App Center account (accountUuid) plus local membership. Everything operational — menu, orders, kitchen tickets, settings — hangs off a shop, which is OneKitchen's own concept and has no App Center equivalent.

What it declares

assigned-apps
AnswersWhich businesses this App Center user holds a membership in, and the parameters OneKitchen wants on a launch URL
membership-leave
AnswersA person giving up one of those memberships: the member row is deleted, while the orders they took stay attributed to them

What it receives

  • POST /api/v1/appcenter/webhooks, carrying X-AppCenter-Signature: v2=<jwt> — verified against the App Center JWKS, with no shared secret
  • user.updated — syncs the local user record
  • business.updated — upserts the business by accountUuid
  • subscription.*, app.* and ping — acknowledged and logged only

Tenancy

The request identity comes from the token's sub. The accountid and userid headers only select the account being acted on: equal values mean the owner, different values mean staff, and staff must share a business with that owner. Membership is checked before anything else, and privileges are checked after it.

Plan limits live in the application

onekitchen-backend/src/services/appcenter/subscription-limits.ts maps App Center's plan identity to OneKitchen's own numbers. App Center returns planCode, accessTier and dates — never a limit.

A worked session

  1. 1

    Validate the session

    GET /api/v1/auth/validate-session returns the person's businesses, each with its shops, auto-provisioning the business for an account owner on first contact.

  2. 2

    Act inside a shop

    Every operational route is /api/v1/shops/:shopId/…, authorised against the shop's business.

  3. 3

    Realtime without leaking the token

    A short-lived ticket minted by POST /api/v1/shops/:shopId/kitchen/ticket authenticates the WebSocket, because a browser cannot set headers on one and the BFF never hands the page the access token.

Something here out of date or unclear?

The platform team answers integration questions directly.

support@versified.com.gh
32 pages in this documentation