VotePulse is a secure and efficient e-voting application built with the MERN stack. It allows users to cast votes and provides admins with the ability to view results in real-time. The app ensures secure voting through JWT token authentication and role-based authorization, while the modern and intuitive interface enhances the voting experience.
- User voting functionality with secure authentication.
- Admin dashboard to view voting results.
- JWT token-based authentication for secure access.
- Role-based authorization for user and admin roles.
- Modern UI/UX using Shadcn UI for a sleek and intuitive design.
- Real-time data fetching with Tanstack Query.
- Axios for posting and managing data requests.
To set up the project locally, follow these steps:
-
Clone the repository:
git clone https://github.com/MasabBinZia/VotePulse.git
-
Navigate into the project directory:
cd votepulse
-
Install dependencies for both frontend and backend:
# For the backend cd backend npm install # For the frontend cd ../frontend npm install
-
Create a
.env
file in the backend directory with the following environment variables:PORT=5000 MONGO_URI=your_mongodb_uri JWT_SECRET=your_jwt_secret
-
Start the backend server:
cd backend npm run start
-
Start the frontend application:
cd frontend npm run start
- Users can register and log in to cast their votes.
- Admins have access to a dashboard to view voting results and statistics.
- The app ensures security using JWT tokens for authentication and role-based access control.
- MongoDB: For database storage of users, votes, and results.
- Express: Backend framework for handling server-side logic and API endpoints.
- React: Frontend for building the user interface.
- Node.js: Backend runtime for building the server.
- Shadcn UI: For designing a modern and user-friendly interface.
- JWT (JSON Web Tokens): For secure authentication and authorization.
- Tanstack Query: For efficient and real-time data fetching.
- Axios: For handling HTTP requests to the backend.
Contributions are welcome! Please fork this repository and submit a pull request for any enhancements or bug fixes.
This project is licensed under the MIT License.