Microservices-based Smart Warehouse system implementing GoF design patterns for inventory management, dynamic product allocation and environmental monitoring.
This project implements a Smart Warehouse system based on a distributed microservices architecture using Python, FastAPI and Docker.
The system simulates real warehouse operations including:
- inventory auditing;
- dynamic product allocation;
- environmental monitoring;
- automatic reactions to critical environmental events.
The project was developed following Object-Oriented Design principles and applying GoF design patterns:
- Iterator;
- Strategy;
- Observer.
All data persistence is performed entirely in memory according to the project requirements.
The system is divided into two independent microservices:
Responsible for:
- warehouse structure;
- products and lots;
- inventory traversal;
- product allocation;
- allocation strategies.
Responsible for:
- environmental sensors;
- critical alerts;
- brigade dispatch;
- environmental monitoring;
- operational reactions.
Communication between services occurs via REST/HTTP using Docker containers orchestrated through Docker Compose.
Used to traverse warehouse inventory without exposing the internal storage structure.
The client accesses the inventory exclusively through the iterator interface:
iterator.hasNext()
iterator.next()This guarantees complete encapsulation of the warehouse collections and physical layout.
Used to dynamically switch product allocation algorithms during runtime.
Implemented strategies:
- FIFO Allocation
- Environmental Allocation
- Density Optimization
The allocation strategy can be changed dynamically without restarting the containers.
Used to react automatically to environmental sensor events such as:
- temperature anomalies;
- smoke detection;
- humidity alerts.
When a critical event occurs, observers are automatically notified to:
- block warehouse zones;
- generate alerts;
- dispatch operational brigades.
The project adopts the Push communication model, where the subject sends the complete event state directly to the observers.
.
├── service_inventario/
│ ├── iterator.py
│ ├── strategies.py
│ ├── models.py
│ ├── main.py
│ ├── requirements.txt
│ └── Dockerfile
│
├── service_operacoes/
│ ├── observer.py
│ ├── models.py
│ ├── main.py
│ ├── requirements.txt
│ └── Dockerfile
│
├── docs/
│ └── modelagem-conceitual.jpeg
│
└── docker-compose.yml
- Dynamic inventory traversal
- Runtime strategy switching
- Environmental monitoring
- Automatic alert dispatch
- Brigade notification system
- Dockerized microservices
- In-memory persistence
- REST communication between services
- Python
- FastAPI
- Docker
- Docker Compose
- REST APIs
- Object-Oriented Programming
Clone the repository:
git clone https://github.com/brenomchd/smart-warehouseNavigate to the project folder:
cd smart-warehouseBuild and start the containers:
docker compose up --buildThe services will be available locally through FastAPI.
The project fulfills the requirements proposed in the DTP specification:
The warehouse inventory is traversed through the Iterator pattern without exposing the internal storage structure.
Allocation algorithms can be dynamically switched during runtime without restarting containers.
Environmental sensors automatically notify observers when critical events occur, triggering operational responses.
- Breno Machado Barros
- Luan de Paula Mota
- Giordanna Santos e Souza
