Skip to content

manojkum-d/Delivery_System_Microservices

Repository files navigation

Order Management Microservice

Overview

This microservice handles the management of orders, including creation, updating, cancellation, and retrieval. It integrates with delivery management, message queues, and logging systems to provide a comprehensive solution for order processing.

image image image

Features

  • Order Creation: Create new orders.
  • Order Updating: Modify existing orders.
  • Order Cancellation: Cancel orders.
  • Order Retrieval: Fetch details of orders.
  • Message Queue Integration: Utilizes RabbitMQ for messaging between services.
  • Logging: Comprehensive logs for order actions and delivery statuses.

Getting started

To get the Node server running locally:

  • Clone this repo
  • npm install to install all required dependencies
  • Copy the .env.example to .env file, to make the environment file

Code Overview

Dependencies

  • expressjs - The server for handling and routing HTTP requests
  • mongoose - For modeling and mapping MongoDB data to javascript
  • amqp - Advanced Message Queuing Protocol

Application Structure

  • app.js - The entry point to the application. This file defines our express server and connects it to MongoDB using mongoose. It also requires the routes and models we'll be using in the application.
  • routes/ - This folder contains the route definitions for our API.
  • models/ - This folder contains the schema definitions for our Mongoose models.
  • controllers/ - This folder handles the requests made by the user.
  • services/ - This folder contains all the business logic.
  • repository/ - This folder contains the repository pattern.
  • rabbit/ - This folder contains the generic messaging sender.