Skip to content

A micro-service based order and delivery application

License

Notifications You must be signed in to change notification settings

emmrys-jay/micro-order

Repository files navigation

Micro-Order

This was inspired by an assessment for a senior backend engineer role.

Overview

The Micro-Order project is a microservice-based application that consists of three main services:

  • Owner-Service
  • Product-Service
  • Order-Service

Services

Owner-Service

This service is responsible for managing the owners of the products. It includes functionalities such as:

  • Creating a new owner (user)
  • Updating owner details
  • Deleting an owner
  • Retrieving owner information

Product-Service

This service handles all operations related to products. It includes functionalities such as:

  • Adding a new product
  • Updating product details
  • Deleting a product
  • Retrieving product information

Order-Service

This service manages the orders placed by customers. It includes functionalities such as:

  • Creating a new order
  • Updating order details
  • Deleting an order
  • Retrieving order information

Detailed information can be found in each service README file.

Project Architecture

Micro-order drawio (2)

Getting Started

Prerequisites

Installation

  1. Clone the repository:
    git clone https://github.com/emmrys-jay/micro-order.git
  2. Navigate to the project directory:
    cd micro-order
  3. Start all required containers for databases and cache using Docker Compose:
    make service-up
  4. Navigate to the home directory of each of the services in different terminals and start them in development mode
    cd owner-service
    make air
    
    cd product-service
    make air
    
    cd order-service
    make air
  5. All the default configs are being used, and they can be found in config-sample.yml in each service

Usage

  • Access the services via their respective endpoints:
    • Owner-Service: http://localhost:8081
    • Product-Service: http://localhost:8082
    • Order-Service: http://localhost:8080

TODO

  • Add mechanism to handle consumer errors when handling events
  • Security fixes
  • Swagger documentation for each service
  • Proper Error handling between grpc calls

Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature/your-feature).
  3. Commit your changes (git commit -am 'Add new feature').
  4. Push to the branch (git push origin feature/your-feature).
  5. Create a new Pull Request.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contact

For any inquiries or issues, please contact: