A decentralized voting application built on the Sui blockchain, featuring a modern React frontend and Move smart contracts.
- Secure and transparent voting system on Sui blockchain
- Modern React frontend with TypeScript
- Real-time vote tracking and results
- User-friendly interface with Tailwind CSS
- Smart contract-based vote management
- Wallet integration with Sui
- Node.js (v18 or higher)
- pnpm package manager
- Sui CLI
- A Sui wallet (for development and testing)
git clone <repository-url>
cd voting-appcargo install --locked --git https://github.com/MystenLabs/sui.git --branch devnet sui# Create a new Sui wallet
sui client new-address ed25519
# Get test tokens from devnet faucet
sui client faucetcd frontend
pnpm installThe smart contracts are located in the contracts/voting_system directory. They are written in Move and handle the core voting logic.
To build the contracts:
cd contracts/voting_system
sui move buildTo run tests:
sui move testTo deploy to devnet:
sui client publish --gas-budget 10000000The frontend is built with React, TypeScript, and Vite. It uses Tailwind CSS for styling and includes Sui wallet integration.
To start the development server:
cd frontend
pnpm devTo build for production:
pnpm buildvoting-app/
├── contracts/
│ └── voting_system/
│ ├── sources/ # Move smart contract source files
│ ├── tests/ # Contract test files
│ └── Move.toml # Move package configuration
├── frontend/
│ ├── src/
│ │ ├── components/ # Reusable React components
│ │ ├── views/ # Page components
│ │ ├── providers/ # Context providers
│ │ ├── config/ # Configuration files
│ │ └── assets/ # Static assets
│ ├── public/ # Public assets
│ └── package.json # Frontend dependencies
└── README.md
The smart contract configuration is in contracts/voting_system/Move.toml. After deployment, update the package address in this file with your deployed contract address.
The frontend configuration is in frontend/src/config/. Update the following files as needed:
- Network configuration
- Contract addresses
- API endpoints
- All voting transactions are recorded on the Sui blockchain
- Smart contracts are audited and tested
- Frontend implements secure wallet connection
- User authentication through Sui wallet
cd contracts/voting_system
sui move testcd frontend
pnpm test- Build the contracts:
cd contracts/voting_system
sui move build- Deploy to Sui network:
sui client publish --gas-budget 10000000- Update the contract address in the frontend configuration
- Build the frontend:
cd frontend
pnpm build- Deploy the built files to your hosting service
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Sui Blockchain
- React Team
- Move Language Team
- All contributors and supporters
For support, please open an issue in the repository or contact the maintainers.