Skip to content

A decentralized voting system built on web 3.0 technologies, utilizing blockchain and smart contracts to ensure transparency, security, and tamper-proof voting processes.

License

Notifications You must be signed in to change notification settings

crown-of-napoleon/Dencentralized-Voting-System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Decentralized Voting System

A decentralized voting system built on the Ethereum blockchain, allowing users to create and participate in secure, transparent, and tamper-proof polls.

Features

  1. Create polls with a title, IPFS hash for poll details, and a specified number of options

  2. Vote in existing polls using unique poll IDs and option indexes

  3. Store votes immutably on the Ethereum blockchain

  4. Maintain transparency and security throughout the voting process

  5. Protect user privacy using decentralized identifiers (DIDs)

Project Structure and Files

contracts/VotingSystem.sol: This Solidity file contains the smart contract code for the decentralized voting system. The contract manages poll creation, voting, and vote storage on the Ethereum blockchain.

migrations/1_initial_migration.js: This migration file, generated by Truffle, deploys the Migrations contract. The Migrations contract helps keep track of the migration state when deploying smart contracts.

migrations/2_deploy_contracts.js: This migration file deploys the VotingSystem smart contract to the specified Ethereum network. It imports the smart contract and uses Truffle's deployer.deploy() method to deploy it.

src/index.html: The main HTML file containing the structure and layout of the frontend application. It includes forms for creating polls and voting, as well as script tags to load the app.js file.

src/js/app.js: This JavaScript file handles the frontend logic for interacting with the Ethereum blockchain and the VotingSystem smart contract. It uses web3.js to connect to the Ethereum network, create polls, and submit votes.

truffle-config.js: This configuration file sets up the development environment and networks for the Truffle project. It specifies details such as the Ethereum network to deploy to, the Solidity compiler version, and other settings.

package.json: The Node.js package file containing metadata about the project and its dependencies.

build/: This directory is generated by Truffle when you compile your smart contracts. It contains the compiled contract JSON files, which include the contract ABI and other metadata.

Prerequisites

  1. Node.js
  2. Truffle (npm install -g truffle)
  3. A local Ethereum development environment, such as Ganache
  4. An Ethereum wallet with mnemonic, such as MetaMask

About

A decentralized voting system built on web 3.0 technologies, utilizing blockchain and smart contracts to ensure transparency, security, and tamper-proof voting processes.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published