Inspiration
Have you ever walked into a convenience store and marveled at the vast collection of goods? Although convenience stores are convenient in the sense that they always seem to have what you need, there’s a big catch. About 30% of food in the US from supermarkets is thrown out due to mass supply, and this can have major environmental consequences. Food waste generates 11% of greenhouse gas emissions, and not to mention, food takes an insane amount of resources to grow and/or prepare. This is why we created Produce Sustainability, to help our grocers and shopkeepers in their fight against food waste.
What it does
Produce Sustainability is a website that utilizes a machine learning model to calculate how much perishable items a store is recommended to buy with a goal of minimizing food waste. We use past sales data to predict the demand for food at this specific convenience store. We also predict the amount a shopkeeper should buy for a specific food item, such as potatoes, to give more accurate results based on consumer demand. In addition, the machine learning model also takes data from other stores to help make more accurate predictions.
How we built it
This website was built using HTML, CSS, JavaScript, Express.js, Node.js, and PostgresSQL. Charts.js is also used to create a chart to visualize the data coming from the machine learning model. The model itself was made in-house using js without any APIs, and uses techniques such as polynomial regression, querying SQL databases, feature regularization, and gradient descent.
Challenges
Coming up with a viable solution to this problem was difficult, as it is a complex problem that has no real “correct” solution. Deciding where to get the data for predicting sales demand was also somewhat difficult if you consider the fact that some stores may be just starting up, with no data of their own to input, so that is why the machine learning model also takes in data from other stores to solve this problem. In addition, we actually first came up with a very different design for the website, but it wasn’t very user friendly, so we had to make a new design after that worked much better.
The ML model itself had a lot of issues to resolve. Often times, the gradient descent ended up diverging due to a large learning rate, so we added hyperparameter tuning to update the learning rate during training. In addition, the model often overfitted to the data, so we learned a technique called feature regularization to fix it.
Accomplishments
The from-scratch machine learning model works very well, especially since we were only given so much time to build it. The website also looks professional and is easy to navigate, making it ideal for user experience. This project is also a full stack project, with a front end, server, and database.
What we learned
We learned some pretty disturbing facts about food waste from supermarkets, for starters. We also learned about some of the different ways we can find data for machine learning models, and best practices for website design.
What’s next for Produce Sustainability
We hope to create a ranking system that easily tells a store how well they are doing in terms of producing a sustainable business that does not create a lot of food waste. In addition, we hope to add other recommendations for stores regarding saving energy (such as how much space they should use for refrigeration, etc), best practices for selling reusable bags to shoppers instead of plastic bags, and how to become a leader and role model to others in the fight against food waste.
Built With
- charts.js
- css
- express.js
- html
- javascript
- node.js
- postgresql
- replit


Log in or sign up for Devpost to join the conversation.