🗳️ Student Council Election System

A modern, full-stack voting platform designed for school and university student council elections. This system offers a secure, user-friendly experience for voters and a powerful management interface for administrators.

🚀 Key Features

🛠️ Intelligent Initial Setup

  • No Hardcoded Passwords: On first startup, the system automatically redirects to a setup screen where you can configure unique Admin and Booth credentials.
  • Role-Based Access: Secure login for Administrators (management) and Booths (voting stations).

☁️ Database Redundancy & Cloud Sync

  • Device-to-Device Redundancy: Supports PostgreSQL (via DATABASE_URL) to allow multiple servers to share the same data in real-time.
  • Offline Reliability: Falls back to local SQLite if no cloud database is provided.
  • LAN Ready: Built-in support for access across a Local Area Network (LAN), allowing students to vote from any device on the network.

🗳️ Seamless Voting Experience

  • Step-by-Step Flow: A guided voting process that ensures every student casts a complete and valid ballot.
  • Duplicate Prevention: Tracks voter participation via admission numbers to prevent multiple votes from the same student.
  • Dynamic Ballots: Voters only see the candidates relevant to the positions currently being contested.

📊 Administrative Dashboard

  • Position Management: Create, edit, and order election roles (e.g., President, Secretary).
  • Candidate Management: Add candidates with names, detailed bios, and profile images.
  • Real-Time Results: Instantly view vote counts and rankings as they are cast.
  • Secure Reset: A multi-step confirmation process for clearing election data for a new cycle.

🛠️ Tech Stack


⚙️ Installation & Setup

1. Prerequisites

  • Node.js (v16 or higher)
  • npm (Node Package Manager)

2. Clone and Install

git clone <your-repo-url>
cd student-council-election
npm run install-all

3. Running the Application

To start both the client and server concurrently:

npm run dev

🔄 Enabling Redundancy (Cloud Database)

To keep data synchronized across multiple devices or to ensure data safety if a device fails:

  1. Create a PostgreSQL database (using Supabase, Neon, or Aiven).
  2. Create a .env file in the server/ directory.
  3. Add your connection string:
    DATABASE_URL=postgres://user:password@host:port/dbname
    
  4. Restart the application. The system will automatically migrate the schema to the cloud database.

📱 LAN Access

To allow other devices on your network to access the voting booth:

  1. Ensure the server is running on your main machine.
  2. Find your local IP address (e.g., 192.168.1.15).
  3. Other devices can then access the app via: http://192.168.1.15:5173.
  4. The system will automatically route API requests to your main machine.

🔒 Security Note

Ensure that you use a strong password during the initial setup. For production environments, it is recommended to deploy the backend with SSL/HTTPS.


📄 License

This project is open-source and available under the MIT License.

Description
No description provided
Readme 12 MiB
v1 Latest
2026-05-04 16:09:18 +00:00
Languages
Vue 69.1%
JavaScript 28.8%
CSS 1.5%
HTML 0.6%