Coder Social home page Coder Social logo

ssharmapavitra / deva Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 2.0 380 KB

DEVA is a simple, minimalistic blockchain-based voting system that enables secure and transparent elections. It leverages the power of blockchain technology to ensure immutability, transparency, and tamper-proofing of voting records. This project provides a decentralized platform for conducting elections, allowing participants to vote securely.

Solidity 6.52% JavaScript 66.86% HTML 23.46% CSS 3.16%
blockchain-technology ethereum ganache-cli smart-contracts web-development security-privacy minimal simple ux-design

deva's Introduction

Simple Decentralized E Voting Application (D.E.V.A)

This is a decentralized e-voting application built on the Ethereum blockchain. It allows for secure and transparent voting using smart contracts.

Overview

The Decentralized E Voting Application is designed to provide a reliable and tamper-proof platform for conducting elections. By leveraging the power of blockchain technology, it ensures transparency, immutability, and integrity throughout the voting process.

Features

  • Secure Voting: The application utilizes blockchain technology to ensure the security of votes. Each vote is recorded on the Ethereum blockchain, making it nearly impossible to alter or manipulate the results.
  • Transparent Process: The voting process is transparent, as all transactions are visible on the blockchain. Anyone can verify the integrity of the election by examining the smart contract and the recorded votes.
  • Candidate Information: The application provides information about the candidates participating in the election. Users can access candidate profiles and make informed decisions before casting their votes.
  • Real-Time Results: The application displays real-time voting results, allowing participants and observers to track the progress of the election. Results are updated as votes are cast and recorded on the blockchain.
  • User-Friendly Interface: The application offers a user-friendly interface, making it easy for voters to participate in the election. The intuitive design ensures a smooth and hassle-free voting experience.

Technologies Used

  • Solidity: Solidity is the programming language used to write the smart contract that governs the voting process on the Ethereum blockchain.
  • Ethereum: The application leverages the Ethereum blockchain to store and validate votes, ensuring security and transparency.
  • React: React is used to build the frontend user interface, providing an interactive and responsive experience for voters.
  • Web3.js: Web3.js is a JavaScript library that interacts with the Ethereum blockchain. It is used to connect the frontend with the smart contract and handle transactions.

Getting Started

Follow these steps to get the Decentralized E Voting Application up and running on your local machine:

  1. Clone the repository: git clone https://github.com/ssharmapavitra/deva.git

  2. Install dependencies: npm install

  3. npm -v

  4. node -v

  5. npm install ganache-cli [email protected]

  6. .\node_modules.bin\ganache-cli

    Now, one Terminal will be busy running Ganache-CLI. Open new Terminal Window and Run Following Commands.

  7. Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser

  8. npm install -g http-server

  9. npm install [email protected]

  10. .\node_modules.bin\solcjs --bin --abi Voting.sol

  11. start node

Node

  1. Web3 = require('web3')

  2. web3 = new Web3("http://localhost:8545")

  3. web3.eth.getAccounts(console.log)

  4. bytecode = fs.readFileSync('Voting_sol_Voting.bin').toString()

  5. abi = JSON.parse(fs.readFileSync('Voting_sol_Voting.abi').toString())

  6. deployedContract = new web3.eth.Contract(abi)

  7. listOfCandidates = ['cand1','cand2','cand3']

  8. deployedContract.deploy({ data: bytecode, arguments: [listOfCandidates.map(name => web3.utils.asciiToHex(name))] }).send({ from: '0x57c4a5b6D3339Bd96a6CF5a83a9Ce7Cd8d37b5c9', // address to be added in web3js gas: 1500000, gasPrice: web3.utils.toWei('0.00003', 'ether') }).then((newContractInstance) => { deployedContract.options.address = newContractInstance.options.address console.log(newContractInstance.options.address)});

Usage

  1. Open the application in your web browser.
  2. Browse the candidate profiles and read their information.
  3. Select your preferred candidate from the list.
  4. Click the "Vote" button to cast your vote.
  5. Monitor the real-time results to see the updated vote count for each candidate.
  6. At the end of the election, view the final poll results.
  7. Optionally, start a new poll by clicking the "New Poll" button.

Contribution

Contributions to the Decentralized E Voting Application are welcome. If you encounter any issues or have suggestions for improvements, please submit a pull request or open an issue on the GitHub repository.

deva's People

Contributors

ssharmapavitra avatar

Stargazers

Ritik Gupta avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.