How tdjosh-56/backend-benz_inventorysystem works
This is a Django REST backend for ingredient inventory, recipes, and an operational dashboard. Users manage ingredients and recipes through API views; inventory responses include stock status and history, while recipe records can reference inventory ingredients. Dashboard services assemble inventory summaries, alerts, stock levels, and a production-today figure. A separate archive service can archive stale recipes according to a setting. The tree omits the imported production package, and app_settings/models.py is listed as empty, so those integrations’ internals and some runtime wiring cannot be verified.
Main entry points: models.py Ingredient and transactions · views.py Ingredient API · serializers.py Ingredient serialization · services.py Stock and history
Components 14
Inventory management
- Ingredient API
inventory/views.py - Ingredient serialization
inventory/serializers.py - Stock and history
inventory/services.py - Unit conversion
inventory/units.py - Ingredient and transactions
inventory/models.py
Recipe catalog
- Recipe API
recipe/views.py - Recipe serialization
recipe/serializer.py - Recipes and subcategories
recipe/models.py
Dashboard and archive
- Dashboard API
dashboard/views.py - Dashboard summaries
dashboard/services.py - Recipe auto-archive
recipe/services/archive.py - Archive command
recipe/management/command/autoarchive_recipe.py
Shared domain data
- Application settings
app_settings/models.py
Other components
- API user
Connections 22
- API user → Ingredient API: requests
- API user → Recipe API: requests
- API user → Dashboard API: requests
- Ingredient API → Ingredient serialization: serializes
inventory/views.py - Ingredient API → Stock and history: loads history
inventory/views.py - Ingredient API → Ingredient and transactions: queries
inventory/views.py - Ingredient serialization → Stock and history: records and reads
inventory/serializers.py - Ingredient serialization → Ingredient and transactions: validates and saves
inventory/serializers.py - Ingredient serialization → Unit conversion: checks units
inventory/serializers.py - Stock and history → Ingredient and transactions: updates and reads
inventory/services.py - Stock and history → Unit conversion: converts units
inventory/services.py - Ingredient and transactions → Unit conversion: converts thresholds
inventory/models.py - Recipe API → Recipe serialization: serializes
recipe/views.py - Recipe API → Recipes and subcategories: queries
recipe/views.py - Recipe serialization → Recipes and subcategories: creates and updates
recipe/serializer.py - Recipe serialization → Ingredient and transactions: resolves ingredients
recipe/serializer.py - Dashboard API → Dashboard summaries: gets dashboard data
dashboard/views.py - Dashboard API → Dashboard summaries: serializes response
dashboard/views.py - Dashboard summaries → Ingredient and transactions: summarizes inventory
dashboard/services.py - Archive command → Recipe auto-archive: runs
recipe/management/command/autoarchive_recipe.py - Recipe auto-archive → Application settings: checks archive setting
recipe/services/archive.py - Recipe auto-archive → Recipes and subcategories: archives stale recipes
recipe/services/archive.py