Skip to main content
NetScriptdocs Search docs ⌘K v0.0.9
Browse documentation

Storefront

Across seven chapters you build a small e-commerce storefront in one workspace: a products catalog, a cart, a durable checkout, a shipping webhook and a storefront page. The track follows the same structure as the NetScript playground, recast as a shop. One typed oRPC contract carries through every layer: the server handler validates against it, and the page's query and checkout mutation are typed from it, so a wrong field is a compile error.

  1. 1 · Scaffold
  2. 2 · Catalog service
  3. 3 · Cart contracts
  4. 4 · Checkout saga
  5. 5 · Shipping webhook
  6. 6 · Storefront UI
  7. 7 · Deploy

What you will build

A storefront backend called my-shop/:

  • a typed products catalog service backed by Postgres;
  • a cart domain defined contract-first;
  • a durable checkout saga that survives restarts and compensates on failure;
  • an HMAC-verified shipping webhook that hands inbound provider events to a background job;
  • a storefront page whose query and mutation are typed from the same contracts.

In the last chapter the whole app runs on your machine under one orchestrator, visible in a single dashboard. The track teaches NetScript's central rule, the oRPC contract is the single source of truth, then adds durable workflows and verified webhooks so checkout holds up when money changes hands.

The shape of the app

Who this is for

You know TypeScript and have used Deno a little. You don't need NetScript experience: chapter 1 starts from an empty folder. If you have never run the framework locally, skim the Quickstart first; it covers the same scaffold more slowly. Each chapter adds one capability and ends with a command whose output you can check.

The seven chapters

Start the track

Work the chapters in order. The my-shop/ workspace you create in chapter 1 is the one you finish in chapter 7: each chapter starts by checking the state the previous one left. After the track, the guides in Build › Services & SDK pick up where these chapters stop.

Search all documentation

Type a term to search the documentation.