Auth users are not seeded automatically. After supabase start / supabase db reset, create accounts in local Studio:
- Open http://127.0.0.1:54323
- Go to Authentication → Users → Add user
- Map roles in the database as needed:
- Admin access: row in
public.admin_rolefor the user's auth id - Agent access: row in
public.agentfor the user's auth id
- Admin access: row in
For the Astro application in web/, configure these values in local .env files
and in the deployment platform:
PUBLIC_SUPABASE_URL=
PUBLIC_SUPABASE_PUBLISHABLE_KEY=
SUPABASE_SECRET_KEY=
PUBLIC_TURNSTILE_SITE_KEY=
TURNSTILE_SECRET_KEY=
UPSTASH_REDIS_REST_URL=
UPSTASH_REDIS_REST_TOKEN=
RESEND_API_KEY=
RESELLER_PRICE_LIST_FROM=
RESELLER_ADMIN_EMAIL=
RESEND_API_KEY, RESELLER_PRICE_LIST_FROM, and RESELLER_ADMIN_EMAIL are required
for the reseller application email workflow. The remaining variables are required
for the current public form and dashboard protections.
Deploy the Astro app from the web/ directory, not the repository root. This
project uses server-rendered Astro routes, so the supported Cloudflare target is
Cloudflare Workers with static assets, not a static Cloudflare Pages deployment.
Recommended Cloudflare settings:
| Setting | Value |
|---|---|
| Install Command | npm install |
| Build Command | npm run build |
| Deploy Command | npx wrangler deploy |
Recommended deployment checklist:
- Run all commands from
web/. - Configure all required environment variables before the first production deploy.
- Apply Supabase migrations to the linked project before deploying the app.
- Verify that Turnstile, Upstash Redis, and Resend credentials are production values.
- Run
npm run test,npm run check,npm run lint, andnpm run buildfromweb/. - Run
npx wrangler deployto publish the Cloudflare Worker.
The project uses @astrojs/cloudflare for server-rendered Astro routes on
Cloudflare Workers. Cloudflare Pages static output will not serve this app
correctly because the root page and API routes are rendered by the server
adapter.