E-Ballot UK is a web-based election simulator that demonstrates a First-Past-The-Post voting system. It is a personal project exploring how online voting could improve accessibility for users who face challenges voting in person due to address changes, constituency mismatches, or practical issues such as travel distance, registration problems, or postal voting delays.
Disclaimer: This project is for educational and demonstration purposes only and is not intended for real-world electoral use. The UI is currently under development.
- First-Past-The-Post voting system simulation
- Multistep user verification (email, poll card reference, National Insurance number, name, address, date of birth)
- Constituency-based voting eligibility
- One vote per user enforcement
- Session timeout with automatic logout after 15 minutes
- Each user must only be allowed to vote once per election
- Users must only vote within their assigned constituency
- Identity must be verified before voting access is granted
- Voting sessions must expire after a fixed time period for security
- System must prevent duplicate, fraudulent, or unauthorised votes
- Java 21
- Spring Boot 3 (Web)
- Spring Data JPA, MySQL
- Spring Boot Actuator
- JUnit, Mockito, MockMvc
- Swagger (OpenAPI)
- API documentation
- SLF4J (logging)
- Prometheus (metrics monitoring)
- Grafana (metrics visualisation)
- Postman (API and performance testing)
- SonarQube (code quality analysis)
- Maven
This project is built using a layered monolithic architecture, chosen to keep the system simple, maintainable, and easy to extend while preserving clear separation of concerns between components.
This sequence diagram shows the step-by-step process of user authentication and vote casting within the system.
- Critical actions logged with SLF4J
- Supports debugging, auditing, and transparency
- Prometheus and Grafana are used for monitoring and visualisation of system metrics
The services are documented using Swagger (OpenAPI). To access the API documentation locally, run the application and navigate to: http://localhost:8080/swagger-ui/index.html
This project is also being actively checked with Sonarqube integrated in the developer's IDE. An analysis with SonarQube to would reveal the following:
- Simulated multiple users casting votes concurrently
- Monitored API response times and errors
Example Metrics:
- Requests/sec: 133.33
- Average response time: 23 ms
- P90 response time: 30 ms
- Error %: 0.00%
@reicraftscodes

