A Spring Boot-based RESTful Task Management System that enables users to securely manage tasks — create, update, delete, and track progress — with JWT-based authentication, database persistence, and container-ready architecture.
User Authentication & Authorization
- Secure login/register using Spring Security + JWT
- Role-based access control for users
Task Management APIs
- Create, update, delete, and list tasks
- Each user can manage their own tasks independently
Persistence & ORM
- Data persisted via Spring Data JPA (Hibernate)
- Currently runs on H2 in-memory database (can easily switch to MySQL)
Container-Ready
- Includes
Dockerfileanddocker-compose.ymlfor one-command deployment - Stateless architecture for cloud scalability
Developer Tools
- Live H2 console for debugging
- In-memory database auto-schema creation
- Easily extensible for PostgreSQL or MySQL
| Layer | Technology |
|---|---|
| Backend | Spring Boot 2.7.x |
| Security | Spring Security, JWT |
| Database | H2 (In-Memory) / MySQL (switchable) |
| ORM | Hibernate / JPA |
| Build Tool | Maven |
| Containerization | Docker |
| Language | Java 11 |
| Testing | JUnit (Spring Boot Starter Test) |
┌──────────────────────────────┐
│ REST Controller │
│ (Handles API requests & maps) │
└──────────────┬────────────────┘
│
▼
┌──────────────────────────────┐
│ Service Layer │
│ (Business logic, validation) │
└──────────────┬────────────────┘
│
▼
┌──────────────────────────────┐
│ Repository Layer │
│ (CRUD operations via JPA/HQL) │
└──────────────┬────────────────┘
│
▼
┌──────────────────────────────┐
│ H2 / MySQL Database │
│ (Data persistence & relations)│
└──────────────────────────────┘
▲
│
┌──────────────────────────────┐
│ JWT Auth + Spring Security │
│ (Access control, token verify)│
└──────────────────────────────┘
**## API Endpoints Overview**
| Method | Endpoint | Description |
| :----- | :------------------- | :----------------------------------- |
| POST | `/api/auth/register` | Register a new user |
| POST | `/api/auth/login` | Authenticate user and return JWT |
| GET | `/api/tasks` | Get all tasks for the logged-in user |
| POST | `/api/tasks` | Create a new task |
| PUT | `/api/tasks/{id}` | Update an existing task |
| DELETE | `/api/tasks/{id}` | Delete a task |
**POST** `/api/auth/login`
```json
{
"username": "hariish",
"password": "password123"
}
{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}