Skip to content

Demo Apps ​

Two apps over one OData v4 service, the wholesale desk of a coffee roaster. They have the same screens: Overview, Coffees, Orders with a page per order, and Cafés. Each repo is one approach, end to end, and runs on its own.

AppThe page talks toLinks
Browser clientthe OData service, with the browser clientLive app · Source · Walkthrough
Moost serverits own Moost server, in REST; the server talks ODataLive app · Source · Walkthrough

In both repos, src/generated/ holds what the tools write from the service's $metadata (never edit it), and src/model/ your annotate blocks. The browser app's client factory is src/odata.ts; the Moost app has its server in src/server/ and its page in src/ui/.

Which one to read ​

Read the browser app when the page can reach the service and its users already have a session with it: there is no server of your own. Read the Moost app when you want a server in front: one technical user toward the service, your own rules, hooks and columns, and no OData code in the page. Which host to choose compares the two.

What the apps show ​

The paths are the same in both apps; the links open the browser app. Coffee 17 and order 1091 are there after every reset.

FeatureWhereGuide
Grouped readsOverview: the pipeline, revenue and stock chartsAggregation
Filters, search and the URLOrders: the filter bar; the URL keeps the filtersAtscript UI: filtering
Code listsOrders: the Status filter, a checklist of codes with their textsFixed values
A picker narrowed by the formCoffee 17: Region lists only the regions of its OriginNarrowing
A pick fills other fieldsOrder 1091: pick a Café, and the Ship-to city followsFilling other fields
Version tokensCoffee 17 in two tabs: save bothVersion tokens
The service's messages on fieldsCoffee 17: a price below costMessages by field
A 1:n relationOrder 1091: its itemsRelations
Operations on rowsCoffees: Retire, Stock value, Reprice all; Orders: Confirm, Ship, Cancel orderActions in Atscript UI
Several rows at onceOrders: select some confirmed orders, then ShipSeveral rows
Cells of your ownCoffees: the bag and the roast dots; Orders: the status pillAtscript UI: custom cells
Scrolling, columns, CSVAny list: scroll the whole set, Columns, Export CSVAtscript UI: pagination
Typed callsOverview: its reads and the Bestsellers call, checked against the generated types and handlesType Safety

The service ​

The Roastery service is OData v4 at https://demo.odata.atscript.dev/odata/v4/roastery, with a public $metadata. Every visitor shares its data, which resets every 30 minutes. It is the open-source mock server @sap-ux/fe-mockserver-core (Apache-2.0) behind a guard that admits the requests the apps send. Its repo, atscript-odata-demo-service, runs it on your machine, and either app can point at it.

Run them locally ​

Each app runs with pnpm install and pnpm dev (Node 22.12 or newer, pnpm 10), against the public service. Each walkthrough's Run it has the details: browser, Moost.

To run the service too:

bash
git clone https://github.com/moostjs/atscript-odata-demo-service
cd atscript-odata-demo-service
pnpm install
pnpm start   # http://localhost:4010/

Then start either app with ODATA_URL=http://localhost:4010/odata/v4/roastery pnpm dev.

SAP, SAP S/4HANA, SAP Fiori, SAPUI5, SAP BTP and other SAP products and services mentioned herein, as well as their respective logos, are trademarks or registered trademarks of SAP SE (or an SAP affiliate company) in Germany and other countries. Atscript OData is an independent open-source project and is not affiliated with, sponsored or endorsed by SAP SE.
Released under the MIT License.