For developers
Architecture and environments
How the platform is built, where the code lives, environments and how a change reaches production.
The codebase
An npm-workspace monorepo:
| Part | Contents | Published as |
|---|---|---|
apps/admin | Admin, landing page, signup, login | bunstack.co |
apps/storefronts | All storefronts, host routing via middleware | *.bunstack.shop and custom domains |
apps/designer | The theme designer | builder.bunstack.co |
apps/docs | This documentation | docs.bunstack.co |
packages/shared | Shared code: components, lib, services, types | Imported 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
- 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.
- Merge to
maindeploys the apps via Vercel's GitHub integration and the documentation via GitHub Actions. - 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.