BunStackDocs

For developers

Architecture and environments

How the platform is built, where the code lives, environments and how a change reaches production.

Last updated · 1 min read · Suggest an edit

The codebase

An npm-workspace monorepo:

PartContentsPublished as
apps/adminAdmin, landing page, signup, loginbunstack.co
apps/storefrontsAll storefronts, host routing via middleware*.bunstack.shop and custom domains
apps/designerThe theme designerbuilder.bunstack.co
apps/docsThis documentationdocs.bunstack.co
packages/sharedShared code: components, lib, services, typesImported by the apps
supabase/Migrations and edge functions (Deno)Supabase

Environments

Production and staging are two Supabase projects; Vercel Preview points at staging. All secrets live in Vercel (per project) and in Supabase (edge secrets and Vault), never in the repository.

The road to production

  1. Branch and pull request. CI runs lint, typecheck, unit tests, builds of all apps, Deno type-check of edge functions, replay of all migrations from zero with SQL test suites, and the check that the documentation was updated.
  2. Merge to main deploys the apps via Vercel's GitHub integration and the documentation via GitHub Actions.
  3. Migrations are pushed to Supabase and edge functions deployed with the Supabase CLI, documented in every PR that requires it.

See docs/environments.md in the repository for details, DNS records and rollback.