Skip to Content
v1.33.8 · shipped One-screen report · Looks like your app 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_URL=https://YOUR-REF.supabase.co/functions/v1/api \ pnpm --filter "@mushi-mushi/admin..." build

The trailing ... also builds the workspace packages the console imports (@mushi-mushi/web, @mushi-mushi/mcp and others) first; a fresh clone has none of their dist/ folders yet. The output lands in apps/admin/dist/.

VITE_API_URL must point to the api edge function (…/functions/v1/api), not your database URL. All console API calls are proxied through that 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 + CloudFront deploy does this with CloudFront functions (scripts/cloudfront-mushi-spa-router.js and cloudfront-mushi-spa-response.js) in front of a private bucket. 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