Task Management System — Backend (Spring Boot)
About the project**
Task Management System is a lightweight, backend-first task management API built with Spring Boot. It provides CRUD operations for tasks and users and includes task-assignment features, status tracking, deadlines/priorities, and timestamps. The backend is intended to be consumed by a frontend (CORS is enabled for http://localhost:4200).
Base API path: http://localhost:8080/api/v1/task
Key features
Create, read, update and delete tasks Assign / unassign tasks to users Mark tasks as completed / uncompleted List free (unassigned & not-completed) tasks Query tasks by owner ordered by date Simple business rules: deadlines, priorities, completed/uncompleted, timestamps Simple ResourceNotFoundException mapping for 404s Unit test scaffold (Spring Boot test present) Tech stack Java (Spring Boot — REST controllers, services, repositories) JPA / Hibernate (Task and User entities) Jakarta Validation for request validation Maven build Database: pluggable (H2, MySQL, Postgres supported) CORS configured for http://localhost:4200 Models (Task) Common Task fields (example):
id — unique identifier name — task title description — task description date — creation or scheduled date (epoch millis) deadline — deadline (epoch millis) priority — high / medium / low status — completed / not completed (or boolean) owner — assigned user (nullable) creatorName — name of the creator createdAt / updatedAt / completedAt — timestamps HTTP API (endpoints) Base path: /api/v1/task
GET /all List all tasks.
POST /createtask Create a new task. Expects JSON Task payload.
DELETE /delete/{id} Delete task by id.
PUT /update/{id} Update an existing task. Expects JSON Task payload.
GET /freetask List tasks that have no owner and are not completed.
GET /gettaskbyid/{id} Get task details by id.
GET /assigntask/{userId}/{taskId} Assign a task to a user.
GET /unassigntask/{userId}/{taskId} Unassign a task from a user.
GET /task/mark-done/{id} Mark task as completed.
GET /task/unmark-done/{id} Mark task as not completed.
PUT /change-assignee Change the assignee by sending a Task object with the desired owner (in request body).
Notes:
Dates are typically represented as epoch milliseconds in JSON payloads. Validation (Jakarta Validation) will return errors for invalid request bodies. Quick start (backend) Clone the repository bash git clone https://github.com/Sudheerenagandula/Task-Management-System.git cd Task-Management-System Configure application properties Edit taskmanagmentbackend/src/main/resources/application.properties to set your datasource. Example configurations: H2 (in-memory) example: properties spring.datasource.url=jdbc:h2:mem:taskdb spring.datasource.driverClassName=org.h2.Driver spring.datasource.username=sa spring.datasource.password= spring.jpa.hibernate.ddl-auto=update spring.h2.console.enabled=true
MySQL example: properties spring.datasource.url=jdbc:mysql://localhost:3306/taskdb?useSSL=false&serverTimezone=UTC spring.datasource.username=your_mysql_user spring.datasource.password=your_mysql_password spring.jpa.hibernate.ddl-auto=update spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL8Dialect Build and run bash mvn clean package mvn spring-boot:run
java -jar target/taskmanagmentbackend-*.jar API should be available at: http://localhost:8080/api/v1/task
Example curl (create task)
bash
curl -X POST http://localhost:8080/api/v1/task/createtask
-H "Content-Type: application/json"
-d '{
"name": "Write docs",
"description": "Write README",
"date": 1670000000000,
"creatorName": "Alice",
"priority": "high"
}'
Notes & tips
CORS: frontend on http://localhost:4200 is allowed by default. Use epoch milliseconds for date / deadline fields unless otherwise documented in the API. Check ResourceNotFoundException handling for 404 semantics. Run the included Spring Boot tests to validate functionality: mvn test.