Mini Project Final Report Grp-11
Mini Project Final Report Grp-11
Submitted by
i
MAR BASELIOS INSTITUTE OF TECHOLOGY AND SCIENCE
NELLIMATTOM P.O, KOTHAMANGALAM, KERALA
BONAFIDE CERTIFICATE
This is to certify that the report on ONLINE VOTING SYSTEM is a bonafide record of
Mini Project presented by JOVITTA PAUL (MBI22CS073), PRISCILLA VINOD
(MBI22CS099), SANIYA BENNY (MBI22CS106), SREELAKSHMI AJI
(MBI22CS114) in partial fulfillment of requirements for the award of the degree of Bachelor
of Technology in Computer Science and Engineering of APJ Abdul Kalam
Technological University, Thiruvananthapuram during the academic year 2024- 2025.
ii
ACKNOWLEDGEMENT
First and foremost, We thank ALMIGHTY GOD who gave us the inner strength, resource
and ability to complete our work successfully, without which all our efforts would have been
in vain.
We sincerely thank Dr. Thomas George, our principal for providing the facilities and support
that enabled the successful completion of this phase of the project.
We express our deep sense of gratitude to Prof. Bonia Jose, HOD In-charge of Computer
Science and Engineering for her insightful comments, encouragements and critical inquiries,
which inspired us to widen our project from various perspectives. We would like to extend our
gratitude to Prof. Bini V C, Assistant Professor, CSE Department for the creative suggestions,
valuable advices, mental support and guidance as project coordinator.
Words are insufficient to express our heartfelt and sincere gratitude to our guide who have
suggested a relevant and interesting project topic and paved the way to the successful
completion of this phase of the project. With great respect and gratitude, We acknowledge our
guide Prof. Sreedevi R, Assistant Professor, Department of CSE for her valuable guidance,
great inspiration and moral support throughout the period of our project work. We are indebted
to her for the valuable time she has spared throughout this work.
We use this opportunity to thank all faculties in the department and the friends who have
helped us to complete the project, with their inspiration and cooperation.
iii
ABSTRACT
The Online Voting System is a web-based platform designed to provide a secure, efficient, and
transparent method for conducting elections. Traditional voting methods, including paper ballots
and electronic voting machines, often face challenges such as security vulnerabilities, logistical
inefficiencies, and accessibility barriers. To address these issues, this system leverages modern
web technologies and biometric authentication using face recognition. The system consists of two
main modules: the User Module, where registered voters can authenticate themselves and cast
their votes, and the Admin Module, which facilitates election setup, candidate management, and
result monitoring. The integration of face recognition technology ensures that only legitimate
users can participate, reducing the risks of fraud and impersonation. The system also automates
vote tallying and result generation, minimizing human errors and ensuring accuracy. Developed
using CSS, HTML, JavaScript, Python django, OpenCV, and SQLITE3, the platform is
designed for scalability and can be deployed for various types of elections. Key features include
real-time voting monitoring, secure authentication, encrypted vote storage, and user-friendly
accessibility. While the system enhances security and efficiency, it has some limitations, such as
internet dependency, potential cyber threats, and face recognition accuracy variations.
However, with proper implementation, it offers a cost-effective, reliable, and modernized
approach to voting, making elections more accessible and trustworthy. This project aims to
contribute to the advancement of digital democracy, ensuring a fair and transparent voting
experience while addressing the limitations of conventional electoral systems.
iv
TABLE OF CONTENTS
ACKNOWLEDGEMENT iii
ABSTRACT iv
LIST OF FIGURES vii
LIST OF TABLES viii
ABBREVIATIONS ix
1. INTRODUCTION 10
1.1 Background and motivation 10
1.2 Proposed system 11
1.3 Project scope 12
1.3.1 Limitations and existing system 13
1.3.2 Advantages of proposed system 14
2. SYSTEM ANALYSIS 16
2.1 Introduction 16
2.2 Stakeholders of the Project 17
2.2.1 Admin 17
2.2.2 Users 17
2.3 Feasibility Study 18
2.4 Software Development Lifecycle Model 20
2.5 Hardware and Software requirements 21
2.5.1 Software Specifications 21
2.5.2 Hardware Requirements 27
3. SYSTEM DESIGN 28
3.1 System Architecture 28
3.2 Module Design 28
3.3 Database Design 29
3.3.1 Tables 30
3.3.2 Introduction to Data Flow Diagrams 32
3.3.3 Data Flow Diagram 34
3.3.4 ER Diagram 35
3.3.5 Use Case Diagram 36
v
4. IMPLEMENTATION 38
4.1 Sample Code 39
5. TESTING 53
5.1 Test Cases 53
5.1.1 Unit Testing 54
5.1.2 Integration Testing 55
5.1.3 Black Box Testing 55
5.1.4 White Box Testing 56
5.1.5 Validation Testing 57
5.1.6 User Acceptance Testing 57
5.2 Test Case Documents 58
6. CONCLUSION 60
6.1 Future Enhancements 60
REFERENCES 63
APPENDIX 64
vi
Online Voting System
LIST OF FIGURES
5.4 ER Diagram 32
LIST OF TABLES
7.2 Election 27
7.3 Vote 27
7.4 Candidate 28
7.5 Voter 28
7.6 User 28
LIST OF ABBREVIATIONS
CHAPTER 1
INTRODUCTION
The traditional voting process has long been the backbone of democratic systems, ensuring
fair and legitimate elections. However, traditional voting methods, such as paper ballots and
electronic voting machines, often present challenges such as long queues, logistical
inefficiencies, risks of fraud, and human error. With advancements in technology, online
voting systems have emerged as a viable alternative to enhance efficiency, security, and
accessibility.
The Online Voting System proposed in this project leverages modern web technologies and
facial recognition to create a seamless and secure voting experience. Developed using
HTML, CSS, JavaScript, OpenCV, and Python django,SQLITE3 this system ensures that
only authorized users can cast their votes, reducing the risks of fraud and unauthorized access.
The motivation behind developing this online voting system stems from several key factors:
⚫ Enhanced Security: Traditional voting systems are prone to issues such as vote
tampering, impersonation, and double voting. The integration of face recognition
technology ensures that only legitimate voters can cast their votes, thus minimizing
electoral fraud.
⚫ Transparency and Trust: By allowing real-time vote monitoring and result tracking, the
system increases transparency and trust among voters and election organizers.
System Description:
The Voting Management System will consist of two primary modules: User Module and
Admin Module. Users can authenticate using face recognition and cast their votes, while
admins can create and manage elections, view results, and monitor the voting process.
⚫ Face Recognition Login: Users authenticate using their facial features captured via
webcam.
⚫ User Dashboard: A user can view available elections and cast their vote.
⚫ Vote Casting: After successful authentication, users can vote for candidates or options in
an election.
⚫ Admin Dashboard: Admins can create elections, add candidates/options, and view real-
time election results.
⚫ Result Management: Automatic tallying of votes and displaying results after the voting
period ends.
Technologies Used:
⚫ Backend: Python django and SQLITE3 for database management and processing.
⚫ Enhanced Security: The face recognition system prevents unauthorized users from
voting.
⚫ User-Friendly Interface: A well-designed and intuitive dashboard ensures ease of use.
⚫ Real-time Monitoring: Admins can oversee elections and intervene if necessary.
⚫ Scalability: The system can be deployed for various types of elections, from institutional
voting to governmental elections.
⚫ Transparency & Accuracy: The automated tallying and verification process reduces
human errors and increases election integrity.By implementing this system, the voting
process can be modernized while maintaining high security, transparency, and ease of
use for both voters and administrators
The scope of this Online Voting System project encompasses the design, development, and
deployment of a secure and efficient web-based platform for conducting elections. The
system aims to provide a user-friendly experience for both voters and administrators while
ensuring high levels of security and transparency.
OBJECTIVES
To develop a web-based online voting platform that allows registered users to cast their
votes remotely. To integrate face recognition technology for secure user authentication and
fraud prevention. To automate the vote counting and result generation process for efficiency
and accuracy. To provide real-time election monitoring for administrators. To ensure the
system is scalable, allowing it to be used for different types of elections, such as institutional,
organizational, or governmental elections.
Functional Scope
⚫ User Features:
Technical Scope
Limitations
1. Election Guard
⚫ The system has been used in pilot programs for military and overseas voters in several
U.S. states and for party conventions
3. Democracy Live
⚫ Democracy Live offers OmniBallot, a cloud-based ballot delivery and return system.
⚫ It's designed to be accessible across multiple devices and has been used in over 1,000
elections across the U.S.
⚫ The platform focuses particularly on accessibility for voters with disabilities and those
serving overseas.
⚫ User Experience Focus: It shows detailed user interaction steps including profile
management, candidate selection, and vote confirmation. ElectionGuard is more of a
backend verification technology and doesn't prescribe specific user experience elements.
⚫ Result Transparency: Your system appears to include result viewing and statistics
components, making election results more immediately accessible than ElectionGuard's
verification system which requires technical knowledge to interpret.
⚫ Transparency in Process Flow: Our project explicitly shows the vote casting,
verification, and confirmation steps, creating a more transparent process for users. Voatz
has been criticized for its lack of transparency in how votes are processed and verified.
⚫ User Control Features: Your system includes user profile management and the ability
to view personal voting statistics, giving voters more agency and information about
their participation than voatz typically provide.
CHAPTER 2
SYSTEM ANALYSIS
2.1 Introduction
Elections play a vital role in democratic societies, ensuring that citizens can exercise their
right to vote and choose their representatives. However, traditional voting methods, such as
paper ballots and electronic voting machines (EVMs), come with various challenges,
including security vulnerabilities, logistical inefficiencies, and accessibility barriers. To
address these concerns, online voting systems have emerged as a modern solution, offering
enhanced security, convenience, and efficiency.
The proposed Online Voting System with Face Recognition aims to provide a secure and
transparent platform for conducting elections. By integrating biometric authentication
through face recognition technology, the system ensures that only eligible voters can
participate, minimizing the risks of fraud and impersonation. This approach enhances election
integrity by preventing unauthorized access and multiple voting attempts.
The system consists of two primary modules: the User Module and the Admin Module. The
User Module allows voters to register, authenticate using facial recognition, and cast their
votes securely. The Admin Module enables election management, candidate registration,
real-time monitoring, and automated result tallying.
Developed using CSS, JavaScript, Bootstrap, OpenCV, SQLITE3 and Python django,
this web-based platform ensures ease of access and scalability. Security measures such as
data encryption, user authentication, and real-time monitoring further strengthen the integrity
of the system.
This project aims to modernize the electoral process by providing a secure, efficient, and
accessible voting platform. With its advanced authentication features, automated processing,
and user-friendly interface, the system contributes to the evolution of digital democracy,
making elections more reliable and transparent.
2.1.1 ADMIN
⚫ Election Officials: Handle voter registration, set up elections, and oversee the voting
process.
⚫ Technical Support Team: Ensures system functionality, resolves technical issues, and
updates software.
⚫ Security Team: Monitors and prevents cyber threats, ensuring data integrity and secure
access.
⚫ Database Administrators: Manage voter databases, election data, and ensure backup
and recovery mechanisms.
⚫ Auditors and Compliance Officers: Verify the election process, ensuring transparency
and adherence to regulations.
⚫ Government or Institutional Supervisors: Oversee the system to ensure it aligns with
legal and ethical standards.
2.1.2 USERS
⚫ Registered Voters: Users who register, verify their identity through face recognition,
and cast their votes.
⚫ User Support Team: Provides assistance to voters facing technical or authentication
issues.
⚫ Election Monitors: Ensure fair and smooth voting operations, assisting users if
necessary.
⚫ System Interface Designers: Responsible for creating an accessible and user-friendly
voting experience.
⚫ Legal and Compliance Officers: Ensure that users' rights are protected and that the
voting process complies with regulations.
⚫ Data Privacy Officers: Protect user data and ensure that personal information remains
confidential and secure.
The feasibility of the project is analyzed in this phase and business proposal is put forth with
a very general plan for the project and some cost estimates. During system analysis the
feasibility study of the proposed system is to be carried out. This is to ensure that the
proposed system is not a burden to the company. For feasibility analysis, some understanding
of the major requirements for the system is essential.
⚫ ECONOMICAL FEASIBILITY
⚫ TECHNICAL FEASIBILITY
⚫ OPERATIONAL FEASIBILITY
ECONOMICAL FEASIBILITY
⚫ Initial development costs include software, server hosting, and biometric authentication
setup.
⚫ Reduced costs compared to traditional election methods (paper ballots, polling stations,
and logistics).
⚫ Cost savings in the long run due to automation and reduced manpower requirements.
TECHNICAL FEASIBILITY
⚫ The system is developed using CSS, JavaScript, Bootstrap, SQLITE3, OpenCV, and
Python django, which are widely used and well-supported technologies.
⚫ Face recognition technology ensures high security and user authentication, leveraging
OpenCV and deep learning models.
⚫ The system requires a stable internet connection and camera access for face recognition.
⚫ Objective: To determine if the required technology and expertise are available to build
and maintain the system.
⚫ Technology Requirements:
The system requires the following technologies:
⚫ Backend: Python (Django Framework) for server-side processing.
⚫ Frontend: HTML, CSS, Bootstrap for the user interface.
⚫ Database: SQLite3 for database management and storage.
⚫ Face Recognition: OpenCV and Python for integrating face recognition technology for
voter authentication.
⚫ Web Interface: JavaScript for capturing webcam images for face recognition.
⚫ System Infrastructure:
The system will require a web server for hosting the application and a database server
for managing voter, candidate, and election data. The users will access the system
through their web browsers on personal devices (computers or smartphones).
⚫ Security Considerations:
Security is a key concern, especially when handling sensitive data like facial recognition
images and voter credentials. The system will use:
⚫ Encryption: SSL/TLS encryption for secure data transmission.
⚫ Two-factor authentication (2FA): To add an extra layer of security for voter
registration and login.
⚫ Firewall and Intrusion Detection Systems: To monitor and secure the system from
external threats.
⚫ Hardware Requirements:
⚫ For Admin: A computer or laptop with an internet connection.
⚫ For Users (Voters and Candidates): Any device with a webcam for facial recognition
and internet access.
⚫ Feasibility:
Given the availability of required technologies, software frameworks, and the increasing
development in face recognition algorithms, the system is technically feasible.
OPERATIONAL FEASIBILITY
⚫ The system is user-friendly, providing an intuitive interface for voters and administrators.
⚫ Secure authentication eliminates fraud and enhances election integrity.
⚫ Administrators can efficiently manage elections with automated result tallying and
monitoring.
⚫ The system must comply with data privacy laws such as the GDPR and local election
regulations.
⚫ Voter data security and confidentiality are ensured through encryption and access
controls.
⚫ Ethical considerations include providing access to all eligible voters and preventing bias
in face recognition models.
The development of the Online Voting System with Face Recognition follows the
Waterfall SDLC Model, ensuring a structured and sequential development process. The
key phases include:
1. Requirement Analysis:
2. System Design:
Designing the system architecture, database schema, and user interface.Planning security
measures such as encryption and authentication.
3. Implementation:
Developing the system using CSS, SQLITE3, JavaScript, OpenCV, and Python django.
Integrating face recognition for voter authentication.
4. Testing:
Conducting unit testing, integration testing, and system testing.Identifying and fixing
security vulnerabilities and functional errors.
5. Deployment:
Hosting the system on a server and making it accessible to users.Ensuring scalability and
performance optimization.
The Waterfall Model is chosen due to its structured approach, ensuring each phase is
completed before progressing to the next. This model ensures a reliable and secure voting
system with well-defined requirements and comprehensive testing before deployment.
HTML
HTML, or Hypertext Markup Language, serves as the backbone of the World Wide Web,
providing a standardized way to create and structure web pages. It consists of a series of
elements, each enclosed within tags, which define the content and layout of a webpage.
HTML elements range from basic elements like paragraphs (<p>), headings (<h1> to <h6>),
and links (<a>), to more complex elements like tables (<table>), forms (<form>), and
multimedia embeds (<img>, <audio>,<video>). It employs a hierarchical structure to
organize content, allowing developers to nest elements within each other to create complex
page layouts.
For example, a <div> element can contain multiple other elements, enabling developers to
group and organize content sections. Additionally, HTML attributes provide additional
information about elements, modifying their behavior or appearance. Attributes like "src" in
an <img> tag specify the source URL of an image, while the "href" attribute in an <a> tag
defines the destination URL of a hyperlink.
HTML5, the latest version of HTML, introduced several new features and elements to
enhance web development capabilities. Semantic elements such as <header>, <footer>,
<nav>, and <article> provide clearer structure and meaning to web pages, improving
accessibility and search engine optimization. HTML5 also introduced native support for
multimedia elements like <audio> and <video>, allowing developers to embed rich media
content directly into web pages without relying on third-party plugins. Additionally, HTML5
introduced new form input types like email, tel, and date, making it easier to create user-friendly
and interactive web forms.
CSS
CSS is a style sheet language used for describing the presentation of a document written in a
markup language. Although most often used to set the visual style of web pages and user
interfaces written in HTML and XHTML, the language can be applied to any XML
document, including plain XML, SVG andXUL, and is applicable to rendering in speech, or
on other media. Along with HTML and JavaScript, CSS is a cornerstone technology used
by most websites to create visually engaging webpages, user interfaces for web applications,
and user interfaces for many mobile applications.
This separation of formatting and content makes it possible to present the same markup
page in different styles for different rendering methods, such as on-screen, in print, by voice
(when read out by a speech-based browser orscreen reader) and on Braille-based, tactile
devices. It can also be used to display the web page differently depending on the screen size
or device on which it is being viewed. Although the author of a web page typically links to a
CSS file within the markup file, readers can specify a different style sheet, such as a CSS
file stored on their own computer, to override the one the author has specified. If the author
or the reader did not link the document to a style sheet, the default style of the browser will
be applied. Another advantage of CSS is that aesthetic changes to the graphic design of a
document (or hundreds of documents) can be applied quickly and easily, by editing a few
lines in one file, rather than by a laborious (and thus expensive) process of crawling over
every document line by line, changing markup.
JAVASCRIPT
JavaScript plays a crucial role in an online voting system by enhancing interactivity, ensuring
real-time data validation, and improving the overall user experience. It is used to create
dynamic and responsive interfaces, allowing voters to easily navigate through the system,
select candidates, and submit their votes seamlessly. JavaScript, often combined with
frameworks like React or Vue.js, helps in managing client-side functionalities such as form
validation, preventing multiple submissions, and displaying instant feedback messages.
Additionally, JavaScript can be integrated with AJAX to communicate with the server
asynchronously, ensuring real-time vote updates without requiring page reloads. Security
measures, such as input sanitization and CAPTCHA implementation, can also be enforced
using JavaScript to prevent automated voting or malicious activities. Moreover, it enables
encryption techniques like JSON Web Tokens (JWT) for secure authentication and
authorization of voters. In summary, JavaScript enhances the efficiency, security, and
usability of an online voting system by providing a seamless, real-time, and interactive
voting experience
SQLITE3
database management system (RDBMS) designed for efficiency and ease of use. Unlike
traditional databases such as MySQL or PostgreSQL, SQLite does not require a separate
server process and operates directly from a single database file stored on disk. This makes it
an excellent choice for embedded systems, mobile applications, and lightweight desktop
software. One of SQLite’s key advantages is its minimal footprint, with the entire library
being less than 1MB in size, making it ideal for resource-constrained environments like IoT
devices and mobile phones. Additionally, SQLite is ACID-compliant, ensuring reliable
transactions and data integrity even in cases of system crashes or power failures. It supports
a wide range of SQL operations,SQLite performs exceptionally well in applications that
require quick data retrieval, such as web browsers, where it is used to store history, cookies,
and cache (e.g., in Google Chrome and Mozilla Firefox). Moreover, its ease of integration
and low memory usage make it a preferred choice for mobile applications like WhatsApp
and other local storage-based apps. However, despite its advantages, SQLite is not suitable
for high-concurrency, large-scale applications, as it supports limited write operations and
lacks built-in user authentication and access control. Nevertheless, for small to medium-sized
applications that require a simple, reliable, and portable database solution, SQLite remains a
highly efficient and widely adopted choice.
Python django
Django is a high-level Python web framework that enables rapid development and clean,
pragmatic design for web applications. It follows the Model-View-Template (MVT)
architectural pattern, providing developers with a structured and scalable approach to building
web applications. Django comes with a built-in Object-Relational Mapping (ORM) system,
allowing seamless interaction with databases without writing complex SQL queries. It also
includes an admin panel, authentication system, and security features such as protection
against SQL injection, cross-site scripting (XSS), and cross-site request forgery (CSRF). One
of Django’s key strengths is its “batteries-included” philosophy, which means it provides a
comprehensive set of tools and libraries needed for web development, reducing the need for
third-party dependencies. It supports multiple databases, including SQLite, PostgreSQL,
MySQL, and Oracle, making it flexible for various applications. Django is widely used for
building scalable web applications, ranging from small projects to large platforms like
Instagram, Pinterest, and Mozilla. With its emphasis on reusability, rapid development,
Department of Computer Science and Engineering,MBITS 23
Online Voting System
and security, Django is a preferred choice for developers who want to build robust,
maintainable, and high-performance web applications.
VS CODE
Visual Studio Code (VS Code) is a lightweight but robust source code editor created by
Microsoft, catering to developers across different platforms including Windows, macOS, and
Linux. Its user-friendly interface offers features like split views, tabbed editing, and a
minimap, facilitating efficient navigation within large files. Notably, VS Code integrates Git
support seamlessly, enabling version control operations within the editor itself, eliminating
the need for a separate Git client. This built-in functionality allows developers to manage
diffs, stage changes, commit code, and perform other Git operations effortlessly.
One of the most compelling aspects of VS Code is its extensive ecosystem of extensions
available through the VS Code Marketplace. These extensions enhance productivity by
providing additional language support, framework integration, debugging tools, and themes.
Furthermore, VS Code's IntelliSense feature offers context-aware code completion,
significantly expediting coding tasks by suggesting variables, functions, and methods
as Developers type. Debugging is another area where VS Code excels, offering built-in
support for debugging various programming languages and platforms. Developers can set
breakpoints, inspect variables, and step through code directly within the editor, streamlining
the troubleshooting process. Additionally, VS Code features an integrated terminal,
empowering developers to execute command-line tools, scripts, and shell commands
without leaving the editor environment. The terminal can be customized and configured to
meet specific workflow requirements, enhancing developer productivity.
Web Browser
It acts as an intermediary between users and web servers, interpreting HTML, CSS,
JavaScript, and other web technologies to render web pages in a user-friendly format. The
primary functions of a web browser include rendering web content, navigating between web
pages, and executing scripts to enable interactivity.
Web browsers provide a graphical user interface (GUI) that allows users to interact with web
content through features such as buttons, menus, and toolbars. They typically include a URL
bar for entering web addresses, navigation buttons for moving backward and forward through
browsing history, and tabs for multitasking by opening multiple web pages simultaneously.
Modern web browsers offer a wide range of features and functionalities to enhance the
browsing experience. These include support for bookmarks and favorites, which allow users
to save and organize frequently visited websites for easy access. Additionally, web browsers
often include built-in search engines, enabling users to perform web searches directly from
the browser interface.
Security is a significant concern for web browsers, given the sensitive nature of online
activities such as banking, shopping, and communication. To protect users from security
threats like malware, phishing, and data breaches, web browsers implement various security
features such as sandboxing, encryption, and built-in security protocols like HTTPS.
Compatibility with web standards and technologies is also essential for web browsers to
ensure consistent and reliable rendering of web content across different devices and platforms.
Browser vendors regularly release updates and patches to address security vulnerabilities,
improve performance, and add support for new web technologies, ensuring that users have
access to a secure efficient, and feature-rich browsing experience.
OpenCV
OpenCV (Open Source Computer Vision Library) is a widely used open-source library for
computer vision, image processing, and machine learning. It provides a vast collection of
functions and algorithms that enable tasks such as object detection, facial recognition, motion
tracking, and image enhancement. Written primarily in C++ and supporting multiple
programming languages like Python and Java, OpenCV is optimized for real-time
applications, making it popular in robotics, artificial intelligence, and automation. It supports
various platforms, including Windows, Linux, macOS, and mobile operating systems.
OpenCV is extensively used in research and industry for applications ranging from medical
imaging to self-driving cars, owing to its efficiency, scalability, and ease of integration with
deep learning frameworks
The selection of hardware configuring is a very task related to the software development,
particularly inefficient RAM may affect adversely on the speed and corresponding on the
efficiency of the entire system. The processor should be powerful to handle all the operations.
The hard disk should have the sufficient to solve the database and the application.
Memory : 8GB
Monitor : Any
Keyboard : Any
Mouse : Any
SoC : I3 8th above
CHAPTER 3
SYSTEM DESIGN
USER MODULE:
⚫ Authentication: Users log in using face recognition via a webcam. The system captures
the user’s face and compares it with stored facial data.
⚫ Voting: After authentication, users can view available elections and cast their votes.
⚫ Result Viewing: Users can see real-time election results if permitted.
ADMIN MODULE:
⚫ Election Management: Admins can create elections, set voting parameters (dates,
candidates, etc.), and manage users.
⚫ Vote Monitoring: Admins can monitor voting in real-time, check the number of votes
cast, and stop the election when the time expires.
⚫ Result Tallying: The system automatically counts votes and displays the final results
after voting ends
FACE RECOGNITION:
⚫ Face Data Capture: The system captures the user's face through a camera and
compares it with stored data.
⚫ Authentication: The user is authenticated based on facial features before being allowed
to vote.
This system integrates SQLITE3, OpenCV, and Python django for backend processing
and HTML, CSS, JavaScript, for the frontend.
A database is a collection of interrelated data stored with minimum redundancy to serve many
users quickly and efficiently. The general objective is to make information access easy, quick,
inexpensive and flexible for the users. The general theme behind a database is to integrate all
information. Database design is recognized as a standard of management information system
and is available virtually for every computer system. In database design several specific
objectives are considered:
• Controlled redundancy
• Data independence
• Performance
A database is an integrated collection of data and provides centralized access to the data.
Usually, the centralized data managing the software is called RDBMS. The main significant
difference between RDBMS and other DBMS is the separation of data as seen by the
program and data has in direct access to stores device. This is the difference between logical
and physical data.
3.3.1 TABLES
Election
Vote
Candidate
Voter
User
Data Flow Diagram is a network that describes the flow of data and processes that change, or
transform, data throughout the system. This network is constructed by use a set of ymbols
that do not imply a physsical implementation. It is a graphical tool for structul analysis
of the system requirements. DFD models a system by using external entities from which data
flows to a process, which transforms the data and creates, output-data-flows which go to other
processes or external entities or files. Data in files may also flow to processes as inputs. There
are various symbols used in a DFD. Bubbles represent the processes. Named arrows indicate
the data flow. External entities are represented by rectangles. Entities supplying data are
known as sources and those that consume data are called sinks. Data are stored in a data store
by a process in the system. Each component in a DFD is labelled with a descriptive name.
Process names are further identified with a number. The Data Flow Diagram shows the
logical flow of a system and defines the boundaries of the system. For a candidate system, it
describes the input (source), outputs (destination), database (files) and procedures (data flow),
all in a format that meet the user’s requirements.
The main merit of DFD is that it can provide an overview of system requirements, what data a
system would process, what transformations of data are done, what files are used, and where
the results flow. This network is constructed by use a set of symbols that do not imply a
physical implementation. It is a graphical tool for structured analysis of the system
requirements. DFD models a system by using external entities from which data flows to a
process, which transforms the data and creates, output-data-flows which go to other processes
or external entities or files. External entities are represented by rectangles. Entities supplying
data are known as sources and those that consume data are called sinks. Data are stored in a
data store by a process in the system. It is a graphical tool for structured analysis of the system
requirements. DFD models a system by using external entities from which data flows to a
process, which transforms the data and creates, output-data-flows which go to other processes
or external entities or files. Data in files may also flow to processes as inputs.
Rules for constructing a Data Flow Diagram:
LEVEL 0
LEVEL 1
LEVEL 2
3.3.4 ER DIAGRAM
These modules can apply to hardware, software or the interface between a user and a machine.
An example of a user interface could include a GUI, a control panel for a nuclear power plant,
or even the cockpit of an aircraft. N systems engineering, all the inputs and outputs of a system,
subsystem, and its components are listed in an interface control document often as part of the
requirements of the engineering project. The development of a user interface is a unique field.
The user interface design is very important for any application. The interface design
describes how the software communicates within itself, to system that interpreted with it and
with humans who use it. The input design is the process of converting the user- oriented inputs
into the computer- based format. The data is fed into the system using simple inactive forms.
The forms have been supplied with messages so that the user can enter data without facing any
difficulty. They data is validated wherever it requires in the project. This ensures that only the
correct data have been incorporated into system. The goal of designing input data is to make
the automation as easy and free from errors as possible. For providing a good input design for
the application easy data input and selection features are adopted. The input design
requirements such as user friendliness, consistent format, and interactive dialogue for giving
the right messages and help for the user at right are also considered for development for this
project. Input Design is a part of the overall design. The basic steps involved in input design
are:
• Review input requirements.
CHAPTER 4
IMPLEMENTATION
IDE: VISUAL STUDIO CODE
Visual Studio Code is a streamlined code editor with support for development operations like
debugging, task running, and version control. It aims to provide just the tools a developer
needs for a quick code-build-debug cycle and leaves more complex workflows to fuller
featured IDE. Developers are highly opinionated when it comes to code editors. Visual
Studio Code is free, open- source, and cross-platform. This means that it works on
Windows, Linux, and macOS. Unlike many other code editors, Visual Studio Code has an
in-built debugger, making the development flow less ‘clicky’ and maintains a single view
with code and debugger. This makes the process of bug tracking, and code run-throughs a
lot easier and faster. You do not need to have multiple screens to run the different consoles
and rearrange them each time you need to minimize something. It’s built into the design and
your desired workspace set up.
DATABASE: SQLITE3
One of the key strengths of SQLite3 is its simplicity. It doesn’t require any installation or
maintenance, and the database is accessed through a standard SQL interface. This makes it an ideal
choice for applications that need to store data locally, such as mobile apps, desktop
applications, or even IoT devices. Despite its lightweight nature, SQLite3 supports a wide range of
SQL features, including transactions, sub-selects, triggers, and views, which allows developers to
build robust and feature-rich applications.
SQLite3 is also highly efficient in terms of performance. It’s designed to handle high-
speed read operations, making it suitable for applications where quick data retrieval is
critical. However, it may not be the best choice for applications that require heavy write
operations or complex multi-user concurrency, as it doesn’t support advanced client-server
features found in larger database systems. Nonetheless, its ease of use, portability, and
reliability make it a popular choice for many developers around the world.
==================FUNCTION====================================
import
os
import
tempfile
from django.shortcuts import render, redirect,
get_object_or_404 from django.contrib.auth import login,
authenticate, logout
from django.contrib.auth.decorators import
login_required from django.contrib import
messages
from django.utils import
timezone from django.http
import JsonResponse
from django.views.decorators.csrf import
csrf_exempt from django.core.files.base
import ContentFile import base64
def home(request):
def register(request):
if request.method == 'POST':
user_form =
UserRegistrationForm(request.POST) if
user_form.is_valid():
user = user_form.save()
============================= Create voter profile=================
Voter.objects.create(user=user)
user_form = UserRegistrationForm()
return render(request, 'voting/register.html', {'user_form': user_form})
def user_login(request):
if request.method == 'POST':
username =
request.POST['username']
password =
request.POST['password']
user = authenticate(request, username=username,
return
redirect('profile') else:
messages.error(request, 'Invalid username or
password.') return render(request, 'voting/login.html')
@login_required
def
user_logout(reques
t): logout(request)
return redirect('home')
@login_requ
ired def
profile(requ
est):
voter = get_object_or_404(Voter,
user=request.user) votes =
Vote.objects.filter(voter=voter)
return render(request, 'voting/profile.html',
{ 'voter': voter,
'votes': votes,
})
@login_required
def register_face(request):
if request.method ==
'POST': # Handle
base64 image data
if 'image_data' in request.POST:
img_data =
request.POST['image_data']
format, imgstr =
img_data.split(';base64,') ext =
format.split('/')[-1]
============================= Create temporary file=====================
face_encoding = get_face_encoding(temp_file.name)
os.unlink(temp_file.name)
if face_encoding:
voter.face_encoding =
face_encoding
voter.is_registered = True
voter.save()
messages.success(request, 'Face registered
successfully!') return redirect('profile')
else:
else:
face_data =
detect_faces_webcam() if
face_data:
voter.face_encoding = face_data["encoding"]
def elections_list(request):
current_time =
timezone.now()
active_elections = Election.objects.filter(is_active=True, end_date
gt=current_time) past_elections = Election.objects.filter(end_date
lt=current_time)
return render(request,
'voting/elections_list.html',
{ 'active_elections': active_elections,
'past_elections': past_elections
})
@login_required
election = ge get_object_or_404(Voter,
user=request.user)
return render(request,
'voting/election_detail.html', { 'election': election,
'has_voted':
has_voted,
'is_active':
is_active
})
@login_required
election = get_object_or_404(Election,
Department of Computer Science and Engineering,MBITS 44
Online Voting System
if request.method == 'POST':
candidate_id =
request.POST.get('candidate') if
candidate_id:
candidate = get_object_or_404(Candidate, id=candidate_id)
=====================Face Verification===========================
if 'verified' not in
request.session: return
redirect('verify_face')
================================Createvote===========================
==============================Clear Verification========================
if 'verified' in
request.session: del
request.session['verifi
ed']
candidates =
election.candidates.all() return
render(request, 'voting/vote.html',
{
'election':
election,
'candidates':
candidates
})
@login_required
def verify_face_view(request):
if not voter.face_encoding:
if request.method == 'POST':
if 'image_data' in request.POST:
img_data =
request.POST['image_data'] format,
imgstr = img_data.split(';base64,')
ext = format.split('/')[-1]
============================Createtemporaryfile========================
temp_file.close()
=============================Verifyface===============================
if is_verified:
request.session['verified']
= True
next_url = request.GET.get('next',
'elections') return redirect(next_url)
else:
else:
face_data = detect_faces_webcam() if
face_data:
is_verified = verify_face(voter.face_encoding,
face_data["image_path"]) if is_verified:
request.session['verified'] = True
messages.success(request, 'Face verification
successful!')
======================== Get the next URL from the query parameters=========
next_url = request.GET.get('next', 'elections')
return
redirect(next_url)
else:
messages.error(request, 'Face verification failed. Please try again.')
else:
election = get_object_or_404(Election,
id=election_id) candidates =
election.candidates.all()
results = []
total_votes = Vote.objects.filter(election=election).count()
return render(request, 'voting/results.html',
{ 'election': election,
'results': results,
'total_votes':
total_votes
})
@login_required
def
add_candidate(req
uest): if not
request.user.is_staf
f:
messages.error(request, 'You must be an admin to access this
page.') return redirect('home')
if request.method == 'POST':
form = CandidateForm(request.POST,
request.FILES) if form.is_valid():
candidate =
form.save(commit=False) #
Get face encoding from the
image
face_encoding =
get_face_encoding(candidate.image.path) if
face_encoding:
candidate.face_encoding = face_encoding
Department of Computer Science and Engineering,MBITS 49
Online Voting System
candidate.save()
messages.success(request, 'Candidate added
successfully!') return redirect('elections')
else:
@login_required
def add_election(request):
if not request.user.is_staff:
return redirect('home')
if request.method == 'POST':
form =
ElectionForm(request.POST)
if form.is_valid():
election = form.save()
form = ElectionForm()
urlpatterns = [
path('admin/',
admin.site.urls), path('',
include('voting.urls')),
]
if settings.DEBUG:
from django.urls
import path from .
import views
urlpatterns = [
===========================================================
CHAPTER 5
TESTING
Coding conventions are a set of guidelines for a specific programming language that
recommend Programming style, practices and methods for each aspect of a piece program
written in this language. These conventions usually cover file organization, indentation,
comments, declarations, statements, white space, naming conventions, programming
practices, programming principles, programming rules of thumb, architectural best practices,
etc. These are guidelines for software structural quality. Software programmers are highly
recommended to follow these guidelines to help improve the readability of their source
code and make software maintenance easier.
The objective of system testing is to ensure that all individual programs are working as
expected, that the programs link together to meet the requirements specified and to ensure
that the computer system and the associated clerical and other procedures work together. The
initial phase of system testing is the responsibility of the analyst who determines what
conditions are to be tested, generates test data, produced a schedule of expected results, runs
the tests and compares the computer produced results with the expected results with the
expected results. The analyst may also be involved in procedures testing. When the analyst
is satisfied that the system is working properly, he hands it over to the users for testing.
The importance of system testing by the user must be stressed. Ultimately it is the user
must verify the system and give the go-ahead. During testing, the system is used
experimentally to ensure that the software does not fail, i.e., that it will run according to its
specifications and in the way users expect it to. Special test data is input for processing (test
plan) and the results are examined to locate unexpected results. A limited number of users
may also be allowed to use the system so analysts can see whether they try to use it in
unexpected ways. It is preferably to find these surprises before the organization implements
the system and depends on it. In many organizations, testing is performed by person other
than those who write the original programs. Using persons who do not know how certain
parts were designed or programmed ensures more complete and unbiased testing and more
reliable software.
Department of Computer Science and Engineering,MBITS 53
Online Voting System
Parallel running is often regarded as the final phase of system testing. Since he parallel
operation of two systems is very demanding in terms of user resources it should be embarked
on only if the user is satisfied with the results of testing -- it should not be started if problems
are known to exist. Testing is the major quality control measure during software development.
Its basic function is to detect errors in the software. Thus, the goal of testing is to uncover
requirement design and coding errors in the program. Testing is the process of correcting
a program with intends of finding an error.
Creating effective test cases involves understanding the application’s functionality, user
requirements, and potential edge cases. This process often includes writing detailed scenarios
that cove both positive and negative test conditions. Positive test cases validate that the
software can gracefully handle invalid or unexpected input. Comprehensive test cases
improve the reliability and quality of the software by systematically identifying issues that
could impact users. Test cases also facilitate communication among developers, testers, and
stakeholders by providing a clear and structured way to evaluate software performance.
1. Unit Testing
2. Integrated Testing
5. Validation Testing
testing focuses verification efforts on thesmaller unit of software design in the module. This
is also known as module testing. The modules of the system are tested separately. The
testing is carried out during programming stage itself. In this testing step each module is
found to working satisfactory as regard to the expected output from the module. There are
some validation checks for verifying the data input given by the user which both the formal
and validity of the entered. It is very easy to find error debug the system.
Integration testing (sometimes called integration and testing, abbreviated I&T) is the phase in
software testing in which individual software modules are combined and tested as a group.
Software components may be integrated in an iterative way or all together ("big bang").
Normally the former is considered a better practice since it allows interface issues to be
located more quickly and fixed. Data can be lost across an interface; one module can have an
adverse effort on the other sub functions when combined by, may not produce the desired
major functions. Integrated testing is the systematic testing for constructing the uncover
errors within the interface. This testing was done with sample data. The developed system
has run success full for this sample data. The need for integrated test is to find the
overall system performance. Integration testing is a logical extension of unit testing. In its
simplest form, two units that have already been tested are combined into a component and the
interface between them is tested. A component, in this sense, refers to an integrated aggregate
of more than one unit. Integration testing identifies problems that occur when units are
combined. By using a test plan that requires you to test each unit and ensure the viability
of each before combining units, you know that any errors discovered when combining units
are likely related to the interface between units. This method reduces the number of
possibilities to a far simpler level of analysis. Progressively larger groups of tested software
components corresponding to elements of the architectural design are integrated and tested
until the software works as a system.
application (e.g., what the software does) without peering into its internal structures or
workings. This method of test can be applied to virtually every level of software testing: unit,
integration, system and acceptance.
Typically comprises most if not all higher level testing, but can also dominate unit testing
as well. In black box testing the structure of the program is not considered. Test cases are
decided solely on the basis of the requirements or the specification of the program or module,
and the internals of the module or program are not considered for selection of the test cases.
In the Black Box testing tester only knows the input that can be given to the system and what
output the system should give. In other words, the basis of deciding test cases in
functional testing is requirements or specifications of the system or module. This form of
testing is also called functional or behavioural testing. One advantage of the black box
technique is that no programming knowledge is required. Whatever biases the programmers
may have had, the tester likely has a different set and may emphasize different areas of
functionality. On the other hand, black-box testing has been said to be "like a walk in a
dark labyrinth without a flashlight. Because they do not examine the source code, there
are situations when a tester writes many test cases to check something that could have
been tested by only one test case, or leaves some
White-box testing (also known as clear box testing, glass box testing, and transparent
box testing and structural testing) is a method of testing software that tests internal
structures or workings of an application, as opposed to its functionality. In white-box testing
an internal perspective of the system, as well as programming skills, are used to design test
cases. The tester chooses inputs to exercise paths through the code and determine the
appropriate outputs. This is analogous to testing nodes in a circuit, e.g. in- circuit testing
(ICT).
While white-box testing can be applied at the unit, integration and system levels of the
software testing process, it is usually done at the unit level. It can test paths within a unit,
paths between units during integration, and between subsystems during a system–level
test. Though this method of test design can uncover many errors or problems, it might not
detect unimplemented parts of the specification or missing requirements. White Box testing is
concerned with testing the implementation of the program. The intent of this testing is not to
exercise all the different input or output conditions but to exercise the different
programming structures and data structures used in the program.
• Branch testing
• Path testing
• Statement coverage
Acceptance Testing is a level of the software testing process where a system is tested for
acceptability. User Acceptance testing is the software testing process where system tested for
acceptability & validates the end to end business flow. Such type of testing executed by client
in separate environment & confirms whether system meets the requirements as per
requirement specification or not.
UAT is performed after System Testing is done and all or most of the major defects have
been fixed. This testing is to be conducted in the final stage of Software Development
Life Cycle (SDLC) prior to system being delivered to a live environment. UAT users or end
users are concentrating on end to end scenarios & typically involves running a suite of
tests on the completed system.
User Acceptance testing also known as Customer Acceptance testing (CAT), if the system is
being built or developed by an external supplier. The CAT or UAT are the final confirmation
from the client before the system is ready for production. The business customers are the
primary owners of these UAT tests. These tests are created by business customers and
articulated in business domain languages. So ideally it is collaboration between business
customers, business analysts, testers and developers. It consists of test suites which involve
multiple test cases & each test case contains input data (if required) as well as the
expected output. The result of test case is either a pass or fail.
No
.
1 Run website and Login screen is Login screen has been Pass
navigate to login displayed. A field for displayed. fields for
screen entering username, entering username,
password and login password, and login
button
button should be is available
present
CHAPTER 6
CONCLUSION
OVS- Online Voting System is the integration of face recognition technology into
an online voting system for college student elections represents a significant
advancement in ensuring secure, efficient, and trustworthy electoral processes. This
innovative approach not only simplifies the voting experience but also strengthens voter
authentication, effectively eliminating the risks of identity fraud and impersonation. By
leveraging biometric verification, the system guarantees that only eligible students can
cast their votes, thereby enhancing the integrity of the election.
The use of face recognition also streamlines the authentication process, reducing wait
times and minimizing the need for manual verification, which can often be prone to
errors. Additionally, the system’s ability to process votes in real-time promotes
transparency and quick result tabulation, fostering greater confidence among students in
the electoral process. As colleges continue to embrace digital transformation, the adoption
of an online voting system powered by face recognition technology stands as a progressive
step toward modern, secure, and user-friendly elections. Ultimately, this system not only
simplifies the voting process but also empowers students to actively participate in shaping
their academic communities with confidence and ease.
As technology evolves, the online voting system with face recognition can be further
enhanced to ensure higher security, greater accessibility, and increased trust in the electoral
process. One of the most significant future improvements would be the implementation
of multi-factor authentication (MFA). While face recognition provides a robust form of
identity verification, adding additional layers, such as One-Time Password (OTP) sent via
email or SMS, would provide an extra level of security, ensuring that only eligible
students can vote while minimizing the risks of identity theft or unauthorized access.
Department of Computer Science and Engineering,MBITS 60
Online Voting System
In the realm of data integrity and security, this technologycould be incorporated into the
system to create a transparent and tamper-proof ledger of votes. By using blockchain, the
election process could be made even more secure, as every vote would be encrypted and
stored in a decentralized ledger. This would provide an immutable record that could be
independently verified, further assuring students of the credibility of election results and
reducing the risk of tampering.
To make the system even more accessible, future enhancements could include the
development of a mobile application that allows students to vote securely from their
smartphones. Given the widespread use of mobile devices, this feature would significantly
improve convenience, enabling students to participate in elections no matter where they are.
The app could also be optimized for a more seamless and intuitive user experience, with a
design that is simple and easy to navigate, particularly for first-time voters.
Accessibility and inclusivity will also be major considerations. The goal is to create systems
that are effective across diverse demographics, including different skin tones, facial structures,
and individuals with disabilities. To maximize voter participation, systems will be optimized
for use on smartphones and in low-bandwidth environments, making online voting more
accessible to a broader audience.
To ensure transparency and fairness, the future of online voting will incorporate real-time
monitoring and auditability features. AI-driven algorithms will be employed to detect
suspicious activities and unusual voting patterns as they occur. Moreover, systems will
CHAPTER 7
REFERENCES
https://ieeexplore.ieee.org/document/10073982
2. Vaisali .V. Sarkate ,Prof. R.S.Guptha, Prof.Y.S.Alone "Smart voting system support
through face recognition", International Journal of Emerging Technologies and
Innovative Research (www.jetir.org | UGC and issn Approved), ISSN:2349-5162,
Vol.6, Issue 5, page no. pp281-283, May-2019
http://www.jetir.org/papers/JETIR1905P43.pdf
3. Chandra Keerthi Pothina , Atla Indu Reddy, Ravikumar CV, "Smart Voting
System using Facial Detection” , International Journal of Innovative Technology
and Exploring Engineering (IJITEE)
ISSN: 2278-3075 (Online), Volume-9 Issue-6, April 2020
https://www.researchgate.net/publication/363856363
CHAPTER 8
APPENDIX