Northwind has a catalogue, guides, shops, a contact form and a navigation it can edit. It is a website. This part puts it on the internet.
The deploy itself is a Vite build and a static host, and there is nothing to teach about that. Two other things in this part are worth reading.
Two keys, and VITE_ is what separates them
The site needs a delivery key to read content. So does the sitemap script. They must not be the same key, and the reason is sitting in plain sight in the variable names.
Anything prefixed VITE_ is inlined into the bundle at build time. It ships to the browser. Anyone can read it with view-source. That is not a leak — it is how a static site talks to an API at all, and there is no version of this where the browser holds a secret.
So the browser’s key is not a secret. It is a browser-safe key: restricted to a list of origins, which is what makes it useless to anybody who copies it. Requests from northwindcoffee.example are served; the same key pasted into somebody else’s site is refused.
The build’s key is a different thing entirely — unrestricted, used by Node during the build, and it must never acquire the VITE_ prefix. A prefix typed by accident is how an unrestricted key ends up published, and nothing will warn you.
| Prefix | Restricted by | Where it runs | |
|---|---|---|---|
| Site | VITE_CONTENT_DELIVERY_KEY | allowed origins | the browser |
| Build | CONTENT_DELIVERY_KEY | nothing — keep it secret | Node |
The sample verifies both halves rather than asserting them. The browser-safe key serves the site from its allowed origin. The same key, used from the sitemap script, is refused:
403 origin_denied
Because Node sends no Origin header, and a key restricted by origin has nothing to match. That refusal is not a misconfiguration — it is the restriction doing exactly its job, and seeing it once is the clearest way to understand what a browser-safe key is.
The sitemap, and where the SDK stops
scripts/sitemap.mjs is the clearest example in this whole sample of a boundary worth understanding.
The SDK ships buildSitemapDocuments: a pure function that knows the things worth knowing about sitemaps. That reciprocal hreflang sets have to include themselves and carry an x-default. That percent-encoding and XML-escaping are two separate required steps and neither subsumes the other. And that a sitemap is capped at fifty thousand URLs and fifty megabytes — two limits, not one — so a site past either has to be split across an index plus shards rather than emit a file that is silently invalid.
The byte cap is the one worth knowing about, because for a multi-language site it arrives first. Every URL carries the complete set of alternates, so the document grows with the square of the locale count while the URL count grows linearly: ten locales and about three thousand pages is enough to blow the byte limit while still using barely half the URLs you are allowed. Below either cap the function returns exactly one document, so writing it this way costs nothing today and keeps working later.
It ships no route, no handler and no CLI. Not an omission — serving is hosting, and hosting is the one thing an SDK cannot know about. Here the plumbing is thirty lines that write a file during the build. In a server-rendered app it is thirty entirely different lines in a request handler. An adapter for either would encode assumptions about a stack nobody controls.
Ship the capability. Leave the plumbing to the person who knows where it runs.
It is a good test to apply to any library you depend on: does it know things, or does it just assume things about your stack?
Northwind’s sitemap comes out at 22 URLs, each with a lastmod the CMS actually knows because it tracks when content last changed.
One thing from the host
A static site with one route needs its host to rewrite /* to /index.html. Otherwise /coffees/ethiopia-guji is a 404 from the file system before the app ever loads.
Every static host supports this and they all call it something slightly different. The sample names none of them, deliberately — they all work, and naming one would read as an advertisement.
The end of the first arc
That is a real site, deployed, with a content model somebody could work in. If you stopped here you would have something worth having.
The checkpoint bundle closes the arc: 23 Contracts, 11 Templates, 27 Components, 23 nodes, one stream and 16 blobs — including the header and footer, which belong to no page and had to be named as export roots in their own right, exactly as part 11 said.
What the second arc is for
Everything so far has been getting a site built. The rest is what a content platform is actually for — and the argument the remaining parts make together is not that each capability is impressive on its own.
It is how little the model has to change to get them.
Northwind is about to acquire generated types, a second language, different copy for different readers, an editorial review, a staging environment and a cross-sell rail. Watch the Contracts while it happens.
Next: deleting the types file we have been maintaining by hand since part 4.
