https://github.com/shreyapramanik47/voting-application
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.
https://github.com/shreyapramanik47/voting-application
atlas backend expressjs mongodb mongoose nodejs postman-api
Last synced: 3 months ago
JSON representation
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.
- Host: GitHub
- URL: https://github.com/shreyapramanik47/voting-application
- Owner: ShreyaPramanik47
- Created: 2024-09-24T18:53:50.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-03-02T14:56:58.000Z (over 1 year ago)
- Last Synced: 2025-10-11T07:34:07.431Z (9 months ago)
- Topics: atlas, backend, expressjs, mongodb, mongoose, nodejs, postman-api
- Language: JavaScript
- Homepage:
- Size: 28.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Voting Application
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.
Features
- 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
Technologies Used
- Node.js
- Express.js
- MongoDB
- Postman
- Atlas
- JSON Web Tokens (JWT) for authentication
API Endpoints
## Authentication
### Sign Up
- `POST /signup`: Sign up a user
### Login
- `POST /login`: Login a user
## Candidates
### Get Candidates
- `GET /candidates`: Get the list of candidates
### Add Candidate
- `POST /candidates`: Add a new candidate (Admin only)
### Update Candidate
- `PUT /candidates/:id`: Update a candidate by ID (Admin only)
### Delete Candidate
- `DELETE /candidates/:id`: Delete a candidate by ID (Admin only)
## Voting
### Get Vote Count
- `GET /candidates/vote/count`: Get the count of votes for each candidate
### Vote for Candidate
- `POST /candidates/vote/:id`: Vote for a candidate (User only)
## User Profile
### Get Profile
- `GET /users/profile`: Get user profile information
### Change Password
- `PUT /users/profile/password`: Change user password