This is the backend service for TaskMaster, a task and subtask management application built with Kotlin, Spring Boot, and PostgreSQL (via Docker). It provides REST APIs for managing tasks and their subtasks.
git clone https://github.com/your-username/taskmaster-backend.git
cd taskmaster-backend
### 2. Setup Database with Docker
```bash
docker compose up -d
PostgreSQL will run on localhost:5432 with the following credentials:
User: postgres
Password: postgres
Database: postgres
### 3. Start the app
./gradlew bootRun
🔌 API Endpoints
Base URL: http://localhost:8080/api
Task Endpoints
| Method | Endpoint | Description |
| ------ | ----------------- | ----------------------- |
| GET | `/api/tasks` | Get all tasks |
| GET | `/api/tasks/{id}` | Get task by ID |
| POST | `/api/tasks` | Create a new task |
| PUT | `/api/tasks/{id}` | Update an existing task |
| DELETE | `/api/tasks/{id}` | Delete a task |
Subtask Endpoints
| Method | Endpoint | Description |
| ------ | ----------------------------- | ----------------------- |
| GET | `/api/subtasks/task/{taskId}` | Get subtasks for a task |
| POST | `/api/subtasks/task/{taskId}` | Add subtask to a task |
| PUT | `/api/subtasks/{subtaskId}` | Update a subtask |
| DELETE | `/api/subtasks/{subtaskId}` | Delete a subtask |
To test locally:
Make sure Docker is running (docker compose up -d)
Start the backend: ./gradlew bootRun
Use an API tool like Postman or cURL to test the endpoints (e.g., GET http://localhost:8080/api/tasks)