StorefrontsOverview

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

#GuideWhat it covers
1Getting startedDeploy a live store in ~5 minutes.
2SDK reference@dscodotco/sdk — every method, types, errors.
3ConfigurationEnvironment variables, resolution modes.
4Deploying to VercelThe starter, the Deploy button, prod vs preview.
5Custom domainsPoint your domain, verification, the resolve model.
6CheckoutThe order flow, cards, tax/shipping, fraud, honest errors.
7Accounts & ordersShopper sessions, order history, store credit.
8ThemingThe store manifest, brand tokens, sections.
9Build your own frontendUse the SDK directly, the BFF pattern, security.
10Next.js Commerce adapterDrop lib/flightdeck into a Next.js Commerce fork.
11TroubleshootingCommon errors and what they mean.

Three ways to build

  1. Clone the starter — the fastest path. A complete Next.js storefront you deploy as-is. Start at Getting started.
  2. Fork Next.js Commerce — if you already know Vercel’s template, drop in our lib/flightdeck adapter.
  3. Write your own — any framework. Use @dscodotco/sdk from 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.