LLD Inventory Management System for Blinkit/Dunzo/Zepto

Hello, I'm Paras Kaushik! ๐ I'm a dedicated software engineer based in India, specializing in C++ and proficient in the MERN stack.
๐ค Interested in collaborating on innovative projects that require my technical expertise.
๐ฌ Passionate about participating in discussions related to software architecture and best practices.
๐ง Feel free to reach out to me via email: [paraskaushik12@gmail.com]
๐ Connect with me on LinkedIn: [https://www.linkedin.com/in/the-paras-kaushik/]
Problem Statement
In the following blog post, we will discuss low Level Design architecture of an Inventory Management System used by Blinkit/Dunzo/Zepto for groceries delivery
Let us start by identifying the objects and encapsulating their attributes and operations into classes
Identification of all Objects and Classes
ProductUnit
Represents an individual entity of a Product
It has its expiry date , serialNumber manufactured from the factory

Product
Has a list of all ProductUnits which are all the same product, this can also be seen as a ProductUnitsController
Inventory
Inventory has a list of all products
I can add new Products, new units for this product and other similar CRUD operations

Warehouse
Has a single instance of inventory and manages the inventory
WareHouseController
As our system can have many warehouses, we need a warehouse controller for their management, our assumption being at a time only one warehouse delivers to the customer
The WareHouseController selects a single warehouse using a WarehouseSelectionStrategy

WarehouseSelectionStrategy and NearestWarehouseSelectionStrategy and so on ...
- We use the Strategy pattern to pick the strategy that controller uses to select warehouse at runtime


User
Has a Cart and a list of Order IDs representing order history
UserController
There can be many users so we have to maintain a user controller

Cart
Maintains a list of Products and their quantity
Order
- Fetches the user's cart and converts that into an order with Invoice and Payment

OrderController
Since there can be many Orders, they need to be controlled by an OrderController

InventoryManagementSystem /App / Main
User Flow
The InventoryManagementSystem takes in a list of registered users and warehouses present in the system for system initialisation

We create a function `runDeliveryFlow` to test the entire flow of the application

The initialisation for users and warehouses can be done as follows:

UML DIAGRAM










