Voting Microservice Design
Voting Microservice Design
## Overview
The Voting Microservice Application comprises five distinct services, each handling
a specific aspect of the system. These services communicate via REST APIs to ensure
modularity, scalability, and ease of maintenance.
### Microservices:
1. **Voting App**
2. **Voter Registration App**
3. **Voter Management App**
4. **Voter Results App**
5. **Manager Registration App**
---
## Service Details
---
---
---
---
---
### Architecture
The application follows a **microservices architecture** with REST APIs to enable
communication. Each service has its own database to maintain modularity and avoid
bottlenecks.
2. **Vote Casting:**
- Voter submits a vote through the Voting App.
- The app verifies voter details by querying the Voter Registration App.
- If verified, the vote is recorded.
3. **Voter Management:**
- Admins manage voter profiles via the Voter Management App.
- Changes are propagated to the Voting App if necessary.
4. **Results Aggregation:**
- Voting App periodically sends vote counts to the Results App.
- Results App aggregates data and provides real-time result APIs.
5. **Manager Registration:**
- Managers register through the Manager Registration App.
- Authentication tokens are issued for secure access to the Voter Management App
and Voting App.
---
## Database Design
### Voting
- **Vote Table:**
- `id` (PK)
- `voter_id` (FK)
- `candidate`
- `timestamp`
### Results
- **Results Table:**
- `id` (PK)
- `region`
- `candidate`
- `votes`
---
## Deployment
- Use **Docker** to containerize each service.
- Employ **Kubernetes** for orchestration.
- Use **PostgreSQL** for databases.
- **NGINX** as the API gateway.
---
## Download
The technical documentation and code templates for the services can be downloaded
[here](#).