Day 12 · 1 Hour
Capstone Project
Build a complete Student Management System to show in interviews — from scratch.
🔥 Real-World Hook (0–5 min)
In every job interview, they ask: "Show me something you built." Not a tutorial. Not a copy-paste project. Something you built from scratch.
Today you build your capstone: a complete Student Management System with frontend + Spring Boot + MySQL. This goes on your GitHub. This is what you show in interviews.
🌟 What You'll Build (5–20 min)
💡 Capstone Spec
Student Management System
✔ Add / edit / delete students (name, email, dept, GPA, year)
✔ View all students in a table with search
✔ Dashboard: total students, average GPA, students per dept
✔ Spring Boot backend (port 8080) + MySQL + React or HTML frontend
✔ Deployed and accessible via URL
💻 Live Coding — Project Structure (20–40 min)
student-management/
├─ backend/
│ ├─ src/main/java/com/internship/
│ │ ├─ entity/Student.java
│ │ ├─ repository/StudentRepository.java
│ │ ├─ service/StudentService.java
│ │ └─ controller/StudentController.java
│ └─ src/main/resources/application.properties
└─ frontend/
├─ index.html (student list + search)
├─ dashboard.html (stats)
└─ app.js (all fetch calls)
// StudentService.java — business logic layer @Service public class StudentService { @Autowired private StudentRepository repo; public Student createStudent(Student s) { if (repo.existsByEmail(s.getEmail())) throw new RuntimeException("Email already registered"); return repo.save(s); } public Map<String, Object> getDashboardStats() { long total = repo.count(); double avgGpa = repo.findAll().stream() .mapToDouble(Student::getGpa).average().orElse(0); return Map.of("total", total, "avgGpa", avgGpa); } }
🎯 You Code It (40–55 min) — Build the Capstone
- Create the folder structure above in IntelliJ
- Copy your
Studententity,StudentRepository, andCorsConfigfrom earlier days - Build
StudentServicewith: createStudent (check duplicate email), getDashboardStats - Build
StudentControllerwith all CRUD +GET /api/stats - Build
index.html: table of all students + search box + delete buttons - Build
dashboard.html: stats cards pulling from/api/stats - Goal: Complete working app with at least 10 students in the DB
📄 Day 12 Cheat Sheet — Capstone Architecture
Layers
| Controller | HTTP in/out only |
| Service | All business logic |
| Repository | DB queries only |
| Entity | DB table structure |
| DTO | API request/response shape |
Common Patterns
| repo.existsByEmail(e) | Unique check |
| repo.findByDept(d) | Filter query |
| repo.findAll(Sort.by("gpa").descending()) | Sorted list |
| Map.of("k",v,"k2",v2) | Quick JSON map |
| @Transactional | DB transaction |
Project Checklist
| ✅ Entity with @Id, @Column | DB model |
| ✅ Repository extends JpaRepository | CRUD free |
| ✅ Service with business rules | Logic layer |
| ✅ Controller with validation | API layer |
| ✅ CorsConfig for frontend | Allow browser |
| ✅ Frontend calls API | Full stack |
Interview Questions
| Why separate Service layer? | Testable business logic |
| What is ORM? | Java objects <-> DB tables |
| What is REST? | Stateless HTTP API standard |
| What is CORS? | Browser security for cross-origin |
| Explain @Transactional | All-or-nothing DB ops |