Build a storefront on Flightdeck
User-facing developer documentation for building and deploying a commerce storefront on the Flightdeck platform. You own the frontend and the hosting; Flightdeck is the commerce API behind it.
The model in one paragraph
Flightdeck hosts no storefront code of yours. You build a frontend — clone
our starter, fork Next.js Commerce, or write your own — and deploy it to your
own Vercel (or any Node/edge host). It reads catalog and places orders through
the Flightdeck commerce API using the typed @dscodotco/sdk,
with a narrow, checkout-only credential used server-side only. The shopper’s
browser talks to your server; your server talks to us. See
ADR-0008 for
the why.
Guides
| # | Guide | What it covers |
|---|---|---|
| 1 | Getting started | Deploy a live store in ~5 minutes. |
| 2 | SDK reference | @dscodotco/sdk — every method, types, errors. |
| 3 | Configuration | Environment variables, resolution modes. |
| 4 | Deploying to Vercel | The starter, the Deploy button, prod vs preview. |
| 5 | Custom domains | Point your domain, verification, the resolve model. |
| 6 | Checkout | The order flow, cards, tax/shipping, fraud, honest errors. |
| 7 | Accounts & orders | Shopper sessions, order history, store credit. |
| 8 | Theming | The store manifest, brand tokens, sections. |
| 9 | Build your own frontend | Use the SDK directly, the BFF pattern, security. |
| 10 | Next.js Commerce adapter | Drop lib/flightdeck into a Next.js Commerce fork. |
| 11 | Troubleshooting | Common errors and what they mean. |
Three ways to build
- Clone the starter — the fastest path. A complete Next.js storefront you deploy as-is. Start at Getting started.
- Fork Next.js Commerce — if you already know Vercel’s template, drop in our
lib/flightdeckadapter. - Write your own — any framework. Use
@dscodotco/sdkfrom your server. See Build your own frontend.
Conventions used here
- Money is integer cents everywhere in the API.
4400= $44.00. - A failed read is never an empty result. An unknown product is a real 404; a transport error throws. The SDK never hands you a fabricated empty object that hides a failure.
- The storefront token is a server-side secret. It never belongs in a browser bundle. Every example that uses it runs in server code.