# Ghana Voting Application
A distributed voting application for Ghana elections using microservices architecture.
## Screenshots
Voting Interface
Vote Confirmation
Results Dashboard
## Table of Contents
1. Overview
2. Architecture
3. Installation
4. Configuration
5. Usage
6. Administration
7. Documentation
8. Troubleshooting
## Overview
The Ghana Voting Application is a microservices-based system designed to handle voting during elections. It provides a user-friendly interface for voters to cast their votes and a real-time dashboard for viewing election results.
**Key Features:**
- Simple and intuitive voting interface
- Real-time results dashboard with visual representations
- Distributed architecture for scalability and reliability
- Containerized deployment for easy setup and maintenance
## Architecture
```mermaid
graph TD
subgraph "User Interface"
A[Voter] -->|Accesses| B[Vote App Flask/Python]
C[Admin] -->|Views| D[Results App Node.js]
end
subgraph "Backend Services"
B -->|Publishes vote| E[Redis Message Broker]
E -->|Consumes vote| F[Worker .NET]
F -->|Updates| G[PostgreSQL Database]
D -->|Reads| G
end
subgraph "Shared Configuration"
H[parties.json] -->|Used by| B
H -->|Used by| D
end
subgraph "Admin Operations"
I[CLI Commands] -->|Reset votes| G
end
style B fill:#9CF,stroke:#333
style D fill:#9CF,stroke:#333
style E fill:#FCC,stroke:#333
style F fill:#CFC,stroke:#333
style G fill:#FCF,stroke:#333
```
### Components
1. **Vote App (Flask/Python)**
- Provides the voting interface
- Publishes votes to Redis
2. **Results App (Node.js)**
- Displays real-time election results
- Reads data from PostgreSQL
3. **Worker (.NET)**
- Processes votes from Redis
- Updates the database
4. **Redis**
- Acts as a message broker
- Enables asynchronous processing
5. **PostgreSQL**
- Stores voting data
- Provides persistence
## Installation
### Prerequisites
- Docker and Docker Compose
- Git
### Setup
1. Clone the repository:
```bash
git c …