A production-ready REST API built with Java 17, Spring Boot 3, Spring Security (JWT), and PostgreSQL (Neon).
| Layer | Technology |
|---|---|
| Language | Java 17 |
| Framework | Spring Boot 3.2 |
| Security | Spring Security + JWT (jjwt) |
| ORM | Spring Data JPA / Hibernate |
| Database | PostgreSQL (Neon cloud) |
| Build Tool | Maven |
git clone https://github.com/Mohammed-Anwar-Uddin/taskflow.git
cd taskflowOpen src/main/resources/application.properties and fill in your Neon details:
spring.datasource.url=jdbc:postgresql://<your-neon-host>/<your-db>?sslmode=require
spring.datasource.username=your_neon_username
spring.datasource.password=your_neon_password
app.jwt.secret=any_long_random_string_at_least_32_charactersGet your connection string from Neon Console → your project → Connection Details → select JDBC format.
mvn spring-boot:runApp runs at: http://localhost:8080
Tables are auto-created by Hibernate on first run (ddl-auto=update).
| Method | Endpoint | Auth | Description |
|---|---|---|---|
| POST | /api/auth/register |
❌ | Register user |
| POST | /api/auth/login |
❌ | Login & get JWT |
Register body:
{
"username": "anwar",
"email": "anwar@example.com",
"password": "secret123",
"role": "ADMIN"
}Login body:
{
"email": "anwar@example.com",
"password": "secret123"
}Response:
{
"token": "eyJhbGci...",
"type": "Bearer",
"userId": 1,
"username": "anwar",
"email": "anwar@example.com",
"role": "ADMIN"
}All subsequent requests need:
Authorization: Bearer <token>
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/projects |
Create a project |
| GET | /api/projects |
Get my projects |
| GET | /api/projects/{id} |
Get project by ID |
| PUT | /api/projects/{id} |
Update project |
| DELETE | /api/projects/{id} |
Delete project |
Create/Update body:
{
"name": "EzyRyd Backend",
"description": "Transportation platform backend"
}| Method | Endpoint | Description |
|---|---|---|
| POST | /api/tasks |
Create a task |
| GET | /api/tasks/project/{projectId} |
Get tasks by project |
| GET | /api/tasks/project/{projectId}/status/{status} |
Filter by status (TODO/IN_PROGRESS/DONE) |
| GET | /api/tasks/my-tasks |
Get tasks assigned to me |
| GET | /api/tasks/{id} |
Get task by ID |
| PUT | /api/tasks/{id} |
Update task |
| PATCH | /api/tasks/{id}/status?status=IN_PROGRESS |
Update status only |
| DELETE | /api/tasks/{id} |
Delete task |
Create Task body:
{
"title": "Build auth module",
"description": "JWT login and register",
"status": "TODO",
"priority": "HIGH",
"dueDate": "2025-06-30",
"projectId": 1,
"assigneeId": 2
}| Method | Endpoint | Description |
|---|---|---|
| POST | /api/tasks/{taskId}/comments |
Add a comment |
| GET | /api/tasks/{taskId}/comments |
Get all comments |
| DELETE | /api/tasks/{taskId}/comments/{commentId} |
Delete your comment |
Comment body:
{
"content": "This is done, moving to review."
}src/main/java/com/taskflow/
├── config/ # Security config
├── controller/ # REST controllers
├── dto/
│ ├── request/ # Incoming request bodies
│ └── response/ # Outgoing response shapes
├── entity/ # JPA entities (User, Project, Task, Comment)
├── exception/ # Custom exceptions + global handler
├── repository/ # Spring Data JPA repositories
├── security/ # JWT filter, JwtUtil, UserDetailsService
└── service/impl/ # Business logic
Task Status: TODO → IN_PROGRESS → DONE
Task Priority: LOW, MEDIUM, HIGH
User Role: ADMIN, MEMBER