Inspiration

Around 600 million people in Africa live without electricity, and the International Energy Agency names lack of capital as a key obstacle. Clinics lose vaccines when the fridge goes off. Farmers lose harvests without irrigation or cold storage. Ordinary people and the African diaspora who would gladly fund this have no simple, trusted way to do it, and earlier farm crowdfunding in Africa collapsed because nobody could verify what happened to the money. We wanted a model where every dollar and every kilowatt-hour can be checked.

What it does

SunShare lets anyone buy solar cells in a specific project, such as a rural clinic, an irrigation scheme or a cold room, for $5 a cell using PayPal. The site pays for the electricity it uses, at a lower price than the diesel or grid power it replaces. Each month that income is split among the cell owners and paid to their PayPal accounts.

Four AI agents run the platform:

  • Vetting agent scores each project before it is listed, from sunlight at the site, forecast output and the site's savings, and writes a plain-language report with strengths and risks.
  • Monitoring agent compares each month's metered output with the forecast and flags a plant that is underperforming.
  • Payout agent works out every owner's share and sends it through PayPal Payouts.
  • Investor agent takes a plain instruction such as "invest $50 in clinic solar in Zimbabwe", proposes purchases inside spending limits the investor has set, and buys only after the investor approves.

An Operations page lists every monthly report and every payout, so anyone can check the numbers.

How we built it

  • Next.js, React, TypeScript and Tailwind CSS, built for Cloudflare Workers with a Cloudflare D1 database.
  • PayPal Orders API (v2) for buying cells and PayPal Payouts API for monthly distributions, in the PayPal sandbox.
  • An OpenAI GPT model writes the vetting reports and monitoring notes and drives the investor agent through tool calls on the live demo (the code also supports Claude). Without an AI key the agents fall back to a rule-based engine, and the app labels which mode is active.
  • All figures (scores, kilowatt-hours, payout amounts) are calculated in code. The model explains and decides; it never does the arithmetic behind a payment.
  • NASA POWER climate data for sunlight at each site, with a stored fallback.
  • Built with Claude as the engineering agent: one orchestrating model coordinated subagents working in parallel against a shared written contract.

Challenges we ran into

  • Keeping money exact. Every monthly split reconciles to the cent: shares are rounded down and leftover cents go to the maintenance reserve.
  • Staying correct when requests arrive at the same time. On Cloudflare, requests can run in separate instances, so the guards live in the database: a purchase is counted once, cells cannot be oversold, and a month cannot be paid twice.
  • Agent payments and consent. PayPal needs the buyer to approve each order, so the investor agent prepares the purchase and the investor approves it. We chose that over pretending the agent can pay unattended.

Accomplishments that we're proud of

  • A complete flow from choosing a project to receiving a payout.
  • An agent with a visible spending mandate, checked on the server when it proposes and again when the purchase completes.
  • Honest presentation: returns are shown as estimates, sample data is labelled, and simulated steps say so.

What we learned

Trust is the product. The technology to move money exists; what was missing in earlier African crowdfunding was verification. Putting the monitoring and payout logic in the open, with a ledger anyone can read, matters more than a higher headline return.

What's next for SunShare

  • Read real output from inverters and meters in place of simulated readings.
  • Connect local wallets as PayPal expands in Africa, so clinics and farms can pay and local investors can take part.
  • Work through licensing. Paying returns to the public is regulated, so a live launch needs approvals in each country and from PayPal.
  • Recurring monthly investing, and saved payment methods so the investor agent can act within its mandate without a tap each time.

The projects and people in the demo are sample data, and plant output is simulated.

Built With

Share this project:

Updates

Submission history