Skip to main content

Local Setup

Prerequisites​

  • Bun
  • gcloud, logged in with your Birdy Grey account
  • Staging credentials for .env.staging (Shopify, Airtable). Ask the team.

Install​

One package comes from Birdy Grey's private npm registry, so authenticate once before installing:

gcloud auth application-default login
npx google-artifactregistry-auth
bun install

Run​

bun run dev   # http://localhost:8080

Locally there's no gateway, so there's no API key and no /catalog prefix:

curl "http://localhost:8080/products?limit=3"

Open http://localhost:8080/public/docs to browse and send requests, or use the Bruno collection in bruno/.

Checks​

bun run test:ci
bun run typecheck
bun run biome:check

Warm the swatch cache​

After adding colors or color families in Airtable, pre-load their swatch images into the CDN cache so the first caller doesn't wait on them:

bun run seed:swatches

It targets production's CDN unless BG_CDN_BASE_URL says otherwise, and only fills images that aren't cached yet. An edited image for an existing color isn't refreshed.