Problem Statement

In Nigeria and other unreliable-grid regions, households and small businesses often rely on petrol or diesel generators without a clear way to compare generator costs with a properly sized solar system. Choosing panels, batteries, and inverters can also be confusing, especially when sunlight, appliance demand, fuel use, and local prices all interact.

Solution Overview

SunSwap is a solar-energy planning web app that turns a user's current electricity and generator usage into an evidence-based solar plan. It uses real satellite-derived solar data, simulates energy use hour-by-hour across a full year, searches system combinations, and explains the trade-offs in naira, generator runtime, fuel savings, emissions, and payback.

Key Features

Describe current energy use — capture appliances, usage patterns, generator runtime, fuel use, and local context. Year-long simulation — model 8,760 hours using solar profiles and the user's demand. System search — compare 54 panel, battery, and inverter combinations. Explain the recommendation — show system cost, annual savings, payback, alternatives, and staged rollout options. Track reality — save plans and record generator fuel use over time. Grounded advisor — ask questions through an in-app energy advisor. The default local provider is deterministic and offline; an optional OpenAI-compatible LLM can be configured for richer responses.

Example

For a Kano example, SunSwap recommends a 2 kWp / 5 kWh / 2.5 kVA system at about ₦2.99m, with estimated annual savings of about ₦2.55m and a payback of about 1.2 years. The modeled scenario reduces generator runtime from 2,920 hours to 0, avoids about 2,385 L of fuel and 5.7 t CO2e, and reaches about 95% solar coverage.

Technologies Used

Python 3.11+ FastAPI and Pydantic SQLAlchemy 2 React 18, TypeScript, Vite PVGIS 5.2 / EU JRC satellite solar data SQLite / Neon Postgres Docker GitHub Actions Optional OpenAI-compatible LLM integration

Target Users

Nigerian households, students and young builders exploring solar, small businesses, generator-dependent users, solar installers, and anyone in an unreliable-grid environment who wants to understand the economics of switching from generator power to solar.

Impact and Methodology

SunSwap is designed to make solar planning more understandable and measurable. Its calculations use satellite-derived solar profiles and explicit assumptions rather than presenting a single unexplained recommendation. Results are estimates and should be validated against an installer assessment, actual site conditions, equipment specifications, and current local prices before purchase.

Links

Live demo: https://sunswap-qi1e.onrender.com Source code: https://github.com/favour187/sunswap Demo video: https://youtu.be/a3GUVslhDoE?si=KR7aBqKZgHI6EOz

AI Use

The project uses an optional OpenAI-compatible LLM integration for the advisor, while retaining a deterministic local provider for offline/demo reliability. Development was assisted by AI coding tools; the architecture, content, formulas, and code were directed and reviewed by the author.

Built With

Share this project:

Updates

Submission history