A Peer-to-Peer Energy Trading Platform
This project enables a decentralized platform for trading surplus solar energy using blockchain technology. Our solution empowers individuals and businesses to take full control of their surplus energy. We’re building a future where clean energy is accessible, affordable, and efficient for everyone.
Our platform ensures transparency, security, and efficiency using blockchain technology.

Website.demo.mp4
- doc: Documentations
- instance: Database location and other files
- main: Contains all the main scripts
- tests: Contain all the tests for our project
- util: Helpful tools
- playground: Standalone testing before full implementation. See Smart Contract Run Example and Asset Creation file
- Solar Chain: Algokit Project containing the Smart Contract
- Python 3.12 or later
- Docker (only required for LocalNet)
- Make sure all packages are installed.
- Run
pip install -r requirements.txtto install all required packages.
- Run
- For compiling contract after modification run:
algokit compile py <INPUT> --output-arc32 --no-output-teal. No need to run this if contract is not modified.
Start by cloning this repository to your local machine.
Ensure the following pre-requisites are installed and properly configured:
- Docker: Required for running a local Algorand network. Install Docker.
- AlgoKit CLI: Essential for project setup and operations. Install the latest version from AlgoKit CLI Installation Guide. Verify installation with
algokit --version, expecting2.5.0or later. - Start LocalNet: Use
algokit localnet startto initiate a local Algorand network.
For test net just run this file and make sure the variable
LOCAL_NETis set to false and accounts are properly setup in the accounts file.
Pycharm was the IDE used.
Run main.py and navigate to the website.
For standalone smart contract testing navigate to Standalone file
NOTE: If using localnet you will have to create new localnet accounts and asset for testing on localnet. If doing so then mention the new accounts' mnemonic in this file in the
ACCOUNTS_LOCALlist and update theASSET_ID_LOCAL_NETvariable to the new asset's ID. See this file to create a new asset for localnet.For using test net make sure that in the file the variable
LOCAL_NETis set to false. This will make it automatically use the testnet accounts mentioned in the accounts file.
Logged in but got unauthorized: incorrect username or password error.
Right-Click on the system tray icon, does it show you logged in as username@domain.com? If so, Sign out, the issue is that you must login to Docker using your hub username, which is different than your email address, even though in some cases, both are interchangeable.
You can do this by signing out from the system tray icon, or by logging in at a command prompt, using the syntax docker login --username your_username_here.
If you’re not sure of your username, you can login to the Docker Hub, and your username will be displayed on the far right hand side of the menu bar, next to “Dashboard”, “Explore” and such.
This project makes use of Algorand Python to build Algorand smart contracts.
The following tools are in use:
- AlgoKit - One-stop shop tool for developers building on the Algorand network; docs, intro tutorial
- Algorand Python - A semantically and syntactically compatible, typed Python language that works with standard Python tooling and allows you to express smart contracts (apps) and smart signatures (logic signatures) for deployment on the Algorand Virtual Machine (AVM); docs, examples
- AlgoKit Utils - A set of core Algorand utilities that make it easier to build solutions on Algorand.
- pytest: Automated testing.
- Docker: For localnet testing
- Flask: For backend
Contributions are welcome—check out our code and join us in revolutionizing energy sharing!