# anazsantanag/evote360pro architecture

> Architecture diagram of the GitHub repository anazsantanag/evote360pro, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/anazsantanag/evote360pro
- Repository: https://github.com/anazsantanag/evote360pro

## Overview

Evote360Pro is an ASP.NET Core electoral-management and remote e-voting platform. Its voter journey proceeds from document-number access through identity/OCR validation and emailed OTP verification to a dynamic ballot, selection review, and vote finalization; the MVC controller explicitly invokes these stages. Separate administrative and party-leader capabilities manage elections, positions, citizens, parties, candidates, and alliances. The graph reflects the README and shown controller/service references; many implementation files were not sampled, so internal links beyond those references are omitted or marked unverified.

Main entry points: [`Evote360Pro.Web/Areas/Voter/Controllers/VoterController.cs`](https://github.com/anazsantanag/evote360pro/blob/main/Evote360Pro.Web/Areas/Voter/Controllers/VoterController.cs) (Voter workflow), [`Evote360Pro.Core.Application/Services/Admin`](https://github.com/anazsantanag/evote360pro/tree/main/Evote360Pro.Core.Application/Services/Admin) (Election administration), [`Evote360Pro.Core.Application/Services/PartyLeader`](https://github.com/anazsantanag/evote360pro/tree/main/Evote360Pro.Core.Application/Services/PartyLeader) (Party and candidate services), [`Evote360Pro.Core.Domain/Interfaces`](https://github.com/anazsantanag/evote360pro/tree/main/Evote360Pro.Core.Domain/Interfaces) (Repository contracts)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web workflows"]
  node_voter_web["Voter workflow<br/>[VoterController.cs]"]
  node_admin_web["Admin backoffice<br/>[AdminController.cs]"]
  node_party_web["Candidate management"]
  node_account_web["Account access"]
end

subgraph group_application["Application services"]
  node_voter_access["Voter access"]
  node_identity_check["Identity and OCR"]
  node_otp["OTP verification"]
  node_ballot["Ballot assembly"]
  node_vote["Vote finalization"]
  node_admin_services["Election administration<br/>[Admin]"]
  node_party_services["Party and candidate services<br/>[PartyLeader]"]
  node_alliances["Alliance requests<br/>[AllianceService.cs]"]
end

subgraph group_domain["Election domain"]
  node_domain_entities["Election records<br/>[Entities]"]
  node_domain_repositories["Repository contracts<br/>[Interfaces]"]
end

subgraph group_infrastructure["Persistence and identity"]
  node_postgres[("PostgreSQL data")]
  node_identity_service["User and role service<br/>[UserService.cs]"]
  node_identity_store[("Identity store<br/>[IdentityContext.cs]")]
end

subgraph group_integrations["External services"]
  node_ocr_service["OCR integration<br/>[OcrService.cs]"]
  node_email_service["Email delivery<br/>[EmailService.cs]"]
  node_file_storage["File storage"]
end

node_voters(("Voters"))
node_administrators(("Administrators"))
node_party_leaders(("Party leaders"))

node_voters -->|"submit workflow"| node_voter_web
node_voter_web -->|"validates access"| node_voter_access
node_voter_web -->|"validates identity"| node_identity_check
node_voter_web -->|"sends and verifies"| node_otp
node_voter_web -->|"requests ballot"| node_ballot
node_voter_web -->|"finalizes selections"| node_vote
node_identity_check -.->|"uses OCR"| node_ocr_service
node_otp -->|"sends code"| node_email_service
node_administrators -->|"manage elections"| node_admin_web
node_admin_web -->|"calls management services"| node_admin_services
node_party_leaders -->|"manage candidates"| node_party_web
node_party_web -->|"uses candidate service"| node_party_services
node_party_services -.->|"includes alliance management"| node_alliances
node_admin_services -->|"stores party logos"| node_file_storage
node_admin_services -.->|"manages users"| node_identity_service
node_identity_service -->|"manages identity users"| node_identity_store
node_admin_services -.->|"uses repository contracts"| node_domain_repositories
node_party_services -->|"uses repository contracts"| node_domain_repositories
node_domain_repositories -->|"implemented by repositories"| node_postgres
node_postgres -->|"stores election records"| node_domain_entities
node_account_web -->|"authenticates accounts"| node_identity_service

click node_voter_web "https://github.com/anazsantanag/evote360pro/blob/main/Evote360Pro.Web/Areas/Voter/Controllers/VoterController.cs"
click node_admin_web "https://github.com/anazsantanag/evote360pro/blob/main/Evote360Pro.Web/Areas/Admin/Controllers/AdminController.cs"
click node_party_web "https://github.com/anazsantanag/evote360pro/blob/main/Evote360Pro.Web/Areas/PartyLeader/Controllers/CandidateController.cs"
click node_account_web "https://github.com/anazsantanag/evote360pro/blob/main/Evote360Pro.Web/Controllers/AccountController.cs"
click node_voter_access "https://github.com/anazsantanag/evote360pro/blob/main/Evote360Pro.Core.Application/Services/Voter/VoterAccessService.cs"
click node_identity_check "https://github.com/anazsantanag/evote360pro/blob/main/Evote360Pro.Core.Application/Services/Voter/VoterIdentityService.cs"
click node_otp "https://github.com/anazsantanag/evote360pro/blob/main/Evote360Pro.Core.Application/Services/Voter/VoterTokenService.cs"
click node_ballot "https://github.com/anazsantanag/evote360pro/blob/main/Evote360Pro.Core.Application/Services/Voter/VoterBallotService.cs"
click node_vote "https://github.com/anazsantanag/evote360pro/blob/main/Evote360Pro.Core.Application/Services/Voter/VoterVoteService.cs"
click node_admin_services "https://github.com/anazsantanag/evote360pro/tree/main/Evote360Pro.Core.Application/Services/Admin"
click node_party_services "https://github.com/anazsantanag/evote360pro/tree/main/Evote360Pro.Core.Application/Services/PartyLeader"
click node_alliances "https://github.com/anazsantanag/evote360pro/blob/main/Evote360Pro.Core.Application/Services/PartyLeader/AllianceService.cs"
click node_domain_entities "https://github.com/anazsantanag/evote360pro/tree/main/Evote360Pro.Core.Domain/Entities"
click node_domain_repositories "https://github.com/anazsantanag/evote360pro/tree/main/Evote360Pro.Core.Domain/Interfaces"
click node_postgres "https://github.com/anazsantanag/evote360pro/blob/main/Evote360Pro.Infrastructure.Persistence/Context/PostgreDbContext.cs"
click node_identity_service "https://github.com/anazsantanag/evote360pro/blob/main/Evote360Pro.Infrastructure.Identity/Implementation/UserService.cs"
click node_identity_store "https://github.com/anazsantanag/evote360pro/blob/main/Evote360Pro.Infrastructure.Identity/Context/IdentityContext.cs"
click node_ocr_service "https://github.com/anazsantanag/evote360pro/blob/main/Evote360Pro.Infrastructure.Shared/Services/OcrService.cs"
click node_email_service "https://github.com/anazsantanag/evote360pro/blob/main/Evote360Pro.Infrastructure.Shared/Services/EmailService.cs"
click node_file_storage "https://github.com/anazsantanag/evote360pro/blob/main/Evote360Pro.Infrastructure.Shared/Services/SupabaseStorageService.cs"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_voter_web,node_admin_web,node_party_web,node_account_web toneBlue
class node_voter_access,node_identity_check,node_otp,node_ballot,node_vote,node_admin_services,node_party_services,node_alliances toneAmber
class node_domain_entities,node_domain_repositories toneMint
class node_postgres,node_identity_service,node_identity_store toneRose
class node_ocr_service,node_email_service,node_file_storage,node_voters,node_administrators,node_party_leaders toneIndigo
```

## Components

### Web workflows

- [Voter workflow](https://github.com/anazsantanag/evote360pro/blob/main/Evote360Pro.Web/Areas/Voter/Controllers/VoterController.cs): `Evote360Pro.Web/Areas/Voter/Controllers/VoterController.cs`
- [Admin backoffice](https://github.com/anazsantanag/evote360pro/blob/main/Evote360Pro.Web/Areas/Admin/Controllers/AdminController.cs): `Evote360Pro.Web/Areas/Admin/Controllers/AdminController.cs`
- [Candidate management](https://github.com/anazsantanag/evote360pro/blob/main/Evote360Pro.Web/Areas/PartyLeader/Controllers/CandidateController.cs): `Evote360Pro.Web/Areas/PartyLeader/Controllers/CandidateController.cs`
- [Account access](https://github.com/anazsantanag/evote360pro/blob/main/Evote360Pro.Web/Controllers/AccountController.cs): `Evote360Pro.Web/Controllers/AccountController.cs`

### Application services

- [Voter access](https://github.com/anazsantanag/evote360pro/blob/main/Evote360Pro.Core.Application/Services/Voter/VoterAccessService.cs): `Evote360Pro.Core.Application/Services/Voter/VoterAccessService.cs`
- [Identity and OCR](https://github.com/anazsantanag/evote360pro/blob/main/Evote360Pro.Core.Application/Services/Voter/VoterIdentityService.cs): `Evote360Pro.Core.Application/Services/Voter/VoterIdentityService.cs`
- [OTP verification](https://github.com/anazsantanag/evote360pro/blob/main/Evote360Pro.Core.Application/Services/Voter/VoterTokenService.cs): `Evote360Pro.Core.Application/Services/Voter/VoterTokenService.cs`
- [Ballot assembly](https://github.com/anazsantanag/evote360pro/blob/main/Evote360Pro.Core.Application/Services/Voter/VoterBallotService.cs): `Evote360Pro.Core.Application/Services/Voter/VoterBallotService.cs`
- [Vote finalization](https://github.com/anazsantanag/evote360pro/blob/main/Evote360Pro.Core.Application/Services/Voter/VoterVoteService.cs): `Evote360Pro.Core.Application/Services/Voter/VoterVoteService.cs`
- [Election administration](https://github.com/anazsantanag/evote360pro/tree/main/Evote360Pro.Core.Application/Services/Admin): `Evote360Pro.Core.Application/Services/Admin`
- [Party and candidate services](https://github.com/anazsantanag/evote360pro/tree/main/Evote360Pro.Core.Application/Services/PartyLeader): `Evote360Pro.Core.Application/Services/PartyLeader`
- [Alliance requests](https://github.com/anazsantanag/evote360pro/blob/main/Evote360Pro.Core.Application/Services/PartyLeader/AllianceService.cs): `Evote360Pro.Core.Application/Services/PartyLeader/AllianceService.cs`

### Election domain

- [Election records](https://github.com/anazsantanag/evote360pro/tree/main/Evote360Pro.Core.Domain/Entities): `Evote360Pro.Core.Domain/Entities`
- [Repository contracts](https://github.com/anazsantanag/evote360pro/tree/main/Evote360Pro.Core.Domain/Interfaces): `Evote360Pro.Core.Domain/Interfaces`

### Persistence and identity

- [PostgreSQL data](https://github.com/anazsantanag/evote360pro/blob/main/Evote360Pro.Infrastructure.Persistence/Context/PostgreDbContext.cs): `Evote360Pro.Infrastructure.Persistence/Context/PostgreDbContext.cs`
- [User and role service](https://github.com/anazsantanag/evote360pro/blob/main/Evote360Pro.Infrastructure.Identity/Implementation/UserService.cs): `Evote360Pro.Infrastructure.Identity/Implementation/UserService.cs`
- [Identity store](https://github.com/anazsantanag/evote360pro/blob/main/Evote360Pro.Infrastructure.Identity/Context/IdentityContext.cs): `Evote360Pro.Infrastructure.Identity/Context/IdentityContext.cs`

### External services

- [OCR integration](https://github.com/anazsantanag/evote360pro/blob/main/Evote360Pro.Infrastructure.Shared/Services/OcrService.cs): `Evote360Pro.Infrastructure.Shared/Services/OcrService.cs`
- [Email delivery](https://github.com/anazsantanag/evote360pro/blob/main/Evote360Pro.Infrastructure.Shared/Services/EmailService.cs): `Evote360Pro.Infrastructure.Shared/Services/EmailService.cs`
- [File storage](https://github.com/anazsantanag/evote360pro/blob/main/Evote360Pro.Infrastructure.Shared/Services/SupabaseStorageService.cs): `Evote360Pro.Infrastructure.Shared/Services/SupabaseStorageService.cs`

### Other components

- **Voters**
- **Administrators**
- **Party leaders**

## Connections

- Voters → Voter workflow: submit workflow
- Voter workflow → Voter access: validates access (evidence: `Evote360Pro.Web/Areas/Voter/Controllers/VoterController.cs`)
- Voter workflow → Identity and OCR: validates identity (evidence: `Evote360Pro.Web/Areas/Voter/Controllers/VoterController.cs`)
- Voter workflow → OTP verification: sends and verifies (evidence: `Evote360Pro.Web/Areas/Voter/Controllers/VoterController.cs`)
- Voter workflow → Ballot assembly: requests ballot (evidence: `Evote360Pro.Web/Areas/Voter/Controllers/VoterController.cs`)
- Voter workflow → Vote finalization: finalizes selections (evidence: `Evote360Pro.Web/Areas/Voter/Controllers/VoterController.cs`)
- Identity and OCR → OCR integration: uses OCR
- OTP verification → Email delivery: sends code
- Administrators → Admin backoffice: manage elections
- Admin backoffice → Election administration: calls management services (evidence: `Evote360Pro.Web/Areas/Admin/Controllers/AdminController.cs`)
- Party leaders → Candidate management: manage candidates
- Candidate management → Party and candidate services: uses candidate service (evidence: `Evote360Pro.Web/Areas/PartyLeader/Controllers/CandidateController.cs`)
- Party and candidate services → Alliance requests: includes alliance management
- Election administration → File storage: stores party logos
- Election administration → User and role service: manages users
- User and role service → Identity store: manages identity users (evidence: `Evote360Pro.Infrastructure.Identity/Implementation/UserService.cs`)
- Election administration → Repository contracts: uses repository contracts (evidence: `Evote360Pro.Core.Application/Services/Admin/ElectionService.cs`)
- Party and candidate services → Repository contracts: uses repository contracts (evidence: `Evote360Pro.Core.Application/Services/PartyLeader/AllianceService.cs`)
- Repository contracts → PostgreSQL data: implemented by repositories (evidence: `Evote360Pro.Infrastructure.Persistence/IoC/PersistenceServiceRegistration.cs`)
- PostgreSQL data → Election records: stores election records (evidence: `Evote360Pro.Infrastructure.Persistence/Context/PostgreDbContext.cs`)
- Account access → User and role service: authenticates accounts (evidence: `Evote360Pro.Web/Controllers/AccountController.cs`)
