Real-time classroom engagement platform built with Spring Boot.
A backend API for teachers to create interactive sessions and students to respond in real-time. Think Kahoot but simpler.
- JWT Authentication - Secure login for teachers and students
- Session Management - Teachers create sessions with 6-digit join codes
- Question Types - MCQ, Rating (1-5), Open Text
- Role-Based Access - Teachers create, students respond
- Swagger Docs - Interactive API documentation
- Java 21
- Spring Boot 4.x
- Spring Security + JWT
- H2 Database (in-memory, for testing)
- Maven
# clone
git clone https://github.com/Raam751/VibeEdu.git
cd VibeEdu
# run
./mvnw spring-boot:runApp runs at http://localhost:8080
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/auth/register |
Register new user |
| POST | /api/auth/login |
Login, get JWT token |
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/sessions |
Create session |
| GET | /api/sessions |
List all sessions |
| GET | /api/sessions/code/{code} |
Join by code (public) |
| PUT | /api/sessions/{id}/start |
Start session |
| PUT | /api/sessions/{id}/end |
End session |
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/questions |
Create question |
| GET | /api/questions/session/{id} |
Get questions for session |
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/responses |
Submit response (Student) |
| GET | /api/responses/question/{id} |
View responses (Teacher) |
Import VibeEdu-Postman.json into Postman for ready-to-use API collection.
Visit http://localhost:8080/swagger-ui.html after starting the app.
Database viewer at http://localhost:8080/h2
- JDBC URL:
jdbc:h2:mem:vibeedu - Username:
sa - Password: (empty)
src/main/java/com/vibeedu/vibeedu/
├── controller/ # REST endpoints
├── service/ # Business logic
├── repository/ # Database access
├── entity/ # JPA entities
├── dto/ # Request/Response objects
├── security/ # JWT auth
├── config/ # App configuration
└── exception/ # Error handling
Register:
POST /api/auth/register
{
"name": "John Doe",
"email": "john@test.com",
"password": "password123",
"role": "TEACHER"
}Create Session:
POST /api/sessions
Authorization: Bearer <token>
{
"title": "Intro to Java"
}Create Question:
POST /api/questions
Authorization: Bearer <token>
{
"sessionId": 1,
"text": "What is 2+2?",
"type": "MCQ",
"options": ["3", "4", "5", "22"]
}Made for learning purposes 📚