π³οΈ Welcome to our voting web app! Powered by Node.js, Express.js, MongoDB, and Mongoose, we've created a dynamic platform for all your voting needs. π Create, participate, and view real-time updates on polls, surveys, and elections with ease. π» Your voice matters, and we're here to make sure it's heard securely and conveniently. Let's vote together! π
-
Add a User/Signup :
- Endpoint:
POST /user
- Description: Adds a user to the system with details such as name, role, etc.
- Endpoint:
-
Add a User/Login :
- Endpoint:
POST /user
- Description: Adds a user to the system with details such as name, role, etc.
- Endpoint:
-
Get All User:
- Endpoint:
GET /user
- Description: Retrieves a list of all user in the system.
- Endpoint:
-
Get User Profiles:
- Endpoint:
GET /user/:profiles
- Description: Retrieves a list of user based on their work type (e.g., chef, waiter, manager).
- Endpoint:
-
Update User using Password :
- Endpoint:
PUT /user/:password
- Description: Updates the details of a specific person identified by their ID.
- Endpoint:
-
Add a Candidate:
- Endpoint:
POST /candidate
- Description: Adds a candidate to the system with details such as name, etc. post route to add a candidate
- Endpoint:
-
Get All Menu Items:
- Endpoint:
GET /candidate
- Description: Retrieves a list of all candidate in the system.
- Endpoint:
-
Update a Menu Item:
- Endpoint:
PUT /candidate/:candidateId
- Description: Updates the details of a specific candidate identified by its ID.
- Endpoint:
-
Delete a Menu Item:
- Endpoint:
DELETE /candidate/:candidateId
- Description: Deletes a candidate from the system based on its ID.
- Endpoint:
-
let's Voting
- Endpoint:
POST /candidate/vote/:candidateId
- Description: add a candidate vote from the system based on its ID.
- Endpoint:
-
Vote Count
- Endpoint:
GET /candidate/vote/count
- Description: get a candidate vote count from the system.
- Endpoint:
The User
data model represents information about users in the Villages.
-
Fields:
name
: String (User's name)age
: Number (User's age)email
: Enum (User's email)mobile
: String (User's mobile number)address
: String (User's address)aadharCardNumber
: Number (User's aadharcard number, unique)password
: String (User's password)
-
Example:
{ "name": "Akash", "age": 15, "email": "akash@gmail.com", "mobile": "9323453434", "address": "chikhala", "aadharCardNumber": 122312231223, "password": "1234" }
The MenuItem
data model represents information about menu items available in the hotel.
-
Fields:
name
: String (Candidate's name)party
: String (Candidate's party ex: BJP, NCP)age
: Number (Candidate's age)votes
: Array (Candidate's votes)votesCount
: Number (Candidate's vote count)
-
Example:
{ "name": "Narendra ModiJi", "party": "BHP", "age": 72, }
- Install Dependencies:
npm install