DEV Community

Cover image for Community Solar Energy Bank: donating solar credits you already have
Claudio Filho
Claudio Filho

Posted on

Community Solar Energy Bank: donating solar credits you already have

DEV Weekend Challenge: Generosity Edition Submission πŸ’œ

This is a submission for Weekend Challenge: Generosity Edition

What I Built

Community Solar Energy Bank is a platform that lets people and businesses with residential or commercial solar panels donate their surplus energy credits directly to low-income families in Brazil, through NGOs connected to each family's utility company.

The idea: in Brazil's net-metering system, a solar panel owner who generates more than they use accumulates credits with their utility company, credits that often just sit there, underused. At the same time, low-income families served by the very same utility struggle with expensive electricity bills. This project connects the two without anyone touching real money, you're not buying anything, you're redirecting energy credit you already own.

I wanted the project to be upfront about what's real and what's a demo. States and utility companies are real data (Light in RJ, Enel in SP/CE/GO, Cemig in MG, Equatorial in MA/PA/PI, Amazonas Energia in AM, Roraima Energia in RR, Neoenergia Pernambuco in PE), though coverage is deliberately partial, states without a registered utility show an honest empty state instead of fake data. NGOs are entirely fictional, and every card says so. No real money or energy transfer happens anywhere, the donation flow is a simulation end to end.

Demo

Live demo: https://solar-credit-exchange.vercel.app

Flow: pick your state on the map, choose the utility company serving it, pick an NGO linked to that utility, enter how many kWh of surplus credit you want to donate, review an AI-generated checklist of what that utility typically requires, confirm, and see it reflected on the aggregated impact dashboard.

Code

Community Solar Energy Bank

A demo platform that lets people and businesses donate their surplus solar energy credits directly to low-income families served by NGOs in Brazil.

Built for the DEV Weekend Challenge: Generosity Edition hackathon.

This is a hackathon demo. No real utility integration or energy transfer happens anywhere in this project β€” donors are not charged any money, since they're transferring energy credits they already have, not buying anything. The impact dashboard is also simulated.

How it works

Brazil map (pick a state)
        ↓
Utility companies in that state (real data, partial coverage)
        ↓
NGOs linked to that utility (fictional, labeled "Demo NGO")
        ↓
Donation form (kWh of surplus solar credit)
        ↓
AI-researched checklist of what that utility typically requires β†’ confirm transfer
        ↓
Donation saved + AI-generated impact summary + aggregated impact dashboard

Tech stack

How I Built It

Stack: Next.js (App Router) + TypeScript, Prisma + PostgreSQL hosted on Neon, Tailwind CSS, Zod for API validation, and Google Gemini for the AI pieces.

Google AI (Gemini) does two jobs here. Before a donation is confirmed, Gemini, with Google Search grounding, looks up what the selected utility typically requires to process a credit transfer and shows a short, utility-specific checklist to the donor. After a donation is saved, Gemini generates a short, human-readable summary of the impact, shown on the confirmation screen and the impact dashboard. Both fall back to static text if there's no API key configured or a call fails for any reason, so the demo always works.

This started as a completely different project: a dashboard about energy deficits in Brazil's isolated grid systems, like Roraima, built around real open data from ONS, Brazil's national grid operator. Partway through the weekend I realized the biggest gap wasn't the data, it was that there was no actual generosity mechanic in it, you could read about the problem but couldn't do anything. That led to the pivot: same country, same "who has more than they need vs. who doesn't have enough" framing, but rebuilt around an actual transfer of something real, solar credits the donor already owns, instead of just a report about a problem.

I'm an Electrical Engineering graduate turned backend developer (PHP and .NET/C#), currently doing a Master's in energy systems, so this project sits right at that intersection.

Prize Categories

Best Use of Google AI

Top comments (0)