Giter Club home page Giter Club logo

test-task-mail-delivery's Introduction

Mail Delivery Application

The system registers postal items - letters, parcels - their movement between post offices, as well as provides information on the entire history of movement of a particular postal item.

Used technologies

  • Java
  • Spring Boot, Spring Data JPA (to work with entities)
  • PostgreSQL (main DBMS for this project)
  • Maven (package manager to manipulate with dependecies)
  • Flyway(for migration with database)
  • Lombok
  • ModelMapper (for mapping models to and from dto)
  • JUnit5 and Mockito (for testing)

Steps to Setup

1. Clone the application

git clone https://github.com/notas4int/test-task-mail-delivery.git

2. Create PostgreSQL database

create database mail-delivery

3. Change PostreSQL username and password as per your installation

  • open src/main/resources/application.properties
  • change spring.datasource.username and spring.datasource.password as per your PostgreSQL installation

4. Run the app using maven

mvn spring-boot:run

The app will start running at http://localhost:8080

Explore Rest APIs

Users

Method Url Decription Sample Valid Request Type
POST /api/mail/register-postal-item add new postal item registrationRequest
PATCH /api/mail/add-post-office add post office and change status to 'in_the_post_office' postOfficeAddingRequest
PATCH /api/mail/left-postal-item/{id} change status to 'en_route' by id
GET /api/mail/check-postal-item/{id} get status and movement history by id and return postalItemResponse
PATCH /api/mail/receive-postal-item/{id} change status to 'receive' by id
registrationRequest
{
  "mailType": "PARCEL",
  "personIndex": 342,
  "address": "Mira 23",
  "personName": "Vova",
  "postOfficeId": 1
}
postOfficeAddingRequest
{
  "id": 1,
  "postOfficeId": 2
}
example of postalItemResponse
{
  "mailStatus": "EN_ROUTE",
  "postOffices": [
    {
      "id": 2,
      "name": "Post office the second",
      "address": "Veteranov 3"
    },
    {
      "id": 1,
      "name": "Post office first",
      "address": "Mira 23"
    }
  ]
}

Coverage

unit test coverage

integration test coverage

test-task-mail-delivery's People

Contributors

notas4int avatar

Watchers

 avatar

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.