Sim4Food: Winning Best Use of Snowflake at Hack Atlantic
We won! 🎉
At Hack Atlantic, my team and I built Sim4Food in 24 hours, and it took home the Best Use of Snowflake prize. It was also our first time working together as a team (shoutout to Chris Lin, Phuntsho Wangyal Galay, and Jeevaka Weerakoon), so I’m really proud of how it came together.

The Problem
Food waste is a huge problem in Fredericton, New Brunswick. On top of that, restaurant owners have an 83% chance of shutting down within their first year, so anything that helps them save on costs is a real advantage. Order too much and food goes in the bin. Order too little and you run out mid-service.
What It Does
Sim4Food is a web app that helps restaurant owners figure out how much of each ingredient to buy for the following week. It looks at the restaurant’s POS and invoice history and turns it into weekly order recommendations, with the goal of cutting waste without risking shortages.

How It Works
The forecasting pipeline has three steps:
- XGBoost forecasts demand for each ingredient.
- Monte Carlo simulations run 300 “what-if” scenarios, covering deals, holidays, word-of-mouth, stockouts, and menu substitutions.
- A newsvendor model turns those results into recommended order quantities, taking shelf life and pack sizes into account.
Owners can also play with the scenarios themselves, for example promoting a menu item, delaying a supplier delivery, or adding a holiday rush, and see how it affects their inventory. There’s also an interactive Canvas simulation that visualizes how demand and stockouts play out.

The part that won us the prize is the Snowflake Cortex AI assistant. Owners can ask plain questions about their forecasts, waste, and orders, like “which ingredient am I most likely to run out of?”, and get an answer backed by their own data.

The app is built with Next.js, React, and TypeScript on the frontend, FastAPI and Python on the backend, and PostgreSQL on Neon for the database.
Challenges and What We Learned
Building a full-stack app in 24 hours is no joke. We started brainstorming when the event kicked off, so we had to learn each other’s strengths fast, split up the backend, frontend, models, and AI features, and keep a close eye on the clock.
Along the way we learned:
- How to pair XGBoost with Monte Carlo simulation to model how customers behave in different scenarios
- How to build an AI chatbot on top of Snowflake that users can actually dig into
- How to work efficiently under a hard time limit
What’s Next
We haven’t ruled out turning Sim4Food into a startup to help local Fredericton businesses. A lot of the cafés and restaurants here have been around for a long time, and we’d love to help them stay open for many more years.
Check out the Devpost page or the source code on GitHub if you want to dig deeper. Thanks for reading!