This decentralized application (dApp) facilitates peer-to-peer energy trading within a microgrid using the Ethereum blockchain. Designed for mobile platforms, it allows seamless energy transactions without the need for centralized intermediaries.
- Decentralized Trading: Buy and sell energy directly between users.
- Smart Contracts: Utilize Ethereum smart contracts for secure, transparent transactions.
- Cross-Platform: Developed using Flutter, enabling use on both Android and iOS.
- Database Integration: Uses Firebase for robust data management.
Click the image below to watch a demo of the dApp:
Ensure the following prerequisites are installed:
- Xcode or Android Studio
- Node.js
- Firebase
- Flutter
- Truffle
- Ganache
- Metamask
- Solidity
- Web3.js
To install the dApp, follow these steps:
- Clone the repository to your computer using the following command:
git clone https://github.com/Kexueyi/dApp_p2p_energy_trading
- Navigate to the project directory and install the dependencies using the following command:
npm install
- Compile the smart contracts using the following command:
truffle compile
- Migrate the smart contracts to the local blockchain using the following command:
truffle migrate
- Start the development server using the following command:
npm run start