Coder Social home page Coder Social logo

taskmanager's Introduction

Taskmanager application (demo project)

Reference Documentation

Minimal Java Version required: 17

Tech stack

  • java 17
  • hibernate 6
  • springboot 3
  • lombok 1.18
  • mapstruct 1.5

Assumptions

  • Task id is autogenerated;
  • Task description has default value: "New reminder". If you create task without description then default value will be taken
  • It is available to change description, dueDate and status by REST API
  • CompletedWhen field of Task is set automatically when the status is changed to DONE
  • CompletedWhen field of Task is deleted automatically when the status is changed to NOT_DONE
  • Task status is changed to Past Due if dueDate is in the past and the status is changed to NOT_DONE
  • Task status is changed to Past Due after creation if dueDate is in the past
  • Task id is required in TaskDto json only for PUT method (when updating task data)
  • It is available to create a new task without TaskDto json, then default parameters will be taken ("New reminder" for the description and null for the dueDate)

Run application

  • Build the project using "mvn clean install" command
  • Create an image with the command "docker image build -t task-manager:latest ."
  • Run docker container using the command "docker run -dp 7002:7002 --name task-manager task-manager:latest"
  • Now you can send requests to http://localhost:7002

Tests

  • You can find the Postman collection "Task Manager.postman_collection.json" in the resources folder. It can be imported into Postman and then executed. It uses localhost:7002 as the host and all the parameters are already configured
  • There are some integration tests as well. You can run them with "mvn clean install" command

Application provides the following REST API:

  • Show all not competed tasks:

    GET /api/v1/task/status/not_done

  • Show task information by id:

    GET /api/v1/task/{id}
    parameters:

    • id : UUID
  • Create new task:

    POST /api/v1/task
    parameters:

    • task : TaskDto
  • Change description or dueDate of task:

    PUT /api/v1/task
    parameters:

    • task : TaskDto
  • Change task status:

    PATCH /api/v1/task/{id}/status/{status}
    parameters:

    • id : UUID
    • status: Task.Status
  • Delete all tasks:

    DELETE /api/v1/task

TaskDto JSON example for creating a new task (although this JSON is not required for creating a new task):

    {
        "description": "Changed Description",
        "dueDate": "2022-03-03 22:01:02"
    }

TaskDto JSON example for updating (TaskDto JSON is required for creation a new task. ID field is required only):

    {
        "id": "37977342-d666-4ef8-9c14-3d9f06678bfb",
        "description": "Changed Description",
        "dueDate": "2022-03-03 22:01:02"
    }

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.