Skip to content

james2177/Stellar-Solar-Grid

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

66 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Stellar SolarGrid

Powering Africa with affordable, pay-as-you-go solar energy on blockchain.

Stellar SolarGrid is a decentralized PAYG solar energy platform built on Soroban, within the Stellar ecosystem. Households and small businesses in underserved regions access solar electricity through flexible micro-payments — no large upfront costs required.

Architecture

stellar-solar-grid/
├── contracts/        # Soroban smart contracts (Rust)
├── frontend/         # React + TypeScript user/provider dashboards
├── backend/          # Node.js API + IoT smart meter bridge
└── README.md

Core Features

  • Smart Meter Integration — IoT meters with real-time usage monitoring and on/off control
  • Flexible Payment Plans — Daily, weekly, or usage-based micro-payments in stablecoins
  • Automated Access Control — Smart contracts enable/disable electricity based on payment status
  • Energy Usage Tracking — Dashboards for users and providers

Getting Started

Prerequisites

Smart Contracts

cd contracts
cargo build --target wasm32-unknown-unknown --release
stellar contract deploy --wasm target/wasm32-unknown-unknown/release/solar_grid.wasm --network testnet

Frontend

cd frontend
npm install
npm run dev

Backend

cd backend
npm install
npm run dev

Smart Contract Overview

The SolarGrid contract manages:

Function Description
register_meter(meter_id, owner) Register a new smart meter
make_payment(meter_id, amount, plan) Pay for energy access
check_access(meter_id) Check if meter is currently active
get_usage(meter_id) Retrieve usage data
update_usage(meter_id, units) Called by IoT oracle to update consumption

Network

Deployed on Stellar Testnet. Switch to Mainnet for production.

License

MIT

About

Stellar SolarGrid Pay-As-You-Go Solar Energy System Problem: Limited electricity access Solution: Micro-payments for solar usage Core Features: Smart meter integration Daily/weekly payment plans Automatic access control via payments Energy usage tracking Impact: Expands clean energy access

Resources

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • TypeScript 65.0%
  • Rust 34.0%
  • Other 1.0%