Interactive Learning Platform Nuxt layer

Isolated learning atmosphere · v4.x

← Back to writing
All tutorials
Advanced Released November 23, 2026 · ~300 min

Nitro v3 in Practice: Build Ampyard

Most server tutorials hand you a to-do API, a weather card, or a chat room with no persistence. This one hands you a charging depot.

Ampyard is a fictional EV charging stop on the A1 corridor: eight bays, a queue, live charger telemetry, a session ledger, a depot clock, and an operator radio. You build it one real stage at a time, and every lesson embeds the actual app at that stage.

ampyard / preview / 9
Live stage Open app ↗
Ampyard · live stageStage 9 / 9

Why Nitro v3, and why now?#

Nitro v3 is the server engine Nuxt 5 is built on. It is also a standalone framework: file-based routes, web-standard handlers, cache, D1 (and an optional KV path), tasks, cron, WebSockets, OpenAPI, and a Vite plugin that builds the client and server together.

Nuxt 4.7 lets you opt into Nitro v3 behind a flag. That is useful, but it also hides the seams. Ampyard starts from the other direction: a Vite + Vue app with Nitro as the server, no Nuxt in the room. You see every route, every binding, and every deploy decision.

Nitro v3 is a release candidate. The API is stable enough to teach, but pin the version you build against (3.0.261103-rc in this series) and do not ship it to a business-critical depot yet.

What you will build#

Nine stages, one codebase:

  1. Foundation — Nitro + Vite + Vue Router SSR, the branded shell, and /preview/:stage. Live now.
  2. Routes — web-standard handlers, bay detail, middleware, and errors. Live now.
  3. Cache — a two-second snapshot cache with SWR and an honest x-cache header. Live now.
  4. Holds — D1-backed bay holds and a charging queue. Live now.
  5. Ledger — D1 sessions, drivers, and money that outlive a restart. Live now.
  6. Clock — tasks, cron, settlement, rollups, and the Nitro CLI. Live now.
  7. Live — SSE for the board and a WebSocket ops radio. Live now.
  8. Contract — OpenAPI for charger agents and Vitest tests. Live now.
  9. Ship — runtime mode, Cloudflare Workers, D1 (and optional KV), cron triggers, and a Durable Object. Live now.

The final app is /. The /preview/:stage route shows the app with only the features that exist at that point. The preview above is the real stage 9 app, not a video.

How this series works#

Each lesson follows the same shape:

What it is → Why you'd care → What we're building → Before/After → Do it yourself → Live stage → Gotchas → Recap.

The live stage is part of the lesson. It is a real iframe pointing at the deployed app. The blog reads NUXT_PUBLIC_AMPYARD_URL; the app reads the stage number. The code in the lesson is the code in apps/ampyard, so the preview and the source cannot drift.

Before you start#

  • Node 22.22.3+ (the same floor Nuxt 4.7 uses).
  • pnpm and a terminal.
  • Vue 3 and TypeScript basics.
  • A Cloudflare account for the final deploy. Local development only needs Node.

Nitro gives us the pieces the depot needs: routing, cache, KV, database, tasks, WebSockets, OpenAPI, and the Vite plugin.

Start here#

All nine stages are live. Start with The Ampyard Foundation, then Routes on Web Standards, Cache the Board, D1 Holds and the Queue, The D1 Ledger, The Depot Clock, Live: SSE + WebSocket, The Charger Contract, and Ship It.

The final depot is /.