A full-stack web application for creating and voting on polls, built with React, Spring Boot, MySQL, and JWT Authentication.
| Layer | Technology |
|---|---|
| Frontend | React.js, Ant Design UI Library |
| Backend | Spring Boot (Java), Spring Security |
| Auth | JWT (JSON Web Token) |
| Database | MySQL |
| ORM | Hibernate (JPA) |
| Build Tools | Maven (Backend), NPM (Frontend) |
| API Comm | REST |
- 🔐 JWT-based Authentication
- 📋 Create & Manage Polls
- 🗳️ Vote in Real-Time
- 📊 View Results
- 👥 Role-based Access (
USER,ADMIN) - 🧑 Secure Profile Endpoints
cd polling-app-server
Create a MySQL database:
sql
Copy
Edit
CREATE DATABASE polling_app;
Update application.properties with your DB credentials:
properties
Copy
Edit
spring.datasource.username=your_username
spring.datasource.password=your_password
Run the backend:
bash
Copy
Edit
mvn spring-boot:run
API will be available at: http://localhost:8080
🎨 Frontend Setup (React)
bash
Copy
Edit
cd polling-app-client
npm install
npm start
Frontend will be live at: http://localhost:3000
📂 Project Structure
bash
Copy
Edit
spring-security-react-ant-design-polls-app-master/
│
├── polling-app-server/ # Spring Boot backend
├── polling-app-client/ # React frontend
└── README.md
🛡️ Security
BCrypt password hashing
JWT-based stateless authentication
Role-based access control with Spring Security
CORS policy setup for local dev
📈 Future Enhancements
Admin panel for poll moderation
Email notifications
Real-time updates with WebSockets
Docker containerization
📄 License
MIT License - use freely, just give credit 🙂
🙋♂️ Author
Developed by Sagar Dagle
