How raisinsaspag/inventory-management-system works
This is a FastAPI inventory analytics service. Clients submit product, batch, and consumption data to generate stock-health reports and reorder recommendations, or simulate restocking; separate endpoints record consumption and return product trends. The runtime is centered on the API in main.py, with analytics and restock logic, SQLite-backed persistence, and operational logging. The graph reflects calls visible in the excerpts; the README is empty, so it provides no additional capability or relationship evidence.
Main entry points: main.py FastAPI endpoints · database.py Inventory database access · inventory_logger.py Inventory event logging · inventory_engine.py Stock health analysis
Components 12
API workflows
- FastAPI endpoints
main.py - Health report workflow
main.py - Restock simulation workflow
main.py - Consumption recording
main.py - Product trends endpoint
main.py
Inventory analytics
- Stock health analysis
inventory_engine.py
Restock planning
- Recommendations and simulation
restock_service.py
Persistence and logging
- Inventory database access
database.py - SQLite inventory store
inventory.db - Inventory event logging
inventory_logger.py - Log file
Other components
- API client
Connections 17
- API client → FastAPI endpoints: sends requests
main.py - FastAPI endpoints → Health report workflow: routes health report
main.py - FastAPI endpoints → Restock simulation workflow: routes simulation
main.py - FastAPI endpoints → Consumption recording: routes consumption
main.py - FastAPI endpoints → Product trends endpoint: routes trends
main.py - Health report workflow → Stock health analysis: calculates report
main.py - Health report workflow → Recommendations and simulation: generates recommendations
main.py - Health report workflow → Inventory event logging: logs snapshot
main.py - Health report workflow → Inventory database access: calculates trends
main.py - Restock simulation workflow → Stock health analysis: calculates current report
main.py - Restock simulation workflow → Recommendations and simulation: runs simulation
main.py - Consumption recording → Inventory database access: inserts consumption
main.py - Consumption recording → Inventory event logging: logs consumption
main.py - Product trends endpoint → Inventory database access: calculates trends
main.py - Product trends endpoint → Inventory event logging: logs trend analysis
main.py - Inventory database access → SQLite inventory store: reads and writes
database.py - Inventory event logging → Log file: writes logs
inventory_logger.py