Skip to content

pramilaOM/SpringBootAngularVotingApp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🗳️ SpringBootAngularVotingApp

A full-stack voting application built with:

  • 🎯 Frontend: Angular (poll-app)
  • Backend: Spring Boot (votingapp)
  • 🛢️ Database: MySQL

📦 Project Structure

SpringBootAngularVotingApp/
├── poll-app/        # Angular frontend application
├── votingapp/       # Spring Boot backend (REST API)
└── README.md

✨ Features

  • Create polls with multiple options
  • View all polls and options
  • Vote on poll options
  • Automatically updates vote counts
  • Responsive, clean UI with emoji indicators

🚀 Getting Started

1. Clone the Repository

git clone https://github.com/pramilaOM/SpringBootAngularVotingApp.git
cd SpringBootAngularVotingApp

🔧 Backend - Spring Boot (votingapp/)

✅ Requirements

  • Java 24
  • Maven
  • MySQL (or configure H2 in application.properties)

▶️ Run Spring Boot App

cd votingapp
./mvnw spring-boot:run

Server will run at: http://localhost:8080


🌐 Frontend - Angular (poll-app/)

✅ Requirements

  • Node.js ≥ 16
  • Angular CLI (npm install -g @angular/cli)

▶️ Run Angular App

cd poll-app
npm install
ng serve

App available at: http://localhost:4200


🔗 REST API Reference

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

🛠️ Tech Stack

  • Angular 16+
  • Spring Boot 3.x
  • MySQL / H2
  • Maven

📸 Screenshot

image

🔮 Future Enhancements

  • User login & authentication (JWT)
  • Poll expiration timers
  • Real-time updates via WebSockets
  • Pagination & sorting

🧑‍💻 Author

Pramila OM
🔗 GitHub Profile


📄 License

This project is licensed under the MIT License.

image

Angular : ng serve Backend : run VotingappApplication.java

Releases

No releases published

Packages

No packages published