Skip to content

Secure voting system built with Spring Boot, MySQL, JWT. Supports candidate/party management, user auth, voting, election tracking, and role-based access control.

Notifications You must be signed in to change notification settings

trishanereid/voting-system

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

82 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Voting System - README

Overview

This project is a comprehensive voting system built using Spring Boot for the backend and MySQL for the database. The system includes the following key features:

  1. Spring Boot Backend: The application is built on the Spring Boot framework, providing a robust and scalable foundation.
  2. Spring Security: The system utilizes Spring Security for authentication and authorization, ensuring secure access to the voting functionality.
  3. JWT (JSON Web Tokens): JWT is used for secure token-based authentication, enhancing the overall security of the system.
  4. MySQL Database: The application uses MySQL as the database to store all the relevant data, including candidate information, votes, and user details.
  5. Spring Data JPA: Spring Data JPA is employed to simplify database interaction and provide a robust data access layer.
  6. Email Verification: The system includes email verification functionality using Java Mail Sender, ensuring secure user registration and validation.

ER Diagram

Here's the Entity Relationship (ER) diagram for the voting system:

ER Diagram

The diagram illustrates the key entities and their relationships within the system, including the candidate, party, election, ballot, vote, user, and authority entities.

Technologies Used

  • Spring Boot: The application is built using the Spring Boot framework, providing a streamlined and efficient backend development experience.
  • Spring Security: Spring Security is integrated into the system to handle user authentication and authorization, ensuring secure access to the voting functionality.
  • JWT (JSON Web Tokens): JSON Web Tokens are used for token-based authentication, enhancing the overall security of the system.
  • MySQL: The database used in this project is MySQL, providing a reliable and scalable data storage solution.
  • Spring Data JPA: Spring Data JPA is utilized to simplify database interactions and provide a robust data access layer.
  • Java Mail Sender: The system includes email verification functionality using the Java Mail Sender library, ensuring secure user registration and validation.

Key Features

  1. Candidate and Party Management: The system allows for the creation, modification, and management of candidate and political party information.
  2. Secure User Registration and Authentication: Users can register and authenticate themselves using the provided email verification and JWT-based authentication mechanisms.
  3. Voting Functionality: Authenticated users can cast their votes for the available candidates in an election.
  4. Election Management: The system provides functionality to create, manage, and track the status of elections, including start and end dates, and the ability to mark elections as active or inactive.
  5. Vote Validation: The system ensures that each user can only cast a single vote per election, preventing duplicate votes.
  6. Role-based Access Control: The system implements role-based access control, allowing different levels of access and functionality based on user roles (e.g., admin, voter).

Getting Started

To set up and run the voting system, follow these steps:

  1. Clone the repository to your local machine.
  2. Set up the MySQL database and update the connection details in the application's configuration file.
  3. Build and run the Spring Boot application.
  4. Access the application through the provided URL (e.g., http://localhost:8080).

Future Enhancements

The voting system can be further enhanced with the following features:

  1. Real-time Election Updates: Implement a real-time dashboard or notifications to provide users with up-to-date information on election results and progress.
  2. Multi-language Support: Extend the system to support multiple languages, ensuring accessibility for a diverse user base.
  3. Advanced Reporting and Analytics: Develop comprehensive reporting and analytics capabilities to provide detailed insights into voting trends, voter demographics, and election performance.
  4. Mobile-friendly User Interface: Create a responsive and mobile-friendly user interface to provide a seamless voting experience across various devices.
  5. Blockchain-based Voting: Explore the integration of blockchain technology to enhance the security and transparency of the voting process.

About

Secure voting system built with Spring Boot, MySQL, JWT. Supports candidate/party management, user auth, voting, election tracking, and role-based access control.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages