- 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)
- User can vote for a candidate (only once)
- Admin cannot vote
- Node.js
- Express.js
- MongoDB
- Postman
- Atlas
- 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