3.7 KiB
3.7 KiB
🗳️ 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
- Frontend: Vue.js 3 (Composition API), Vite, Vue Router
- Backend: Node.js, Express.js
- Database: SQLite (Local) / PostgreSQL (Redundant/Cloud)
- Styling: Vanilla CSS with modern Glassmorphism aesthetics
⚙️ 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
- Frontend: http://localhost:5173
- Backend: http://localhost:3000
🔄 Enabling Redundancy (Cloud Database)
To keep data synchronized across multiple devices or to ensure data safety if a device fails:
- Create a PostgreSQL database (using Supabase, Neon, or Aiven).
- Create a
.envfile in theserver/directory. - Add your connection string:
DATABASE_URL=postgres://user:password@host:port/dbname - 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:
- Ensure the server is running on your main machine.
- Find your local IP address (e.g.,
192.168.1.15). - Other devices can then access the app via:
http://192.168.1.15:5173. - 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.