
Grocery Store Inventory Model
This app simulates how perishable food items are shelved at grocery stores and tracks how much gets thrown away due to expiration, given the stock and sales data for a time period.
This app simulates how perishable food items are shelved at grocery stores and tracks how much gets thrown away due to expiration, given the stock and sales data for a time period.
Assumption: Items are sold in priority of earliest expiration.
​
REST API frontend to a stock and sales database that allows for basic CRUD - Create, Read, Update, Delete - operations and also allows users to submit analysis jobs. The system supports an analysis job to create a plot of the data and is hosted on the Kubernetes cluster.
​
All code was written in Python
For example, let’s look at this sample data for a cheesecake:

If the cheesecake had a 3 day shelf life, this is what it’s model would look like:

At the end of day 3, there is 1 cheesecake left that is thrown out due to expiration.
This app runs this simulation on a dataset and takes the start date, end date, and location of the store as parameters to generate a business report on how the sales went for the location during the given time frame. The food distributor can use this data to adjust future stocking to minimize surplus (number of food items thrown out due to expiration) and gapout (empty shelves due to sell out).