Skip to content

Repository files navigation

πŸ—³οΈ Online Voting System for Elections

A secure, transparent, and user-friendly Online Voting Platform built using Python (Flask Framework).
This project aims to modernize traditional voting by enabling digital participation while ensuring security, integrity, and accessibility for all users.


🌟 Why Online Voting?

Elections are the backbone of democracy, but manual voting often suffers from:

  • Long queues & delays in counting
  • Possibility of human error
  • Limited accessibility for remote voters
  • Security challenges like ballot tampering

This project addresses these challenges with a digital-first solution that is:

  • πŸ›‘οΈ Secure – Encrypted data, no duplicate voting
  • ⚑ Efficient – Real-time result computation
  • 🌍 Accessible – Remote voting for registered users
  • πŸ“Š Transparent – Admin dashboard for monitoring

✨ Key Features

πŸ‘€ Voter Module

  • Voter registration & authentication
  • Passwords stored securely with bcrypt hashing
  • One vote per user validation
  • Intuitive voting interface

πŸ—³οΈ Voting Process

  • Cast vote digitally with one click
  • Automatic confirmation message
  • Real-time update of voting records

πŸ‘¨β€πŸ’Ό Admin Module

  • Manage elections (start/end sessions)
  • Add/remove voters
  • View live results with candidate-wise breakdown
  • Export data for auditing

πŸ” Security

  • Encrypted password storage (bcrypt)
  • Plans for AES encryption of vote data
  • Duplicate voting prevention
  • Blockchain integration (future scope) for immutable logs

🌐 Accessibility

  • Simple, mobile-friendly web interface
  • Can be deployed on cloud for remote access
  • Language localization support (planned)

πŸ“‚ Project Structure

.
β”œβ”€β”€ admFunc.py          # Admin functionalities
β”œβ”€β”€ Admin.py            # Admin logic (login, results)
β”œβ”€β”€ dframe.py           # Data management using pandas
β”œβ”€β”€ homePage.py         # Homepage routing
β”œβ”€β”€ LICENSE             # Open-source license
β”œβ”€β”€ Project Report.pdf  # Project documentation
β”œβ”€β”€ README.md           # Documentation file
β”œβ”€β”€ registerVoter.py    # Registration logic
β”œβ”€β”€ Server.py           # Flask server entry point
β”œβ”€β”€ voter.py            # Voter-related logic
β”œβ”€β”€ VotingPage.py       # Voting page logic
β”œβ”€β”€ static/             # CSS, JS, images
└── templates/          # HTML templates

πŸš€ Getting Started

πŸ”§ Prerequisites

Make sure the following are installed:

  • Python 3.8+
  • pip (Python package manager)
  • Git

πŸ“₯ Clone the Repository

git clone https://github.com/your-username/online-voting-system.git
cd online-voting-system

πŸ“¦ Install Dependencies

pip install flask bcrypt pandas

(Optional) Use a virtual environment:

python -m venv venv
source venv/bin/activate   # For Linux/Mac
venv\Scripts\activate      # For Windows

▢️ Running the Application

  1. Start the Flask server:
    python Server.py
  2. Open your browser and go to:
    http://127.0.0.1:5000/
    
  3. Register as a voter, log in, and cast your vote.
  4. Admin can log in via the admin route and view live results.

πŸ§ͺ Example Workflow

  1. Registration β†’ User signs up with secure credentials.
  2. Login β†’ Authentication via username & password.
  3. Voting β†’ User casts vote for their candidate.
  4. Confirmation β†’ System acknowledges successful vote.
  5. Admin Monitoring β†’ Admin views live tally in dashboard.

πŸ“Š Results Management

  • Votes stored securely in votes.csv
  • Admin can generate reports & export data
  • Results update in real-time

πŸ›‘οΈ Security Details

  • bcrypt hashing for password security
  • Planned: AES encryption for sensitive data
  • Planned: Blockchain-based storage for immutable voting records
  • Role-based access (Voter vs Admin)

πŸ› οΈ Tech Stack

  • Frontend: HTML, CSS, Bootstrap (templates)
  • Backend: Python (Flask Framework)
  • Database: Pandas (CSV-based), extendable to MySQL/PostgreSQL
  • Authentication: bcrypt hashing
  • Deployment Options: Localhost / Cloud (Heroku, AWS, etc.)

🀝 Contribution Guidelines (for GSSoC 2025)

We welcome contributions from GSSoC contributors and the open-source community!

Steps to Contribute:

  1. Fork this repository
  2. Clone your fork:
    git clone https://github.com/your-username/online-voting-system.git
  3. Create a new branch:
    git checkout -b feature-name
  4. Commit your changes:
    git commit -m "Added feature: X"
  5. Push to your fork:
    git push origin feature/branch-name
  6. Open a Pull Request (PR) with:
    • Clear description of changes
    • Screenshots (if applicable)

πŸ“œ License

This project is licensed under the MIT License – see the LICENSE file for details.


πŸ“– Future Enhancements

  • βœ… Integration with SQL/NoSQL database
  • βœ… Blockchain-based vote recording
  • βœ… Multi-factor authentication (OTP/Email)
  • βœ… Support for large-scale elections with load balancing
  • βœ… Deployment on cloud platforms (AWS/Heroku/DigitalOcean)

πŸ™Œ Acknowledgements

  • Developed as part of CSE Dept, CIT Mandya (2024–25)
  • Open for contributions via GirlScript Summer of Code (GSSoC) 2025
  • Inspired by the need for transparent, digital elections

About

online voting system using python

Resources

Code of conduct

Security policy

Stars

10 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages