A basic full-stack voting system using React JS, Tailwind CSS, Node.js, Express.js, and MySQL (XAMPP) with login authentication.
- β User Registration & Login (Session-based)
- π³οΈ Vote for your favorite candidate (once per user)
- π‘οΈ Authentication & session management
- πΎ All data stored locally using MySQL (via XAMPP)
- π¨ Simple responsive UI using Tailwind CSS
voting-system/
βββ client/ # Frontend (React + Tailwind)
βββ server/ # Backend (Node.js + Express)
β βββ db.sql # SQL script to create database and tables
- Node.js and npm
- XAMPP (with MySQL)
- Git
- Open terminal and navigate to the
serverfolder - Run:
npm install node server.js
- The backend will start on
http://localhost:5000
- Open terminal and navigate to the
clientfolder - Run:
npm install npm start
- Frontend will run at
http://localhost:3000
- Start Apache and MySQL using XAMPP
- Open http://localhost/phpmyadmin
- Import the
db.sqlfile from theserverfolder to create:- Database:
voting_db - Tables:
users,votes
- Database:
- User registers with a username and password
- User logs in and is authenticated
- After login, user can vote for a candidate
- Each user can vote only once
This project is open source and free to use for educational purposes.
