Logo Lanfrica

zealmugumya-creator/powercost

Domain:

environment and energy

Record type:

software
Creator:
zea
Host:
PowerCost — Uganda Fiscal Intelligence Platform # PowerCost — Uganda Fiscal Intelligence Platform > Live outage cost counter, generator tracker, UEDCL claims > Category: **private** 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 = 'powercost'`), 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 **powercost**. 3. Build settings: **Framework preset = None**, **Build command = (blank)**, **Build output directory = `public`**. 4. **Save and Deploy.** Your site is live at `powercost.pages.dev`. ## Deploy — Render (API) 1. Render Dashboard → **New** → **Blueprint** → connect repo **powercost**. 2. Render reads `render.yaml` and provisions `powercost-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 `powercost-api.onrender.com`. ## Local dev ```bash cd api && npm install && node server.js # localhost # open ../public/index.html in a browser for the front-end ```