A full-stack voting application built with:
- 🎯 Frontend: Angular (
poll-app) - ☕ Backend: Spring Boot (
votingapp) - 🛢️ Database: MySQL
SpringBootAngularVotingApp/
├── poll-app/ # Angular frontend application
├── votingapp/ # Spring Boot backend (REST API)
└── README.md
- Create polls with multiple options
- View all polls and options
- Vote on poll options
- Automatically updates vote counts
- Responsive, clean UI with emoji indicators
git clone https://github.com/pramilaOM/SpringBootAngularVotingApp.git
cd SpringBootAngularVotingApp- Java 24
- Maven
- MySQL (or configure H2 in
application.properties)
cd votingapp
./mvnw spring-boot:runServer will run at: http://localhost:8080
- Node.js ≥ 16
- Angular CLI (
npm install -g @angular/cli)
cd poll-app
npm install
ng serveApp available at: http://localhost:4200
| Endpoint | Method | Description | Request Body | Response |
|---|---|---|---|---|
/api/polls |
POST | Create a poll | JSON Poll object | 201 Created |
/api/polls |
GET | Get all polls | — | 200 OK (List) |
/api/polls/{id} |
GET | Get a specific poll by ID | — | 200 OK / 404 |
/api/polls/vote |
POST | Submit a vote for an option | Poll ID + option | 204 No Content |
- Angular 16+
- Spring Boot 3.x
- MySQL / H2
- Maven
- User login & authentication (JWT)
- Poll expiration timers
- Real-time updates via WebSockets
- Pagination & sorting
Pramila OM
🔗 GitHub Profile
This project is licensed under the MIT License.
Angular : ng serve Backend : run VotingappApplication.java