{"id":19764254,"url":"https://github.com/maksarts/taskservice","last_synced_at":"2026-04-11T01:12:20.640Z","repository":{"id":251664710,"uuid":"837720785","full_name":"maksarts/TaskService","owner":"maksarts","description":"Small Jira-like service for tracking corporate tasks","archived":false,"fork":false,"pushed_at":"2024-08-29T16:27:08.000Z","size":112,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-10T23:47:13.629Z","etag":null,"topics":["docker","docker-compose","hibernate","java","postgresql","rest-api","spring","spring-boot","spring-security"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/maksarts.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-03T20:23:20.000Z","updated_at":"2024-08-29T16:27:12.000Z","dependencies_parsed_at":"2024-08-14T17:19:32.243Z","dependency_job_id":"bf18a917-70bd-4d51-b27f-adb5e78321bf","html_url":"https://github.com/maksarts/TaskService","commit_stats":null,"previous_names":["maksarts/taskservice"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maksarts%2FTaskService","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maksarts%2FTaskService/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maksarts%2FTaskService/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maksarts%2FTaskService/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maksarts","download_url":"https://codeload.github.com/maksarts/TaskService/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241096174,"owners_count":19908930,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","docker-compose","hibernate","java","postgresql","rest-api","spring","spring-boot","spring-security"],"created_at":"2024-11-12T04:12:56.799Z","updated_at":"2026-04-11T01:12:20.607Z","avatar_url":"https://github.com/maksarts.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TaskService\nThis repository showcases a project that demonstrates the implementation of Jira-like service \nfor task management, using JPA Hibernate, PostgreSQL and provides secure access using \nJSON Web Tokens (JWT) with Spring Boot 3 and Spring Security 6. \nThe project includes the following functionalities:\n\n- User Registration and Login with JWT Authentication\n- Refresh Token stored in db\n- Create tasks with specified description, status and priority\n- Assign or reassign executors, change status and manage workflow of tasks\n- Writing comments under tasks\n- OpenAPI Documentation Integration (Swagger)\n\n# Technologies\n\n- Spring Boot 3.1\n- Spring Security\n- Spring Web\n- Spring Test\n- Spring Data JPA\n- Hibernate\n- Spring Boot Validation\n- JSON Web Tokens (JWT)\n- BCrypt\n- Maven\n- OpenAPI Swagger\n- Lombok, Jackson\n- PostgreSQL\n- Docker, dockerfile-maven-plugin, docker-compose\n\n# Getting Started\nTo get started with this project, you will need to have the following installed on your local machine:\n- JDK 17+\n- Maven 3+\n- Docker engine 27+\n\n## 1. Clone this repository\n\n## 2. Run tests\n1. Go to project's root directory (```.../TaskService/```)\n2. Setup test database with \n```bash\ndocker-compose -f ./docker-compose-test.yaml up -d\n```\n3. Run\n```bash\nmvn test\n```\n5. If everything done well you will see something like this:\n```   \n[INFO] Tests run: 9, Failures: 0, Errors: 0, Skipped: 0\n[INFO]\n[INFO] ------------------------------------------------\n[INFO] BUILD SUCCESS\n[INFO] ------------------------------------------------\n[INFO] Total time:  43.252 s\n```\n\n### Tested on:\n```bash\nmvn --version\n``` \n=\u003e\n```\nApache Maven 3.8.7 (b89d5959fcde851dcb1c8946a785a163f14e1e29)\nMaven home: C:\\Program Files\\Maven\\apache-maven-3.8.7\nJava version: 17.0.11, vendor: Oracle Corporation, runtime: C:\\Program Files\\Java\\jdk-17\nDefault locale: ru_RU, platform encoding: Cp1251\nOS name: \"windows 10\", version: \"10.0\", arch: \"amd64\", family: \"windows\"\n```\n```bash \ndocker --version\n``` \n=\u003e\n```Docker version 27.1.1, build 6312585```\n\n## 3. Service setup (local)\n1. Go to project's root directory (```.../TaskService/```)\n2. Configure ```.env``` file according scheme below and place it into project's root directory\n```dotenv\nPOSTGRES_USER=user\nPOSTGRES_PASSWORD=password\nSECURITY_USER=user\nSECURITY_PASSWORD=password\n```\n3. Build project and create image using \n```bash\nmvn package -DskipTests=true dockerfile:build\n```\nIf evererything is fine you will see\n```\n[INFO] ----------------\n[INFO] BUILD SUCCESS\n[INFO] ----------------\n```\n3. Run whole application (Spring Boot service + PostgreSQL DB) using command\n###### *Note: you may need to delete container with database used for tests because it uses same 5432 port with dev database*\n```bash\ndocker-compose up -d\n```\nIf it executes successfully you will see\n```\n[+] Running 3/3\n    ✔ Network taskservice_core  Created                                                                                                       1.5s \n    ✔ Container taskservice_db  Started                                                                                                      15.7s \n    ✔ Container taskservice     Started\n```\n## 4. TaskService workflow (local)\nSwagger API definition may be found on\n```link \nlocalhost:8080/taskservice-doc\n```\n### Simple examples using Postman:\n#### 1. Register new user:\n```REST\nPOST http://localhost:8080/taskservice/api/v1/auth/register\n```\n```json\n{\n  \"email\": \"user@gmail.com\",\n  \"name\": \"User\",\n  \"password\": \"password\"\n}\n```\nResponse:\n```json\n{\n    \"email\": \"user@gmail.com\",\n    \"token\": \"\u003cJWT-token\u003e\",\n    \"errMsg\": null,\n    \"refreshToken\": \"\u003crefresh-token\u003e\",\n    \"tokenType\": \"BEARER\"\n}\n```\n#### 2. Authenticate with created user credentials:\n```REST\nPOST http://localhost:8080/taskservice/api/v1/auth/authenticate\n```\n```json\n{\n  \"email\": \"user@gmail.com\",\n  \"password\": \"password\"\n}\n```\nResponse:\n```json\n{\n    \"email\": \"user@gmail.com\",\n    \"token\": \"\u003cJWT-token\u003e\",\n    \"errMsg\": null,\n    \"refreshToken\": \"\u003crefresh-token\u003e\",\n    \"tokenType\": \"BEARER\"\n}\n```\n##### *Note: next requests requires Bearer auth in each of them*\n#### 3. Create new tasks \n(if you include ```\"executorEmail\"``` in your requests this user should be already registered)\n```REST\nPOST http://localhost:8080/taskservice/api/v1/createTask\n```\n```json\n{\n  \"title\": \"My task\",\n  \"description\": \"Some description\",\n  \"priority\": 10,\n  \"executorEmail\": \"anotheruser@gmail.com\"\n}\n```\nResponse:\n```json\n{\n  \"id\": 1,\n  \"title\": \"My task\",\n  \"description\": \"Some description\",\n  \"priority\": 10,\n  \"authorEmail\": {\n    \"email\": \"user@gmail.com\",\n    \"name\": \"User\"\n  },\n  \"executorEmail\": {\n    \"email\": \"anotheruser@gmail.com\",\n    \"name\": \"anotheruser\"\n  },\n  \"createdTs\": \"2024-08-15T12:41:47.493+00:00\",\n  \"taskStatus\": \"OPEN\"\n}\n```\n#### 4. Get tasks of author\nGetting tasks of author ```user@gmail.com```, \nresponse is pageable as well so we looking for first page (0-indexed) and using\nstandart ```pageSize=10```\n```REST\nGET http://localhost:8080/taskservice/api/v1/getTaskByAuthor/user@gmail.com/0?pageSize=10\n```\nResponse represented as list:\n```json\n[\n  {\n    \"id\": 4,\n    \"title\": \"My task 2\",\n    \"description\": \"Some description\",\n    \"priority\": 10,\n    \"authorEmail\": {\n      \"email\": \"user@gmail.com\",\n      \"name\": \"User\"\n    },\n    \"executorEmail\": {\n      \"email\": \"anotheruser@gmail.com\",\n      \"name\": \"anotheruser\"\n    },\n    \"createdTs\": \"2024-08-15T12:41:47.493+00:00\",\n    \"taskStatus\": \"OPEN\"\n  },\n  {\n    \"id\": 3,\n    \"title\": \"My task\",\n    \"description\": \"Some description\",\n    \"priority\": 10,\n    \"authorEmail\": {\n      \"email\": \"user@gmail.com\",\n      \"name\": \"User\"\n    },\n    \"executorEmail\": {\n      \"email\": \"anotheruser@gmail.com\",\n      \"name\": \"anotheruser\"\n    },\n    \"createdTs\": \"2024-08-15T12:37:28.448+00:00\",\n    \"taskStatus\": \"OPEN\"\n  },\n  {\n    \"id\": 2,\n    \"title\": \"UserTask2\",\n    \"description\": \"Desc 2\",\n    \"priority\": 0,\n    \"authorEmail\": {\n      \"email\": \"user@gmail.com\",\n      \"name\": \"User\"\n    },\n    \"executorEmail\": null,\n    \"createdTs\": \"2024-08-15T12:21:57.233+00:00\",\n    \"taskStatus\": \"OPEN\"\n  },\n  ... etc.\n```\n\n#### 5. Change task status\nPossible statuses (case-insensetive):\n```OPEN, PROGRESS, WAITING, RESOLVED```\n```REST\nPUT http://localhost:8080/taskservice/api/v1/updateTaskStatus?id=4\u0026status=PROGRESS\n```\nResponse:\n```json\n{\n  \"id\": 4,\n  \"title\": \"My task 2\",\n  \"description\": \"Some description\",\n  \"priority\": 10,\n  \"authorEmail\": {\n    \"email\": \"user@gmail.com\",\n    \"name\": \"User\"\n  },\n  \"executorEmail\": {\n    \"email\": \"anotheruser@gmail.com\",\n    \"name\": \"anotheruser\"\n  },\n  \"createdTs\": \"2024-08-15T12:41:47.493+00:00\",\n  \"taskStatus\": \"PROGRESS\"\n}\n```\n\n### All possible actions you will find in Swagger, thank you for your attention :)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaksarts%2Ftaskservice","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaksarts%2Ftaskservice","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaksarts%2Ftaskservice/lists"}