diff --git a/README.md b/README.md index 00a13b1..65967dd 100644 --- a/README.md +++ b/README.md @@ -1,73 +1,33 @@ -
+```mermaid +flowchart TD + receiveTracking(["Receive Tracking"]) + findContainerAndShipment["SELECT container JOIN Shipment"] + updateShipment[/Update shipment\] + isArrivingSoon{{"Is arrival estimate between now and now + 24h?"}} + hasArrived{{"Is arrival estimate <=now?"}} + isDelayed{{Is arrival estimate > original arrival + 24h?}} + sendNotification[/Send notification\] -[circleci-image]: https://img.shields.io/circleci/build/github/nestjs/nest/master?token=abc123def456 -[circleci-url]: https://circleci.com/gh/nestjs/nest - -A progressive Node.js framework for building efficient and scalable server-side applications.
- - - -## Description - -[Nest](https://github.com/nestjs/nest) framework TypeScript starter repository. - -## Installation - -```bash -$ npm install + + receiveTracking -- "` + **Tracking data** +carrierName:**string** +destinationUnLoCode:**string** +departureDate:**string[_datetime_]** +arrivalDateEstimate:**string[_datetime_]** +containerNumber:**string** +`" --> findContainerAndShipment + findContainerAndShipment --> |WHERE containers.containerNumber = :trackingData.containerNumber| updateShipment + updateShipment --> isArrivingSoon & hasArrived & isDelayed + isDelayed -->|set delayed flag| sendNotification + hasArrived --> |set has arrived flag| sendNotification + isArrivingSoon -->|set is arriving soon flag| sendNotification + +%% isArrivingSoon -->|yes| sendArriveSoon ``` -## Running the app - -```bash -# development -$ npm run start - -# watch mode -$ npm run start:dev - -# production mode -$ npm run start:prod +```mermaid +flowchart + getShipments([Get all shipments]) + ``` - -## Test - -```bash -# unit tests -$ npm run test - -# e2e tests -$ npm run test:e2e - -# test coverage -$ npm run test:cov -``` - -## Support - -Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please [read more here](https://docs.nestjs.com/support). - -## Stay in touch - -- Author - [Kamil MyĆliwiec](https://kamilmysliwiec.com) -- Website - [https://nestjs.com](https://nestjs.com/) -- Twitter - [@nestframework](https://twitter.com/nestframework) - -## License - -Nest is [MIT licensed](LICENSE).