Skip to content

Latest commit

Β 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Warehouse System (C++ Monorepo)

A high-performance, multi-threaded distributed inventory management system written in modern C++17.

This project utilizes a microservice architecture backed by PostgreSQL for persistent storage and Redis for high-speed queuing and caching. It is structured as a single Monorepo managed by CMake.

πŸ—οΈ System Architecture

warehouse-c++/
β”œβ”€β”€ CMakeLists.txt              # Master build orchestrator
β”œβ”€β”€ .gitignore                  # Global ignore rules
β”œβ”€β”€ libs/                       # Shared Library Layer
β”‚   β”œβ”€β”€ Utility/                # Level 0: Foundation
β”‚   β”œβ”€β”€ FsLogger/               # Level 1: Core Systems
β”‚   └── Storage/                # Level 2: Data Access
└── services/                   # Executable Layer
    β”œβ”€β”€ PartMaster-API/         # Level 3: REST API Ingress
    └── PartMaster-Worker/      # Level 3: Background Processor
	
🧩 Components
* libs/Utility: The foundational layer. It handles global configuration parsing (config.conf) and provides a tool for encrypting sensitive database credentials.

* libs/FsLogger: A custom, thread-safe logging framework used across all microservices to provide unified, file-based logging for auditing and debugging.

* libs/Storage: The Data Access Layer. It wraps libpqxx (PostgreSQL) and hiredis (Redis), managing the connection pools and executing CRUD operations for inventory parts.

* services/PartMaster-API: A high-speed, stateless REST API built with the Crow framework. It sits behind an Nginx Load Balancer, accepts incoming HTTP requests, and pushes "Write" jobs into a Redis queue.

* services/PartMaster-Worker: A multi-threaded backend processor. It listens to the Redis queue (BRPOP), executes heavy SQL transactions asynchronously, and rebuilds the global Redis cache to prevent database bottlenecks.	

πŸš€ How to Build
This project uses a top-down CMake build process. From the root directory:

mkdir build && cd build
cmake ..
make -j$(nproc)

The executables will be generated in build/services/PartMaster-API/ and build/services/PartMaster-Worker/.

About

C++ Warehouse Monorepo

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages