07.3

Rust API · NoSQL Sandbox

Watch a REST API run, step by step — or build your own from blocks. No setup, no servers; everything runs in this tab. back to widgets
$rust-api --mode tour --scenario hello --step 3/6
>passive tour · pick a scenario or watch the full demo
welcome
A REST API is the conversation between an app and a server. This page lets you see that conversation — request, routing, auth, database hits, response — happening in real time, step by step.
01
Pick a scenario
Use the carousel below — each card runs one short request through the simulated server. Start with Hello, API and work your way down.
02
Watch it run
The lifecycle diagram lights up each stage in turn. The story card on the right narrates it in plain English; the trace below shows every step the engine took. Click any step to scrub backward.
03
Build your own
Once the scenarios make sense, switch to Builder at the top — design new routes, edit handler blocks, and fire your own requests. The schema and routes are all yours to play with.
// close this card any time — re-open with the "?" button
tour scenarios — pick one to watch
request lifecycleauth ✓ (header present)
Client
HTTP request
Router
method + path
Middleware
auth · parse · validate
Handler
your blocks
NoSQL Store
json tables
Response
status + body
now playing · scenario 01 / 06step 03 / 06
GET /users — a complete, successful request
Hello, API

Let's start with the simplest possible thing. The caller asks the server 'show me all the users.' The server checks who's calling, reads the database, and answers. Watch the diagram light up step by step.

3 · Authenticationauth ✓ (header present)

Before anything else, the server checks whether the caller is allowed to be here. The middleware looks at the Authorization header.

// what's happening — Authorization header verified. The middleware passes the request along to the next layer.

request · response
request
GET/users
headers
authorization: Bearer demo-token
response
body
execution tracestep 03 / 06
  1. 01
    ← GET /users
    stage: ingress
  2. 02
    router → GET /users
    stage: router
  3. 03
    auth ✓ (header present)
    stage: auth
  4. 04
    find_many(users, role=null) → 0 → var.rows
    stage: db_read
  5. 05
    respond 200 OK
    stage: respond
  6. 06
    → 200 OK
    stage: egress
03 / 06
nosql store · live
table · users2 rows
pkattributes
u_001
email: "ada@example.com"name: "Ada Lovelace"role: "admin"created_at: "2025-01-04T08:12:00Z"
u_002
email: "linus@example.com"name: "Linus Torvalds"role: "member"created_at: "2025-02-11T14:01:00Z"
table · orders1 rows
pkattributes
o_900
user_id: "u_001"sku: "RUST-BOOK-01"qty: 1created_at: "2025-03-02T10:00:00Z"
navigate