# PowerPulse II

> Source: <https://dev.to/suzzanenhyira/powerpulse-ii-4eh9>
> Published: 2026-07-15 17:45:17+00:00

**The Problem I Was Actually Trying to Solve**

If you've lived in Ghana, you know "dumsor" — the unofficial word for unpredictable power outages. Your light goes out and you genuinely have no idea: is it just your house? Your street? The whole area? Is ECG doing planned maintenance, or is something actually broken? There's no shared, real-time source of truth for any of this. You're guessing, or asking a WhatsApp group, or just sitting in the dark.

I'm not a professional developer. I build and ship things with AI assistance, learning as I go — mostly civic tech, tools for a Ghanaian context. PowerPulse started as an idea to fix that specific gap: what if outage reporting was crowd-sourced, confirmed by the community, and actually tracked restoration times over time?

So I built it. Here's the whole story — goal, build, the two times I had to tear things down and start over, and where it stands now.

**What PowerPulse Actually Does**

Report an outage — pick your region and town, add an optional note, tap "Power Out"

Community confirmation — others in the area tap "I see this too," so a report with 12 confirmations means something real, not one person's claim

Power Back reporting — closes out the outage and, crucially, lets the system calculate real average restoration times per region — data that doesn't really exist anywhere else in an accessible form

Subscriptions + notifications — watch a region, get alerted the moment something's reported or restored there

A trust/reputation system — Candle Bearer → Torch Carrier → Bulb Guardian → Voltage Warden → Grid Sentinel, tiers earned through accurate reporting, confirming others, and reporting restorations

A live stats dashboard — active outages, most affected regions, average restoration time, weekly vs. all-time views, with actual charts

**The Stack**

Next.js 16 (App Router) + TypeScript + Tailwind, Supabase for Postgres + Auth + Realtime, Recharts for the dashboard, deployed on Vercel. No custom backend server — Supabase's row-level security policies handle all the access control directly in the database, so the frontend talks straight to Postgres via their client library.

**Pivot #1: Killing the Map**

I originally planned a live Leaflet map of Ghana's regions — click your area, see color-coded outage intensity, the whole visual thing. I hit the exact wall a lot of people hit combining Leaflet with Next.js: Leaflet manipulates the DOM directly, and Next.js tries to server-render everything by default, which breaks immediately (window is not defined, or a silent zero-height container if you dynamically import it wrong).

I tried dynamic() imports with ssr: false. Then hit a second bug where the map container had zero height at the moment Leaflet initialized, so it "loaded" but rendered invisible. At that point I made a call that I think matters more than people admit: I cut the feature entirely.

Instead of a map, outage location became a simple region + town dropdown. Less impressive-looking, way more reliable, and it let me actually ship the features that mattered — reporting, confirming, restoring — instead of staying stuck on a visual that wasn't core to the value.

**Pivot #2: The Whole Layout**

The first working version was one long page — report form, feed, dashboard, badge explainer, all stacked vertically. It worked. It also felt like a class project, not a product.

So I rebuilt the whole navigation: a real sidebar (desktop) / bottom nav (mobile), a proper home dashboard with your tier, a live snapshot stat, and clickable action cards — Report, Live Feed, Statistics, Learn — each living in its own focused view instead of everything competing for attention on one page. That one architectural change did more for how "real" the app felt than any individual feature did.

**The Annoying Technical Stuff (For the Engineers Reading This)**

Tailwind v4 → v3 downgrade. The scaffolding tool defaults to Tailwind v4 now, which uses a completely different CSS-variable-based config system than what I was expecting to work with. Had to manually uninstall, reinstall v3, regenerate config files, rewrite the CSS import syntax from [@import](https://dev.to/import) "tailwindcss" to the old [@tailwind](https://dev.to/tailwind) base/components/utilities directives.

PowerShell execution policy. Windows blocks npm/npx scripts by default. Needed Set-ExecutionPolicy RemoteSigned -Scope CurrentUser as admin before any tooling would run at all — an easy one-line fix, but a genuinely confusing wall to hit on day one.

Row Level Security. Before deploying, I locked down every database table so people can only do what the app logic allows — not whatever raw API calls someone could otherwise make with the public key. The tricky part: my points-awarding system needed a SECURITY DEFINER Postgres function, since confirming someone else's report has to update their points, which normal RLS would otherwise block entirely.

Auth redirect mismatch. Magic-link login worked perfectly on localhost, then 404'd in production until I updated Supabase's allowed redirect URLs to include the real Vercel domain.

**Where It Stands**

PowerPulse is live, installable as a PWA on phones (Safari's "Add to Home Screen" on iOS, Chrome's install prompt on Android), with the full loop working end to end: report → confirm → restore → points/tiers → live dashboard.

**The Honest Limitation**

A crowd-sourced platform is only as good as the number of people using it in any given area. Five active users in Accra and zero in Kumasi means Kumasi effectively has no coverage yet. This is the classic cold-start problem every platform like this faces — Waze, Citizen, all of them hit this early. The answer isn't technical. It's distribution, community adoption, getting real people in real neighborhoods to actually use it. That's the next hard problem, and it's not one I can solve by writing more code.

**What's Next**

An AI layer, using Claude's API, analyzing report patterns per region to estimate outage risk and restoration times — parked for now until there's a small budget for API costs, since it's the one part of this stack that isn't free. Beyond that: real push notifications instead of the current in-app-only alerts, and eventually seeing if this is worth turning into an actual native app.

If you're in Ghana and dealing with outages, or just curious how it's built — I'd love feedback. This was built by someone learning as they go, with a lot of AI-assisted pair programming and a lot of "wait, why is this not working" moments. If that's relatable to you, hopefully this post was useful.
