Giter VIP home page Giter VIP logo

akkupy / z-vote Goto Github PK

View Code? Open in Web Editor NEW
12.0 2.0 7.0 171 KB

Blockchain Based E-Voting System on Django Framework

License: GNU General Public License v3.0

Python 64.11% HTML 35.89%
blockchain blockchain-technology django django-application django-framework e-voting merkle-tree python python-3 simulation voting-system blockchain-voting hacktoberfest hacktoberfest-accepted hacktoberfest2023

z-vote's Introduction

BlockChain Based E-Voting System

  • This project aims at implementing a voting system based on Blockchain technology.
  • It is a secure, transparent and decentralized way of voting.
  • It converts ballots into transactions and securely mines blocks out of them.
  • The advantage of a blockchain based voting system include the ability to vote from any place and prevent any tampering of votes.

Technology stack used:

  1. Python 3.11.x
  2. Django Web Framework 4.2.1
  3. Bootstrap 4
  4. DB SQLite 3
  5. HTML5

Z-vote Production Server On Docker (click image)

Self-hosting(Development Server)

Simply clone the repository and run the server:

# Install Git First // (Else You Can Download And Upload to Your Local Server)
$ git clone https://github.com/akkupy/Z-Vote.git

# Open Git Cloned File
$ cd Z-Vote

# Config Virtual Env (Skip is already Done.)
$ virtualenv -p /usr/bin/python3 venv
$ . ./venv/bin/activate

# Install All Requirements.
$ pip(3) install -r requirements.txt

# Run makemigrations and migrate command.
$ python(3) manage.py makemigrations poll
$ python(3) manage.py migrate

# Create a Superuser.
$ python(3) manage.py createsuperuser

# Create a .env file(See Below for more details.)

# Start Server
$ python(3) manage.py runserver 0.0.0.0:80
# Head over to http://127.0.0.1/ to see the website.

# Head over to http://127.0.0.1/admin to add the voterlists in 'Voter lists' table and the candidates in the 'Candidates' table.

# Set the Voting Time in 'Vote auths' table(Create only one object and add the start and end time of voting).

# Now the project is ready for Voting!

Environment Variables

  1. Go to API NINJA and signup to obtain the api key for passphrase generation.
  2. Create an Account on TWILIO and Buy a Phone Number to use the OTP Service.

Fill the .env file with the obtained values.

[+] Create a .env file in the root directory for the api tokens
    [-] API_NINJA_API = ''
    [-] TWILIO_ACCOUNT_SID = ''
    [-] TWILIO_AUTH_TOKEN = ''
    [-] TWILIO_PHONE_NUMBER = ''

An Example Of ".env" File

API_NINJA_API = '/ghjf53spoG657vghjygdr0qw==uRVWERV'
TWILIO_ACCOUNT_SID = 'AA3w5fgdrfawd3459faedw4349a3b'
TWILIO_AUTH_TOKEN = 'awd18f3ccac7329thfsf43fd4drgx1'
TWILIO_PHONE_NUMBER = '+134656544'

Screenshots:

Home Page

home

Register Page

register

OTP Page

otp

Registration Successful

reg_succ

Login Page

login

Voting Page

vote

Vote Verification Page

verification

Result

result

Contact Me

telegram

License

GNU GPLv3 Image

This is a Free Software: You can use, study share and improve it at your will. Specifically you can redistribute and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

--This is only a demonstration of the blockchain based voting system and it is entirely a prototype of the technology--

z-vote's People

Contributors

akkupy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  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.