How phutthapornwo-cpu/team-11-inventory works
This repository contains a Python inventory-management CLI and a separate modular inventory service. The documented user workflow is to manage items, receive or issue stock, check low-stock levels, and sell products; successful changes are intended to persist immediately to JSON. The excerpts show the modular service’s product, stock, reporting, and notification behavior, plus a separate JSON-backed inventory implementation. README capabilities for physical/digital sales are not visible in sampled source, so those relationships are not inferred.
Main entry points: service.py Inventory service · models.py Product and transaction models · notifiers.py Notifier factory · inventory.py JSON inventory operations
Components 13
JSON inventory
- JSON inventory operations
inventory.py - JSON file
Inventory service
- Inventory service
src/service.py - Product and transaction models
src/models.py
Low stock alerts
- Notifier contract
src/notifiers.py - Email notifier
src/notifiers.py - SMS notifier
src/notifiers.py - Notifier factory
src/notifiers.py
Other components
- CLI user
- Inventory CLI
inventory.py - Stock update helper
update_stock.py - Physical product sales
- Digital product sales
Connections 12
- CLI user → Inventory CLI: runs
README.md - Inventory CLI → JSON inventory operations: uses
inventory.py - JSON inventory operations → JSON file: loads and saves
inventory.py - Stock update helper → CLI user: returns result
- Inventory service → Product and transaction models: uses models
src/service.py - Inventory service → Notifier contract: dispatches alerts
src/service.py - Notifier factory → Email notifier: creates
src/notifiers.py - Notifier factory → SMS notifier: creates
src/notifiers.py - Email notifier → Product and transaction models: formats product alert
src/notifiers.py - SMS notifier → Product and transaction models: formats product alert
src/notifiers.py - Physical product sales → Inventory service: supported by README
README.md - Digital product sales → Inventory service: supported by README
README.md