Skip to content

unrealwork/parcel-delivery-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

parcel-delivery-app

CI Quality Gate Status Coverage

This project is a solution for the test assignment. Implement API for simple parcel delivery service.

Getting started

Architecture

Implementation

The app is a distributed system that provides simple REST API for parcel delivery service. The main purpose of this project is to demonstrate a modern approach to the development process. The app is developed using a full CI cycle using the following components:

  • Github Actions for CI
  • Sonarcloud for Code Quality
  • Spring infrastructure for microservice development
  • PostgresSQL for data persistence
  • Testcontainers for near-production test environment
  • Docker for easy deployment of the solution

Playground

The main tool to explore the solution is the main page of the project which is available at http://localhost:18080 after deployment. It's a Swagger-like page that provides the ability to authorize and interact with an API.

For demo purposes, special_key is set as default and gives ability to access any API. Also, there are three users are created by default:

The default password is password123. Use it to sign in and then use retrieved JWT accessToken for access to other resources of the app.

img.png

Containerization

The Solution is deployable via docker-compose. Each microservice has its own Dockerfile which is used in the main docker-compose file. Health checks are implemented for each service. By default, only one service exposes a port for an interaction, dependent services are hidden behind the docker network.

For development purposes solution provides additional compose files that override default behavior:

  • docker-compose.dev.yml - exposes service ports for local development
  • docker-compose.ci.yml - contains CI-specific properties which are used during deploy test in CI

Used technologies

  • Java 17
  • Spring Boot 3
  • Spring Cloud Gateway
  • Spring Cloud Streams
  • Docker
  • Springdoc
  • Testcontainers
  • PostgreSQL
  • Liquibase
  • Spring Data JPA
  • Kafka
  • Sonar
  • Github actions

User stories

Each user story has a corresponding API endpoint which is specified in the table:

User Admin Courier
Can create an user account and log in Can change the status of a parcel delivery order Can log in
Can create a parcel delivery order Can view all parcel delivery orders Can view all parcel delivery orders that assigned to him
Can change the destination of a parcel delivery order** Can assign parcel delivery order to courier Can change the status of a parcel delivery order
Can cancel a parcel delivery order Can log in and create a courier account Can see the details of a delivery order
Can see the details of a delivery Can track the delivery order by coordinates
Can see all parcel delivery orders that he/she created Can see list of couriers with their statuses