A production-ready decentralized voting system built on IOTA Layer 1, using Move smart contracts, IOTA Identity for verifiable credentials, and IOTA Notarization for vote anchoring.
The system consists of three main components:
- Move Smart Contracts: Handle voting logic on IOTA Layer 1
- Backend Server: Manages identity verification and vote notarization
- Frontend UI: Provides user interface for registration, verification, and voting
- Secure voter registration with verifiable credentials using IOTA Identity
- Identity verification using IOTA Identity framework
- Anonymous voting with one-vote-per-identity enforcement
- Vote notarization on the IOTA Tangle for public audit
- Real-time results dashboard
- District-based voting support
- Wallet integration for credential management and vote signing
- Node.js (v16+)
- IOTA Move CLI (for smart contract compilation and deployment)
- IOTA CLI (for Tangle interaction)
- Rust (for IOTA SDK compilation)
# Install Rust if not already installed
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# Install IOTA Move CLI
cargo install iota-move-cligit clone https://github.com/yourusername/iota-voting-system.git
cd iota-voting-systemcd backend
npm installcd ../frontend
npm installcd ../contracts
./deploy.shThis script will:
- Compile the Move smart contract
- Generate a new account if needed
- Request funds from the faucet
- Deploy the contract to the IOTA testnet
- Initialize the voting system with candidates and districts
After deployment, the contract address will be saved to contract_address.txt. Update the backend .env file with this address:
cd ../backend
echo "IOTA_MOVE_CONTRACT_ADDRESS=$(cat ../contracts/contract_address.txt)" >> .envcd ../backend
npm startcd ../frontend
npm startIf you encounter any issues with the application, try the following:
-
Clear browser cache and cookies:
- This can resolve issues with localStorage and large request headers
-
Restart both frontend and backend servers:
- Sometimes a clean restart can fix connection issues
-
Check port conflicts:
- Make sure ports 3000 (frontend) and 3001/3002 (backend) are not in use by other applications
-
Verify environment variables:
- Ensure all required environment variables are set correctly in the
.envfiles
- Ensure all required environment variables are set correctly in the
Contributions are welcome! Please feel free to submit a Pull Request.
MIT