# π³οΈ Online Voting System - Secure Digital Democracy
```diff
+---------------------------------------------------------------+
| π Modern | π Secure | β‘ Efficient | π― User-Friendly |
+---------------------------------------------------------------+OnlineVotingSystem.api.git is a full-stack solution revolutionizing democratic processes through technology. This system combines a robust .NET Core backend with an interactive Blazor frontend to deliver:
pie
title System Capabilities
"Secure Authentication" : 25
"Real-time Results" : 20
"Admin Dashboard" : 20
"Voter Portal" : 20
"Audit Trails" : 15
+ JWT Token Security
+ Role-based Access Control
+ Password Hashing (BCrypt)graph TD
A[Create Election] --> B[Define Positions]
B --> C[Add Candidates]
C --> D[Configure Timeline]
D --> E[Launch]
+ One-Vote-Per-User Enforcement
+ Anonymous Ballot System
+ Real-time Vote Countinggraph LR
P[Program.cs] --> C[Configuration]
C --> D[Database]
D --> E[Entities]
E --> F[DTOs]
F --> G[Endpoints]
G --> H[Services]
H --> I[Authentication]
-
Data/
ποΈ EF Core Context & MigrationsCREATE TABLE Users ( Id INT PRIMARY KEY, Username NVARCHAR(50) UNIQUE, -- ... other fields );
-
Endpoints/
πͺ API Gatewaysapp.MapPost("/api/votes", (CreateVoteDto dto) => { // Voting logic }).RequireAuthorization();
graph TB
A[Components] --> B[Pages]
B --> C[Login/Dashboard]
A --> D[Services]
D --> E[API Communication]
E --> F[State Management]
- Blazor WASM Hybrid SSR
β‘ Combines server-side and client-side rendering - Syncfusion Integration
π Beautiful data visualization for results - JWT Interceptor
π Automatic token handling
Before getting started with OnlineVotingSystem.api.git, ensure your runtime environment meets the following requirements:
- Programming Language: CSharp
- Package Manager: Nuget
- Database: SQLite
- .NET SDK: Ensure you have the .NET SDK installed. You can download it from the official .NET website.
THIS INSTRUCTIONS WILL WORK FOR 99.9% AND FOR THAT 0.1% HELP YOURSELF MAN!
-
Clone the
OnlineVotingSystem.api.gitrepository:β― git clone https://github.com/Flow-Pie/OnlineVotingSystem.api.git
-
Navigate to the project directory:
β― cd OnlineVotingSystem.api.git
-
Clean the project:
β― dotnet clean
-
Build the project:
β― dotnet build
-
Restore the project dependencies using NuGet:
β― dotnet restore
The solution contains two projects: OnlineVotingSystem.api and application layer WebUI. Follow the steps below to run each project.
-
Navigate to the
OnlineVotingSystem.apidirectory:β― cd OnlineVotingSystem.api -
Run the project:
β― dotnet run
-
Navigate to the
WebUIdirectory:β― cd WebUI -
Run the project:
β― dotnet run
The User Interface will launch
To run the test suite, use the following command:
+ dotnet test
### ποΈ Installation
```bash
# Clone with style!
git clone https://github.com/Flow-Pie/OnlineVotingSystem.api.git && \
cd OnlineVotingSystem.api && \
echo "π Repository cloned successfully!"+ dotnet restore # Get all dependencies
! dotnet build # Compile the solution
# dotnet run # Launch the API// Sample migration command
dotnet ef migrations add "InitialSchema" -o "Data/Migrations"| Layer | Technology | Badge |
|---|---|---|
| Frontend | Blazor WASM | |
| Backend | ASP.NET Core 8 | |
| Database | SQLite/PostgreSQL | |
| Auth | JWT Bearer Tokens |
[Login Screen] [Dashboard] [Election Creation]
βββββββββββββββ βββββββββββββββ βββββββββββββββ
β β β π Charts β β ποΈ Form β
β π Auth β β π Stats β β π Fields β
βββββββββββββββ βββββββββββββββ βββββββββββββββ
- Azure App Service
az webapp up --name voting-system --resource-group DemoSite
- Docker Container
FROM mcr.microsoft.com/dotnet/aspnet:8.0 COPY ./published /app WORKDIR /app ENTRYPOINT ["dotnet", "OnlineVotingSystem.api.dll"]
! We welcome contributions! Please follow our:
+ Code Style Guidelines
+ PR Template Requirements
+ Security Protocolsπ Pro Tip: Use our pre-commit hooks for automatic code formatting!
+ MIT Licensed - Open Source Forever
- Commercial Use Allowed
! Attribution Required