0–5 min
Real Hook
5–20 min
Core Concept
20–40 min
Live Coding
40–55 min
You Code It
55–60 min
Cheat Sheet
🔥 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
  1. Create the folder structure above in IntelliJ
  2. Copy your Student entity, StudentRepository, and CorsConfig from earlier days
  3. Build StudentService with: createStudent (check duplicate email), getDashboardStats
  4. Build StudentController with all CRUD + GET /api/stats
  5. Build index.html: table of all students + search box + delete buttons
  6. Build dashboard.html: stats cards pulling from /api/stats
  7. Goal: Complete working app with at least 10 students in the DB

📄 Day 12 Cheat Sheet — Capstone Architecture

Layers

ControllerHTTP in/out only
ServiceAll business logic
RepositoryDB queries only
EntityDB table structure
DTOAPI 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
@TransactionalDB transaction

Project Checklist

✅ Entity with @Id, @ColumnDB model
✅ Repository extends JpaRepositoryCRUD free
✅ Service with business rulesLogic layer
✅ Controller with validationAPI layer
✅ CorsConfig for frontendAllow browser
✅ Frontend calls APIFull 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 @TransactionalAll-or-nothing DB ops