Website name Poll Votes. This website will be very simple. There will be some features. Users see a Navbar, user can create a poll, User can view and put votes on any poll.
-
Navbar
- Home
Home: Simple Home page and some text.
- Create Poll
Create Poll: The user Creates a Poll following the data: Poll Title, Description, Options, with Add more Options and submit. Then redirect view polls page.
- View Polls
User can be see single poll and put votes on poll. Then redirect view polls page.
- Home
POST -> /create-poll (schema)
{
title,
description,
totalVotes: 0,
options: [
{
name,
voteCount: 0
},
{
name,
voteCount: 0
},
]
}
GET -> /view-polls/:id
GET -> /view-polls
POST -> /vote