Skip to content

Sample of an Order Management System using Domain-Driven Design (DDD) and TypeScript.

License

Notifications You must be signed in to change notification settings

guilherme-rauen/order-manager-ts

Repository files navigation

order-manager


Overview

The order-manager microservice is designed to handle the core aspects of order processing. This service offers a RESTful API to streamline various operations, including the creation, retrieval, and cancellation of orders, as well as the integration of status update webhooks from payment gateways and shipping providers. Additionally, it maintains up-to-date order statuses by processing incoming events. It also updates orders status through events. For instructions on how to get this microservice up and running, please refer to the Getting Started section.

API Endpoints Overview

Endpoint Method Description
/api/v1/orders GET Retrieve a list of all orders
/api/v1/orders/:orderId GET Retrieve details of a specific order by ID
/api/v1/orders/customer/:customerId GET Retrieve a list of all customer's orders
/api/v1/orders/status/:status GET Retrieve a list of all orders with a given status
/api/v1/orders POST Create or update an order
/api/v1/orders/:orderId/cancel POST Cancel an order
/api/v1/webhook/payment POST Emulates PSPs callbacks of payment transactions
/api/v1/webhook/shipment POST Emulates the status updates sent by the carrier

For detailed information on request and response formats, please refer to the complete API documentation at: /api/docs.

Health Check

To ensure the service is running and healthy, you can use the root endpoint:

Endpoint Method Description
/ GET A successful response indicates that the service is operational

Relevance [CRITICAL]

If this service is down:

  • Orders will not be processed

Sub-Components, Infrastructure/Service Dependencies

Architecture & Technologies

Getting Started

To run the service it is quick and easy, please check the steps here.

For Developers

See CONTRIBUTING.md and TECHDEBT.md

License

This project is licensed under the MIT License. For more details, see the LICENSE file.

About

Sample of an Order Management System using Domain-Driven Design (DDD) and TypeScript.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published