Build the React shop
build_react_shopFor React sites (set_app_mode react) with a linked Komers store: write the storefront as React components (MUI) in src/shop/ with the layout the owner chose on phones and desktop: product list, product details (full page, popup, bottom sheet or side panel), cart (drawer, bottom sheet or full screen), categories and menu bar. Checkout goes through Komers like build_shop: options and add-ons, opening hours and order-ahead pickup slots, delivery methods, branches. Product pages /p// keep their server-rendered share tags and Product data. Ask the owner first with shop_layout_options. Re-running replaces src/shop/ (edit layout.json or the components afterwards if you like).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"site": "<site>"
},
"name": "build_react_shop"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ui | No | Which kit the shop is built with. Default: the component style in the brief (ui_kit), else shadcn when the site uses Tailwind/shadcn (add_shadcn), else mui. The shadcn shop follows the theme in src/tailwind.css and ships no MUI. | |
| page | No | "shop" = the shop at /shop (the home page stays the app), "index" = the home page is the shop | shop |
| site | Yes | Site slug (e.g. "kopitiam-muar") or id | |
| intro | No | ||
| mobile | No | Choices for phones, e.g. { "detail": "sheet", "nav": "bottom" } | |
| preset | No | Ready-made style; desktop/mobile choices override its parts | |
| desktop | No | Choices for wide screens, e.g. { "detail": "modal", "cart": "drawer" } | |
| heading | No | Shop | |
| layout_decided_by | No | "owner" when the owner picked the layout (the normal case); "ai" only when the owner explicitly asked you to decide | owner |