EFRIS Bridge — Uganda Fiscal Intelligence Platform
# EFRIS Bridge — Uganda Fiscal Intelligence Platform
> USSD/WhatsApp informal-sector tax compliance
> Category: **government**
A single-page product dashboard with a **live lead-capture layer** wired to Supabase, plus a
small Node API for live stats. Part of a 16-product suite for Uganda's fiscal ecosystem.
## Repo layout
```
public/index.html Static product dashboard + demo/lead form (deploy to Cloudflare Pages)
api/server.js Express API: /api/health, /api/stats, POST /api/leads (deploy to Render)
render.yaml Render Blueprint for the API service
```
## Live data
Form submissions land in Supabase table `public.fiscal_leads` (column `product = 'efris-bridge-ussd'`),
project `vyrctsiyaihsysgpozdm`. The browser uses the **publishable** key (safe to expose).
Server-side stats use the **service-role** key, which you set in Render — never in the browser.
## Deploy — Cloudflare Pages (front-end)
1. Cloudflare Dashboard → **Workers & Pages** → **Create** → **Pages** → **Connect to Git**.
2. Pick repo **efris-bridge-ussd**.
3. Build settings: **Framework preset = None**, **Build command = (blank)**,
**Build output directory = `public`**.
4. **Save and Deploy.** Your site is live at `
efris-bridge-ussd.pages.dev`.
## Deploy — Render (API)
1. Render Dashboard → **New** → **Blueprint** → connect repo **efris-bridge-ussd**.
2. Render reads `render.yaml` and provisions `efris-bridge-ussd-api` (free web service).
3. After it builds, open the service → **Environment** → add
`SUPABASE_SERVICE_ROLE_KEY` (from Supabase → Project Settings → API) to enable `/api/stats`.
4. API is live at `
efris-bridge-ussd-api.onren…`.
## Local dev
```bash
cd api && npm install && node server.js #
localhost
# open ../public/index.html in a browser for the front-end
```