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

Live Dashboard

This track builds a real-time operations dashboard for an order queue, from a typed contract on the backend to a durable change-stream in the browser. By the last chapter, an open page receives server-pushed updates with no manual refresh, no polling loop and no hand-written WebSocket.

  1. 1 · Scaffold
  2. 2 · Contract to service
  3. 3 · Cache-first query
  4. 4 · definePage + island
  5. 5 · Live stream
  6. 6 · Deploy

What you will build

A my-dashboard/ Fresh workspace whose home screen is an order queue. You scaffold a NetScript project, expose an orders read-model through a typed oRPC service, add a cache-first SDK query layer, and render the queue with NetScript's definePage page builder and a hydrated TanStack Query island. Then you subscribe a page to a durable change-stream so the server pushes updates into it. The final chapter runs the whole graph locally under Aspire. The same project grows chapter by chapter, so work them in order.

Before you begin

You need the toolchain every NetScript tutorial assumes. Check that Deno, the Aspire CLI and Docker are available:

Shell
deno --version && aspire --version && docker info

You see a Deno 2.x version, an Aspire CLI version, and Docker engine details (not a connection error). If any is missing, the quickstart walks through installing it. Install the NetScript CLI:

Shell
deno install --global --allow-all --name netscript jsr:@netscript/cli@0.0.9

The arc: contract → client → query → island → stream

One shape of data travels from the database to a live cell in the browser, type-checked at every hop. Each chapter adds one link:

Start the track

Start at chapter 1 and keep the same my-dashboard/ through to chapter 6. For exact symbols, the fresh, sdk, service and streams reference units back these chapters. After the track, the guides in Build › Web Layer pick up where the chapters stop.

Search all documentation

Type a term to search the documentation.