What runs on the phone, what runs on the servers, and how a Mini App, the Shoppingate app and the backends work together.
The Mini App architecture: what runs on the phone, and what runs on the servers.
On the phone
Everything on the phone runs inside the Shoppingate app, in layers:
Your Mini App
Your code, in one of two forms:
Native Mini App — pages and logic. You write the pages; the Shoppingate app draws them as real app screens. Your JavaScript holds the logic. See Native mini-app.
Web view Mini App — a small shell page that holds a <web-view>. Your web app opens inside it and loads the SDK to reach the app. See Web view mini-app.
Permissions and approval
Between your Mini App and anything sensitive, there is a gate. Some functions are Public — open to every Mini App. Others are Private, like payment: your Mini App must request them in the Dev portal, and Shoppingate approves them for your Mini App only. Features that touch the user or the phone also need the user's permission, asked when the user needs the feature. See Permissions.
The app's functions and the phone
Behind the gate: the app's own functions — the signed-in user, orders and payment, refunds, support tickets — and the phone's features — camera, location, photos and more. See Host functions.
The runtime
The base layer. It runs each Mini App in its own space, separate from the app and from other Mini Apps, and loads the version you published. A native Mini App is downloaded on the first open and kept on the phone, so it opens fast every time after.
On the servers
Your backend — your products, prices, stock and orders. Your Mini App calls it directly, on domains approved in the Dev portal. See Allowed URL.
Shoppingate backend — users, orders and payments. Your backend calls its API with your API key, and it sends your backend webhooks when an order changes. See Backend integration.
Dev portal — where your Mini App is created, its versions reviewed and published.
Merchant portal — orders, API keys, webhooks and deep links.
SG Studio — where you write, test and upload your Mini App.
One order, from start to end
Saloni's story
Here is everything above working together, when a user books a massage at Saloni:
1OpenThe user searches for Saloni in the Shoppingate app and opens it. The runtime loads Saloni's published version.
2Who is it?Saloni's Mini App reads the signed-in user, with the user's permission. It sends the user's token to Saloni's backend, which confirms it with Shoppingate's backend. See Verify user.
3BrowseThe Mini App loads services, prices and free times from Saloni's own backend, on its approved domain.
4PayThe Mini App calls the app's orderPayment function. Shoppingate creates the order and shows its own payment screen. The result comes back to the Mini App.
5UpdatesWhen the order changes, Shoppingate's backend tells Saloni's backend with a webhook. Saloni's backend moves the order on with the API.
6Come backThe user taps the order in the Shoppingate app, and a deep link opens Saloni's Mini App on that order's page.
Where security sits
Review — every version is reviewed before it goes live.
Approved domains — your Mini App loads and calls only domains approved for it.
Approved functions — Private functions only for Mini Apps approved for them.
User permission — each feature asked for only when the user needs it.
Privacy policy — shown to users inside the app, the same way for every Mini App.
Separate spaces — each Mini App runs apart from the app and from the others.
Server to server — your backend confirms the user and handles orders with your API key, never from the phone.