This is a backend application for a voting system where users can vote for candidates. It provides functionalities for user authentication, candidate management, and voting.
- User sign up and login with Aadhar Card Number and password
- User can view the list of candidates
- User can vote for a candidate (only once)
- Admin can manage candidates (add, update, delete)
- Admin cannot vote
- Node.js
- Express.js
- MongoDB
- JSON Web Tokens (JWT) for authentication
- POST /signup: Sign up a user
- POST /login: Login a user
- GET /candidates: Get the list of candidates
- POST /candidates: Add a new candidate (Admin only)
- PUT /candidates/:id: Update a candidate by ID (Admin only)
- DELETE /candidates/:id: Delete a candidate by ID (Admin only)
- GET /candidates/vote/count: Get the count of votes for each candidate
- POST /candidates/vote/:id: Vote for a candidate (User only)
- GET /users/profile: Get user profile information
- PUT /users/profile/password: Change user password