Overview
Energy bills arrive every quarter, but what really happened to your electricity and gas consumption? Energy Insights Pal is a personal project I designed and built: a real-time, AI-powered dashboard that transforms raw energy data into actionable insights, helping homeowners and renters understand when they're using energy, how much it's costing them, and why their usage patterns change.
Problem Statement
Most energy bill PDFs show you a single number. They don't tell you why your bill spiked in January, which room might be draining power, or when you're paying the most for the energy you use. Consumers are left to guess:
- When during the day (or night) they're actually using the most energy
- How today's usage compares to last week, last month, or the same period last year
- Whether an unusual spike is a one-off or the start of a pattern worth investigating
- What their real-world costs look like against their actual tariff, not an estimated average
What It Does
Energy Insights Pal connects directly to the Octopus Energy API to pull half-hourly electricity and gas readings straight to your browser. The app displays:
- Consumption tracking across Day, Week, Month, and Year timeframes, with costs calculated against your actual tariff
- Trend analysis that compares current usage to previous periods, spotting spikes and shifts at a glance
- Usage Spotlights, an AI-driven anomaly detection feature that automatically flags unusual patterns, such as overnight standby creep, appliance-specific spikes, or seasonal shifts, and explains them in plain language
- AI summarization powered by Google's Gemini API, which turns detected anomalies into natural-language insights instead of raw numbers
- Offline-first loading, with a caching layer that keeps the dashboard fast even when the energy provider's API is slow or unavailable
The app is built with privacy in mind: API credentials are encrypted at rest, and energy data is kept within my own cloud project rather than passing through a third-party server.
Built for Real Users
The interface is deliberately minimal, no bloat, no distraction. Period selectors, scrollable multi-day breakdowns, and year-on-year comparisons are built with interactive charts and smooth, animated transitions. The app is a Progressive Web App, so it can be installed to a home screen and used like a native app, with real-time updates that keep the dashboard fresh without constant polling.
Tech Stack
Under the hood, Energy Insights Pal is built on a modern, full-stack TypeScript foundation:
- Frontend: React 19 with TypeScript, Vite, and Tailwind CSS
- Charts & Visualization: Recharts for data-driven charts, Framer Motion for interactions
- Backend & Sync: An Express.js service that brokers requests to Octopus Energy and coordinates a cache-first sync strategy, minimizing redundant API calls and staying comfortably within provider rate limits
- Infrastructure: Firebase Authentication (Google OAuth), Cloud Firestore for persistence and real-time updates, and Cloud Run for serverless deployment
- AI: Google's Gemini API for natural-language insight generation
- Analytics: Google Analytics 4 for tracking feature adoption
The external energy API is treated as a data source to sync in the background rather than a live dependency the UI waits on, which keeps the dashboard responsive and avoids hammering the provider's rate limits.
Development Practices
The codebase emphasizes correctness and transparency: a lightweight, dependency-free test suite, documented architecture decisions, semantic versioning with conventional commits, and automated CI/CD so every change is tested before it ships.
Why It Matters
Energy Insights Pal shows you the story behind the number on your bill: why it spiked, which habits are driving cost, and when you're paying the most. It's a tool for both curiosity and action, understand your consumption, then adjust your habits or have a more informed conversation with your energy supplier.
You can try it yourself at energyinsightspal.com.