A RESTful API-based polling application built with Spring Boot and PostgreSQL. Users can register, create polls, add choices, and cast votes.
- Java 17+
- Spring Boot
- PostgreSQL (via Docker Compose)
- Maven
- Docker & Docker Compose
- User Registration & Login
- Create & View Poll Questions
- Add, Update & Delete Choices
- Cast Votes
- JWT-based Authentication
POST /register— Register a new userPOST /login— Login and retrieve JWT token
GET /polls— Get all poll questionsPOST /polls— Create a new poll with choicesGET /polls/{qid}— Get specific poll by IDPUT /polls/{qid}— Update poll question textDELETE /polls/{qid}— Delete poll questionGET polls/{qid}/result- Get result of a poll
POST /polls/{qid}/choices— Add a new choice to a pollPUT /polls/{qid}/choices/{cid}— Update a choiceDELETE /polls/{qid}/choices/{cid}— Delete a choice
POST /polls/{qid}/votes— Cast a vote for a choice
git clone https://github.com/nhAnik/poll-maker.git
cd poll-maker./mvnw spring-boot:runApp runs at: http://localhost:8080
git clone https://github.com/nhAnik/poll-maker.git
cd poll-maker./mvnw clean packagedocker compose upjava -jar target/*.jar./mvnw test