Skip to content
Knowns UI
Get ProSign in

Commerce App

A whole shop back office on the App Shell: eight live screens on one made-up shop that sells 3D-printed lamps. Overview, orders, an order page where an agent proposes a refund you approve, products, a product editor with AI copy and facts, shipping with a rebooking plan, and customers. Every write and every AI call is a function you replace.

This page holds the props and the code. See the template, its screens and a live preview.

On this page
Used for
  • Shop back office
  • Order and refund handling
  • Product catalogue editing
  • Shipping desk
  • Customer history for support

Examples

Installation

Installation is part of Pro

Pro components install from a licensed registry. The live preview stays open to everyone.

Overview
#/overview
What you can doWhat needs you (a refund, a parcel to rebook, copy to review, low stock), then revenue, orders, average order and returns for 7, 30 or 90 days, revenue by channel, the store funnel and the best sellers.
App Shell, Page Header, Agent Inbox, Stat Strip, Area Trend Card, Funnel Chart, Data Table, Segmented Control
Orders
#/orders
What you can doStatus tabs with counts over a table with filters, search and selection; bulk Mark packed, Print slips and Archive with Undo; the agent drafts a status update for each order that has waited longest, sent only once you approve it.
Page Header, Data Table, Approval Prompt, Avatar, Badge, Toast
Order detail
#/orders/SL-20482
What you can doProgress from paid to delivered, the items with photos, the history, an agent refund proposal with its reasons and sources waiting on Approve, the customer card and a reply drafted from the facts it used.
Page Header, Stepper, Order Summary, Record Timeline, Approval Prompt, Grounded Answer, Record Header, AI Email Draft
Products
#/products
What you can doCollection tabs, filter chips, a table or grid with stock, price and 30-day sales; bulk status changes with Undo; the agent writes descriptions for drafts and you keep or skip each on a swipe deck.
Page Header, Filter Chips, Data Table, Segmented Control, Swipe Deck, Card, Sparkline
Product detail
#/products/ripple
What you can doEdit the title, description, photos, price, status and tags; the writer rewrites the copy as a diff you accept, the agent proposes missing facts with a source and a confidence each; variants with stock; how the page looks in search.
Page Header, Save State, Writing Assistant, Enrichment Panel, Uploader, Pill Picker, Data Table, SEO Panel
Shipping
#/shipping
What you can doWhat leaves today and what went wrong: parcels on a map from the print farm, shipments grouped with their label state, labels bought in bulk, tracking in a side sheet, and a rebooking plan for a returned parcel that waits on approval.
Page Header, Dotted Map, Grouped List, Sheet, Stepper, Agent Plan, Approval Prompt
Customers
#/customers
What you can doSegments with counts, the headline numbers, filters and a table of buyers with their orders and spend; ask a question and the agent sets the filters for you to edit.
Page Header, Stat Strip, Filter Chips, Data Table, Avatar, Tag
Customer detail
#/customers/marta
What you can doThe record header, the history of orders, refunds and emails, the orders table, how likely they are to buy again and why, and a back-in-stock note drafted for approval.
Record Header, Record Timeline, Lead Score, Data Table, AI Email Draft

Props

defaultRoute / route
{ screen, id? }
Default{ screen: "overview" }
The screen to open on, or the screen shown (controlled). A route in the address hash wins on load when history is hash.
onRouteChange
(route) => void
A link was followed: a sidebar row, a crumb, a table row, a search result or a citation. Turn it into your router call.
history
"hash" | "none"
Default"hash"
hash keeps the route in location.hash so Back and Forward work. none keeps it in state, for a preview on a page.
orders / products
Order[] / Product[]
Defaulta made-up lamp shop
The data every screen derives from. Variants (colour x size x fitting) and stock are worked out from each product.
images
Record<string, string>
Product photos by image key. Without them a thumbnail shows the first colourway as a swatch. The demo photos are files of this site (DEMO_IMAGES), not part of the template.
handlers.onRefund
(order, amount, reason) => void | Promise
A refund was approved. Throw to show that it failed.
handlers.onSendEmail
({ to, subject, body, order? }) => void | Promise
Defaulta stand-in
A reply, a status update or a back-in-stock note was approved and sent.
handlers.onBuyLabels
(orders) => Promise<Record<string, string>>
Defaulta stand-in
Buys labels and returns the tracking numbers by order no.
handlers.onSaveProduct
(product) => void | Promise
A product was saved.
handlers.onDraftCopy
(product, signal) => Promise<string>
Defaulta stand-in
The agent writes a product description. Pass the signal to your request.
handlers.onAsk
(question, screen, signal) => Promise<{ sentences, sources }>
Defaultscripted answers
Answers Ask with citations. A source whose url is a #/ route opens that screen.
layout
"page" | "fill"
Default"page"
page: the window scrolls and the sidebar and topbar stick. fill: fills its parent and the main column scrolls.
embedded / labelPrefix
boolean / string
Defaultfalse / -
For a preview inside another page: no second main landmark, and unique landmark names.

What it handles

  1. 01Lays out a whole shop admin on the App Shell: Overview, Orders, Products, Shipping and Customers in the sidebar with counts that follow the data, plus a page for an order, a product and a customer.
  2. 02Keeps one dataset for every screen, so an order on the overview is the same row in Orders, in Shipping and in the history of its customer, and a refund changes all of them at once.
  3. 03Lets agents propose and wait: a refund with its reasons and sources, status updates for late orders, and a rebooking plan for a parcel that came back.
  4. 04Drafts product descriptions to keep or skip on a swipe deck, rewrites copy as a diff you accept, and proposes missing product facts, each with a source and a confidence.
  5. 05Keeps the route in the address hash, so links, Back and Forward work without a router, and opens on any screen from ?screen= and ?record= in a frame.
  6. 06Leaves every write and every AI call to a handler you pass (refund, send, buy labels, save, draft, ask); without one a scripted stand-in runs, so it works as installed.

States

First render
Nothing moves; the screen paints as it is
none
Open a record
The record replaces the list at once
none
Agent drafts
A thinking line, then the drafts or the answer appear
120ms, ease out
Approve
The approval folds to one line and the order, badges and history update
180ms, ease out
Reduced motion
Everything changes at once
0ms

Works with

When to use

When to use

  • The back office of a shop: orders, products, shipping and customers on one dataset, with agents that propose refunds, copy and rebookings and wait for approval.
  • A starting point for a store admin where every write and every AI call is your own endpoint.

When not to use

  • Just the pay step of a checkout: use Checkout.
  • A sales CRM with deals: use CRM.

Using with AI

Use Copy page for AI above to give your assistant this page, Copy prompt under the install command to have it installed and wired to your data, or connect the Knowns UI MCP server and just ask:

  • Add the Knowns UI Commerce App to my app and wire it to my own data.
  • I need the back office of a shop: orders, products, shipping and customers on one dataset, with agents that propose refunds, copy and rebookings and wait for approval. Set that up with the Knowns UI Commerce App.
  • Which Commerce App props do I need for a minimal setup? Show me a short example.

With the server connected, your assistant calls get_component({ name: "template-commerce-app" }) and search_docs({ query: "commerce app" }). Pro props, full examples and source come back once your license key is in the MCP config.

Need help?

Stuck on Commerce App, or found something off? We read every message.