Skip to content

Prashant-zHere/VoteWise

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

7 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

VoteWise - Online Voting System

A secure, web-based voting platform designed for educational institutions and organizations to conduct transparent elections with role-based access control.

Features

Multi-Role Authentication

  • Admin: Complete system management and oversight
  • Candidates: Registration, profile management, and campaign information
  • Voters: Secure voting interface with ballot casting

Core Functionality

  • Candidate Registration: Self-registration with approval workflow
  • Position Management: Create and manage electoral positions
  • Secure Voting: One-vote-per-position system with voter verification
  • Real-time Results: Live vote counting and analytics
  • PDF Reports: Generate printable election results
  • Dashboard Analytics: Visual charts and statistics for administrators

Security Features

  • Session-based authentication
  • Role-based access control
  • Unique voter identification
  • Vote integrity protection

Technology Stack

  • Backend: PHP 7.4+
  • Database: MySQL/MariaDB
  • Frontend: HTML5, CSS3, JavaScript
  • Charts: Chart.js for data visualization
  • PDF Generation: TCPDF library
  • Server: Apache/Nginx with PHP support

Installation

Prerequisites

  • Web server (Apache/Nginx)
  • PHP 7.4 or higher
  • MySQL 5.7+ or MariaDB 10.2+
  • phpMyAdmin (recommended for database management)

Setup Steps

  1. Clone the repository

    git clone <repository-url>
    cd online-voting-system
  2. Database Setup

    • Create a new MySQL database named online_voting
    • Import the database schema:
      mysql -u root -p online_voting < db/online_voting_db.sql
  3. Configure Database Connection

    • Edit include/conn/conn.php
    • Update database credentials:
      $conn = mysqli_connect("localhost", "username", "password", "online_voting");
  4. Set File Permissions

    chmod 755 include/photo/
    chmod 644 include/css/*
    chmod 644 include/js/*
  5. Web Server Configuration

    • Point document root to project directory
    • Ensure PHP modules are enabled: mysqli, session, gd

Default Credentials

Admin Access

  • ID: admin
  • Password: admin
  • Email: abc@gmail.com

Test Accounts

The system includes sample voters and candidates for testing purposes. Check the database for complete test data.

Project Structure

β”œβ”€β”€ admin/                  # Admin panel and management
β”‚   β”œβ”€β”€ pages/             # Admin page components
β”‚   └── *.php             # Admin functionality files
β”œβ”€β”€ user/                  # User interfaces
β”‚   β”œβ”€β”€ candidate/        # Candidate dashboard and features
β”‚   └── voter/           # Voter interface and voting system
β”œβ”€β”€ include/              # Shared resources
β”‚   β”œβ”€β”€ conn/            # Database connection and session management
β”‚   β”œβ”€β”€ css/             # Stylesheets
β”‚   β”œβ”€β”€ js/              # JavaScript files
β”‚   β”œβ”€β”€ img/             # System images
β”‚   └── photo/           # User profile photos
β”œβ”€β”€ db/                   # Database schema and setup
β”œβ”€β”€ tcpdf/               # PDF generation library

Usage Guide

For Administrators

  1. Login with admin credentials
  2. Manage positions, candidates, and voters
  3. Approve/reject candidate registrations
  4. Monitor voting progress and results
  5. Generate PDF reports

For Candidates

  1. Register through the candidate registration page
  2. Wait for admin approval
  3. Access candidate dashboard after approval
  4. Update profile and campaign information

For Voters

  1. Login with voter credentials
  2. View available positions and candidates
  3. Cast votes (one per position)
  4. View confirmation of submitted votes

Database Schema

Core Tables

  • admin: System administrators
  • candidates: Registered candidates with approval status
  • voters: Registered voters
  • positions: Electoral positions/offices
  • votes: Cast votes linking voters to candidates

Key Relationships

  • Candidates belong to specific positions
  • Votes link voters to candidates for specific positions
  • One vote per voter per position constraint

Security Considerations

  • Change default admin credentials immediately
  • Use HTTPS in production environments
  • Implement proper input validation and sanitization
  • Regular database backups recommended
  • Monitor for suspicious voting patterns

Customization

Styling

  • Modify CSS files in include/css/ directory
  • Update logos and images in include/img/

Functionality

  • Extend user roles by modifying authentication logic
  • Add new fields to candidate/voter profiles
  • Customize voting rules and restrictions

Troubleshooting

Common Issues

  1. Database Connection Failed

    • Verify database credentials in conn.php
    • Ensure MySQL service is running
  2. Photo Upload Issues

    • Check file permissions on include/photo/ directory
    • Verify PHP file upload settings
  3. Session Problems

    • Ensure PHP sessions are properly configured
    • Check session file permissions

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Test thoroughly
  5. Submit a pull request

About

πŸ—³οΈ Online Student Voting System. A web-based system for schools and colleges to conduct secure and easy online student elections πŸš€πŸ”

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages