Skip to content

Mohammed-Anwar-Uddin/taskflow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

TaskFlow — Project & Task Management REST API

A production-ready REST API built with Java 17, Spring Boot 3, Spring Security (JWT), and PostgreSQL (Neon).


Tech Stack

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

Setup

1. Clone the repo

git clone https://github.com/Mohammed-Anwar-Uddin/taskflow.git
cd taskflow

2. Configure application.properties

Open 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_characters

Get your connection string from Neon Console → your project → Connection Details → select JDBC format.

3. Run the app

mvn spring-boot:run

App runs at: http://localhost:8080

Tables are auto-created by Hibernate on first run (ddl-auto=update).


API Endpoints

Auth — /api/auth

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>


Projects — /api/projects

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"
}

Tasks — /api/tasks

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
}

Comments — /api/tasks/{taskId}/comments

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."
}

Project Structure

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

Status & Priority Enums

Task Status: TODOIN_PROGRESSDONE

Task Priority: LOW, MEDIUM, HIGH

User Role: ADMIN, MEMBER

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages