Skip to Content
v0.8.0 · shippedNative mobile SDKs, optional Sentry enrichment, and bring-your-own keys/storage. Read the changelog →
Self-hostingAdmin SPA deploy

Admin SPA deploy

The admin console is a Vite + React SPA that talks directly to your Supabase project and the api edge function. It has no server runtime — any static host works.

Build

From the repo root:

VITE_SUPABASE_URL=https://YOUR-REF.supabase.co \ VITE_SUPABASE_ANON_KEY=eyJ… \ VITE_API_BASE_URL=https://YOUR-REF.functions.supabase.co \ npm run -w apps/admin build

The output lands in apps/admin/dist/.

VITE_API_BASE_URL must point to your Supabase Functions endpoint, not your database URL. All console API calls are proxied through the api edge function.

Deploy options

HostCommand / workflow
Cloudflare Pageswrangler pages deploy apps/admin/dist --project-name mushi-admin
Vercelvercel apps/admin/dist
S3 + CloudFrontSee .github/workflows/deploy-admin.yml in the repo
Netlifynetlify deploy --dir apps/admin/dist --prod

SPA routing

All hosts need to serve index.html for every path under the console root. The repo’s reference S3 workflow sets the ErrorDocument to index.html. For Cloudflare Pages and Netlify, a _redirects file or netlify.toml with /* /index.html 200 is sufficient.

First-run setup

After deploy, open the console and complete the Onboarding wizard (/onboarding). It will:

  1. Generate your first API key.
  2. Connect your GitHub OAuth app.
  3. Show the SDK snippet for your first project.

If /onboarding returns a blank screen, confirm VITE_SUPABASE_URL and VITE_SUPABASE_ANON_KEY are baked into the build — these cannot be injected after build time.

Last updated on