Skip to content

Repository files navigation


✨ Built by 0x4B47 developers with love for democratic innovation ✨


# 🗳️ Online Voting System - Secure Digital Democracy```diff+---------------------------------------------------------------+
| 🚀 Modern | 🔐 Secure | ⚡ Efficient | 🎯 User-Friendly |
+---------------------------------------------------------------+

🌟 Project Overview

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
Loading

🎨 Feature Showcase

🔑 Authentication Suite

+ JWT Token Security+ Role-based Access Control+ Password Hashing (BCrypt)

📊 Election Management

graph TD
A[Create Election] --> B[Define Positions]
B --> C[Add Candidates]
C --> D[Configure Timeline]
D --> E[Launch]
Loading

🗳️ Voting Experience

+ One-Vote-Per-User Enforcement+ Anonymous Ballot System+ Real-time Vote Counting

🏗️ Project Architecture

🖥️ Backend Structure (OnlineVotingSystem.api)

graph LR
P[Program.cs] --> C[Configuration]
C --> D[Database]
D --> E[Entities]
E --> F[DTOs]
F --> G[Endpoints]
G --> H[Services]
H --> I[Authentication]
Loading

Core Components:

  • Data/
    🗃️ EF Core Context & Migrations

    CREATETABLEUsers (
    Id INTPRIMARY KEY,
    Username NVARCHAR(50) UNIQUE,
    -- ... other fields
    );
  • Endpoints/
    🚪 API Gateways

    app.MapPost("/api/votes",(CreateVoteDtodto)=>{// Voting logic}).RequireAuthorization();

💻 Frontend Structure (WebUI)

graph TB
A[Components] --> B[Pages]
B --> C[Login/Dashboard]
A --> D[Services]
D --> E[API Communication]
E --> F[State Management]
Loading

Key Features:

  • Blazor WASM Hybrid SSR
    ⚡ Combines server-side and client-side rendering
  • Syncfusion Integration
    📊 Beautiful data visualization for results
  • JWT Interceptor
    🔐 Automatic token handling

🛠️ Developer Quickstart

🚀 Getting Started

☑️ Prerequisites

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.

⚙️ Installation

THIS INSTRUCTIONS WILL WORK FOR 99.9% AND FOR THAT 0.1% HELP YOURSELF MAN!

Clone the Repository

  1. Clone the OnlineVotingSystem.api.git repository:

    ❯ git clone https://github.com/Flow-Pie/OnlineVotingSystem.api.git
  2. Navigate to the project directory:

    cd OnlineVotingSystem.api.git

Cleaning the project

  1. Clean the project:

    ❯ dotnet clean

    Build the project

  2. Build the project:

    ❯ dotnet build

    Restore Dependencies

  3. Restore the project dependencies using NuGet:

    ❯ dotnet restore

🤖 Running the Projects

The solution contains two projects: OnlineVotingSystem.api and application layer WebUI. Follow the steps below to run each project.

Running OnlineVotingSystem.api

  1. Navigate to the OnlineVotingSystem.api directory:

    cd OnlineVotingSystem.api
  2. Run the project:

    ❯ dotnet run 

Running Interface Application layer ie WebUI

  1. Navigate to the WebUI directory:

    cd WebUI
  2. Run the project:

    ❯ dotnet run 

The User Interface will launch

🧪 Testing(optional)

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!"

⚙️ Setup Guide summary

+ dotnet restore # Get all dependencies! dotnet build # Compile the solution# dotnet run # Launch the API

🔄 Database Migrations

// Sample migration commanddotnetefmigrationsadd"InitialSchema"-o "Data/Migrations"

📊 Technology Stack

LayerTechnologyBadge
FrontendBlazor WASMBlazor
BackendASP.NET Core 8.NET
DatabaseSQLite/PostgreSQLSQLite
AuthJWT Bearer TokensJWT

🌈 UI Component Gallery

[Login Screen] [Dashboard] [Election Creation]
┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ │ │ 📊 Charts │ │ 🏗️ Form │
│ 🔐 Auth │ │ 📈 Stats │ │ 📝 Fields │
└─────────────┘ └─────────────┘ └─────────────┘

🚀 Deployment Options

  1. Azure App Service
    az webapp up --name voting-system --resource-group DemoSite
  2. Docker Container
    FROM mcr.microsoft.com/dotnet/aspnet:8.0
    COPY ./published /app
    WORKDIR /app
    ENTRYPOINT ["dotnet", "OnlineVotingSystem.api.dll"]

🤝 Contribution Guidelines

! 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!

📜 License

+ MIT Licensed - Open Source Forever- Commercial Use Allowed! Attribution Required

About

An Online Voting System is a secure, web-based application that allows eligible voters to cast their votes electronically from any location

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages