Deployment
Deploy xcity-home to Cloudflare Pages with the Node adapter + Wrangler.
xcity-home ships as an Astro hybrid app behind the Node adapter, with Cloudflare Pages as the production runtime.
Local build
npm install
npm run build # astro build → ./dist
npm run start # node ./dist/server/entry.mjs — preview the production bundle
Cloudflare Pages
npm run pages:dev # wrangler pages dev ./dist
npm run pages:deploy # build + wrangler pages deploy ./dist
wrangler.toml pins the project name; Cloudflare environment variables hold all secrets — STRIPE_SECRET_KEY, GOTRUE_ADMIN_TOKEN, LITELLM_MASTER_KEY, etc. See Operations: Secrets for the full list.
Required environment variables
| Var | Purpose |
|---|---|
PUBLIC_SUPABASE_URL | Local dev fallback identity provider |
PUBLIC_SUPABASE_ANON_KEY | Anon key for dev |
GOTRUE_URL | Self-hosted GoTrue base (https://auth.xcity.one) |
GOTRUE_ADMIN_TOKEN | Long-lived service JWT for webhook user updates |
STRIPE_SECRET_KEY | Stripe secret |
STRIPE_WEBHOOK_SECRET | Stripe webhook signing secret |
STRIPE_PRICE_PRO_MONTHLY | Stripe price id for Pro |
STRIPE_PRICE_TEAM_MONTHLY | Stripe price id for Team |
LITELLM_BASE_URL | https://tokenhub.xcity.one |
LITELLM_MASTER_KEY | TokenHub master key for key provisioning |
XCT_CORS_EXTRA_ORIGINS | Comma-separated dev/external origins |
Smoke test the deploy
After every deploy:
- Hit
/— homepage 200. - Hit
/api/auth/me— should be401when not signed in. - Hit
/dashboardwhile signed in — sidebar shell renders. - Trigger a Stripe test event (
stripe trigger checkout.session.completed) — webhook returns200.
Or just run the smoke suite:
npm run test:smoke
See Operations: Test framework.
Last updated: