development
The Raven
Real-time operations insights platform built for KEDCO, giving field teams and management a live view of feeder performance, faults, and distribution metrics.
Role
Full-Stack Dev
Year
2024
Category
development
Tech Stack
The Problem
KEDCO is an electricity distribution company serving customers across Kebbi, Sokoto, and Zamfara states in Nigeria. Before The Raven, operational data lived in disconnected spreadsheets, phone calls, and verbal shift handovers. A transformer fault in Birnin Kebbi might take two hours to reach anyone with authority to act on it. Management had no live picture of what was happening across the network at any given moment.
The Execution
I built The Raven as a React dashboard backed by Redux Toolkit for global state and ApexCharts for all data visualization. Permissions are enforced at the component level using CASL, so the same codebase renders completely different interfaces depending on whether you're a field engineer, district manager, or executive. MUI's DataGrid handles large tabular datasets — feeder logs, meter readings, billing summaries — with built-in column virtualization. For report generation, I integrated react-to-print so any table or chart view can be printed directly from the browser without leaving the application. The geographic layer uses React Map GL to plot network assets and fault locations on an interactive map.
Interactive Network Map
Built with React Map GL, the map plots every feeder, transformer, and substation with live status overlays. Fault locations are pinned in real time, giving operations teams an immediate geographic picture of where problems are.
CASL-Enforced Permission Views
Role-based access is handled by CASL with abilities defined per user role. A field engineer's dashboard shows only their assigned assets. A district manager sees their zone. Executives see the full network. All from the same codebase.
ApexCharts Performance Dashboards
KPIs including SAIDI, SAIFI, and collection efficiency are rendered as live ApexCharts visualizations. Charts update on a polling interval without full page reloads, keeping data fresh without requiring WebSocket infrastructure.
In-Browser Report Generation
Any table or chart view can be sent to print via react-to-print. Engineers generate shift reports, fault summaries, and performance exports directly from the dashboard — no export-to-Excel step required.
Impact
Technical Notes
The most deliberate decision was using react-window's virtualized list inside MUI's DataGrid for the feeder log table. At peak usage, the table holds over 8,000 rows. Rendering all of them at once on the low-spec Windows machines used in KEDCO's district offices caused scroll lag severe enough that engineers stopped using the table. Virtualizing the rows — rendering only what's visible in the viewport — brought scroll performance back to 60fps on the same hardware. The CASL permission layer also required careful thought: abilities are computed once when a user logs in and stored in Redux, so permission checks throughout the component tree are synchronous lookups rather than API calls.
