Static site with send-package form and admin dashboard, backed by Supabase.
Set these in Netlify → Site settings → Environment variables (or in netlify.toml / UI):
| Variable | Use | Where |
|---|---|---|
SUPABASE_URL |
Project URL, e.g. https://your-project-id.supabase.co |
Injected into frontend at build |
SUPABASE_ANON_KEY |
Public anon key (safe for browser) | Injected into frontend at build |
SUPABASE_SERVICE_ROLE_KEY |
Secret service key (bypasses RLS) | Never in frontend. Use only in Supabase Edge Function secrets (Paystack webhook). |
Build command: npm run build
Publish directory: . (or your static output folder)
The build runs scripts/generate-config.js, which writes config.js from SUPABASE_URL and SUPABASE_ANON_KEY. After adding or changing these env vars in Netlify, you must trigger a new deploy (e.g. push a commit or "Trigger deploy" in Netlify) so the build runs and the live site gets the correct config. Otherwise the Send Package form will not save orders and the admin dashboard will stay empty.
- Create a
.envfile (do not commit) with:SUPABASE_URL=https://your-project-id.supabase.co SUPABASE_ANON_KEY=your_anon_key - Run
npm run buildsoconfig.jsis generated, then openindex.html(or use a local server). - Or set
window.SUPABASE_URLandwindow.SUPABASE_ANON_KEYinconfig.jsmanually for local only.
See supabase/README.md for migrations, Paystack webhook, and admin/rider setup.