https://github.com/therealpad/election-web3
Web3 App
https://github.com/therealpad/election-web3
blockchain bootstrap css elections html javascript web3
Last synced: about 2 months ago
JSON representation
Web3 App
- Host: GitHub
- URL: https://github.com/therealpad/election-web3
- Owner: TheRealPad
- License: mit
- Created: 2024-04-22T06:32:01.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2024-04-22T06:32:59.000Z (about 2 years ago)
- Last Synced: 2024-04-24T05:24:22.053Z (about 2 years ago)
- Topics: blockchain, bootstrap, css, elections, html, javascript, web3
- Language: JavaScript
- Homepage:
- Size: 535 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Voting system
This is a voting system using the blockchain concept
## Dependencies
- Node
- Truffle ```npm install -g truffle```
- [Ganache](https://archive.trufflesuite.com/ganache/)
- [Metamask](https://metamask.io/)
You will need to connect your Ganache server to localhost, you can follow this [tutorial](https://docs.cranq.io/web-3/setting-up-ganache-with-metamask)
You can import ETH from your ganache account
## How to use
### Run the project
1. ```truffle migrate``` or ```truffle migrate --reset``` if you want to chaneg your smart contracts
2. ```npm run dev``` the application will be accessible on [http://localhost:3000](http://localhost:3000)
3. ```truffle test``` to run the unit test
### Change the candidates
You can add/update the candidate list in [Election.sol](./contracts/Election.sol) in the constructor
```sol
constructor () public {
addCandidate("Candidate 1");
addCandidate("Candidate 2");
}
```