Project Overview
This is the first project in my Spring Boot portfolio journey. It is a Task Management Backend API that allows clients to perform full CRUD (Create, Read, Update, Delete) operations. The goal of this project was to master the core fundamentals of Spring Boot without getting distracted by complex frontend frameworks.
Key Features
Full CRUD Operations – Create, view, update, and delete tasks seamlessly.
Three-Layer Architecture – Clear separation between Controller (web layer), Service (business logic), and Repository (data access).
Global Exception Handling – Consistent, beautiful JSON error responses (404 & 400) using @ControllerAdvice.
DTOs & Validation – Uses TaskRequestDTO and TaskResponseDTO to hide internal entity fields and validate incoming data with @Valid.
In-Memory H2 Database – Run instantly without installing any external database. Includes a web console to view your data.
Atomic Git History – The commit history is clean, with each commit representing a single, working feature (great for portfolio reviews!).
Tech Stack
Language: Java 21 (LTS)
Framework: Spring Boot 3.4.4
Build Tool: Apache Maven
Database: H2 (In-Memory) with Hibernate/JPA
Utilities: Lombok (reduces boilerplate code)
Validation: Jakarta Bean Validation (@NotBlank, @Size, @Valid)
What I Learned
How to set up a Spring Boot 3 project using Spring Initializr.
The importance of the Layered Architecture (Controller-Service-Repository).
How to map Java objects to database tables using JPA/Hibernate.
How to expose RESTful endpoints with precise HTTP status codes (201, 404, 204).
How to handle exceptions globally to return structured JSON errors instead of ugly stack traces.
Why DTOs are critical for security and decoupling internal entities from external clients.
API Endpoints (Quick Reference)
POST /api/tasks – Create a new task
GET /api/tasks – Retrieve all tasks
GET /api/tasks/{id} – Retrieve a single task
PUT /api/tasks/{id} – Fully update a task
DELETE /api/tasks/{id} – Delete a task
Future Improvements
Add JWT Security (User Registration & Login)
Connect to PostgreSQL for production
Build a React.js frontend
Add Unit Testing with JUnit & Mockito




