Second Bell reveal animation

Predict unopened surplus before it becomes waste. Check safety constraints. Help cafeteria staff make better redistribution decisions.

Forecasting • Computer Vision • Safety Checks • Cafeteria Analytics

Forecast Recovered CO2e

Vercel App • Demo Repo • Project Repo

Table of Contents

Compatibility

System / Environment Current Support
Deployed web demo Supported on Vercel through the live demo
Desktop browsers Works best on current Chrome, Edge, Safari, and Firefox
Mobile browsers Dashboard content is viewable, but the CV + scale lab is best on desktop
Computer vision Runs in-browser with TensorFlow.js and COCO-SSD
Webcam detection Requires browser camera permission
Force Touch scale bridge Requires macOS with a Force Touch trackpad and the local bridge script
Forecast dashboard Works without special hardware because forecasts run from the deployed app/API

Inspiration

Honestly, Second Bell started because of something that seemed really stupid.

One day after lunch, my friend and I were walking past the cafeteria when we saw staff throwing away a huge pile of bananas. We stopped and asked how many there were, and it was over 50 bananas from that day alone.

Not rotten bananas. Not damaged bananas. Just perfectly good bananas that nobody ended up taking.

My friend looked at me and said, "There's no way this happens every day."

The next few days, we kept paying attention. It wasn't just bananas. There was fruit, milk cartons, snacks, and other unopened food being thrown away. Meanwhile, we knew plenty of students who stayed after school for sports, clubs, tutoring, band, and other activities who probably would've taken that food without thinking twice.

The weird part was that nobody was really doing anything wrong. The cafeteria has to prepare food before students show up. Some days more students take lunch. Some days fewer do. A rainy day, a field trip, a school event, or even a different menu can completely change what gets eaten.

That's when we started asking ourselves: what if schools could actually predict this?

What if there was a way to know before lunch that certain foods were likely to be left over? What if schools could use that information to reduce waste and make better decisions instead of finding out after everything had already been prepared?

As we dug deeper into the problem, we realized there were so many factors affecting food waste that no person could realistically keep track of all of them. But that's exactly the kind of problem AI is good at solving.

So what started as two students wondering why dozens of perfectly good bananas were being thrown away turned into Second Bell, an AI system designed to help schools predict food waste before it happens and find opportunities to safely redistribute surplus food.

Sometimes the best ideas don't start with a grand vision. Sometimes they start with standing next to a trash can and wondering why something perfectly good ended up there.

What it does

Second Bell is an AI-powered forecasting platform that helps schools predict food waste before lunch even begins.

When we first started researching the problem, we realized that food waste isn't random. It's influenced by dozens of factors that schools deal with every day like attendance fluctuations, weather conditions, field trips, assemblies, testing schedules, lunch menu choices, and after-school activities. Individually, these factors might seem small, but together they create patterns that are incredibly difficult for people to track and predict consistently.

That's where Second Bell comes in.

The platform collects and analyzes these data points using a multi-model machine learning architecture. Instead of relying on a single prediction, specialized models work together to answer different questions. One model estimates the likelihood of food waste occurring, another predicts how much unopened food is likely to remain after lunch, and another forecasts after-school demand so schools can better understand redistribution opportunities.

We also built anomaly detection into the system to identify unusual circumstances that could affect student behavior. Events such as assemblies, field trips, schedule changes, weather disruptions, or testing days can impact meal consumption greatly, and the system automatically accounts for those situations when generating predictions.

The results are presented through an interactive dashboard that transforms complex forecasts into recommendations that can be used by schools. Cafeteria staff can view projected waste levels, anticipated surplus inventory, and demand forecasts before lunch service begins, allowing them to make more informed decisions throughout the day.

Because accurate predictions alone aren't enough, we developed a Safety Compiler that evaluates every recommendation against food safety requirements, storage constraints, expiration windows, and redistribution guidelines. This ensures that any suggested action is not only efficient but also safe and responsible.

At its core, Second Bell functions as a decision-support system for school cafeterias. Rather than discovering food waste after it has already occurred, schools can proactively anticipate challenges, optimize resources, and create opportunities to redirect surplus food where it can have the greatest impact.

How we built it

We built Second Bell as a full-stack AI decision-support platform using React, TypeScript, Tailwind CSS, Vite, Python, FastAPI, scikit-learn, TensorFlow.js, and COCO-SSD.

At the core of the system is a multi-stage machine learning pipeline designed to model cafeteria consumption patterns. We engineered a feature-processing layer that ingests variables such as attendance trends, menu composition, weather conditions, school events, testing schedules, field trips, storage availability, and after-school participation rates.

These features are processed through an ensemble architecture consisting of specialized forecasting models. Individual models are responsible for food waste prediction, surplus inventory estimation, and after-school demand forecasting. Their outputs are combined through a confidence-weighted aggregation layer to generate final recommendations.

To improve robustness, we implemented anomaly detection mechanisms that identify outlier conditions such as assemblies, schedule disruptions, severe weather, and campus-wide events that can significantly alter consumption behavior. We also developed a custom Safety Compiler that acts as a policy-validation layer, evaluating food safety constraints, storage windows, expiration requirements, and redistribution rules before recommendations are surfaced.

The dashboard uses React and TypeScript for the frontend, FastAPI for backend routes, scikit-learn for forecasting and classification, TensorFlow.js with COCO-SSD for browser computer vision, NumPy, pandas, and joblib for data processing and model artifacts, and Vercel with GitHub for deployment.

The entire pipeline is integrated into a real-time analytics dashboard that converts model outputs into actionable operational insights for cafeteria staff.

System Architecture

+------------------------------------------------------------------------------+
|                                 SECOND BELL                                  |
|                 AI Food Waste Forecasting + Decision System                  |
+------------------------------------------------------------------------------+

+----------------------+    +----------------------+    +----------------------+
|  Cafeteria Context   |    |  Historical Trends   |    |   Live/Day Inputs    |
|----------------------|    |----------------------|    |----------------------|
| attendance           |    | past waste           |    | today's menu         |
| lunch menu           |    | past demand          |    | weather              |
| school events        |    | item returns         |    | field trips          |
| after-school data    |    | surplus patterns     |    | assemblies/tests     |
+----------+-----------+    +----------+-----------+    +----------+-----------+
            |                           |                           |
            +---------------------------+---------------------------+
                                        |
                                        v
+------------------------------------------------------------------------------+
|                           FEATURE PROCESSING LAYER                           |
|------------------------------------------------------------------------------|
| Converts raw cafeteria conditions into model-ready signals:                  |
| attendance adjustment, menu effects, event effects, weather effects, after-  |
| school demand signals, storage limits, and historical waste patterns.        |
+---------------------------------------+--------------------------------------+
                                        |
                                        v
+------------------------------------------------------------------------------+
|                           MULTI-MODEL AI PIPELINE                            |
+------------------------------------------------------------------------------+

+------------------------------+                +------------------------------+
|    Waste Risk Classifier     |                |    Surplus Forecast Model    |
|------------------------------|                |------------------------------|
| Predicts whether a food      |                | Predicts how much            |
| item is likely to become     |                | unopened food may remain     |
| waste.                       |                | after lunch.                 |
|                              |                |                              |
+--------------+---------------+                +---------------+--------------+
                |                                               |
                v                                               v
+------------------------------+                +------------------------------+
|  After-School Demand Model   |                |      Anomaly Detection       |
|------------------------------|                |------------------------------|
| Predicts whether surplus     |                | Flags unusual days like      |
| food can be redirected       |                | field trips, weather,        |
| to students after school.    |                | testing, or assemblies.      |
|                              |                |                              |
+--------------+---------------+                +---------------+--------------+
                |                                               |
                +-----------------------+-----------------------+
                                        |
                                        v
+------------------------------------------------------------------------------+
|                       CONFIDENCE-WEIGHTED AGGREGATION                        |
|------------------------------------------------------------------------------|
| Combines model outputs into one operational forecast instead of relying on a |
| single prediction. Produces projected waste, surplus inventory, and demand.  |
+---------------------------------------+--------------------------------------+
                                        |
                                        v
+------------------------------------------------------------------------------+
|                               SAFETY COMPILER                                |
|------------------------------------------------------------------------------|
| Checks every recommendation against food safety requirements, storage        |
| limits, expiration windows, cold-chain rules, and redistribution guidelines. |
+---------------------------------------+--------------------------------------+
                                        |
                                        v
+------------------------------------------------------------------------------+
|                            RECOMMENDATION ENGINE                             |
|------------------------------------------------------------------------------|
| Converts forecasts into practical cafeteria actions: reduce prep, adjust     |
| staging, hold items safely, redirect surplus, or flag review.                |
+---------------------------------------+--------------------------------------+
                                        |
                                        v
+------------------------------------------------------------------------------+
|                            INTERACTIVE DASHBOARD                             |
|------------------------------------------------------------------------------|
| Cafeteria staff receive projected waste levels, surplus inventory estimates, |
| after-school demand forecasts, anomaly warnings, and safety-checked actions. |
+---------------------------------------+--------------------------------------+

Challenges we ran into

One of our biggest challenges was realizing that food waste is much harder to predict than we originally thought.

At first, we assumed factors like attendance and lunch menus would be enough to make accurate forecasts. But as we built and tested the system, we discovered that seemingly random events could completely change outcomes. A field trip, an assembly, bad weather, a testing day, or even a popular lunch option could drastically affect consumption patterns.

Another challenge was balancing accuracy with practicality. Building a model that generates predictions is one thing, but building a system that schools could realistically trust and use is another. We spent a lot of time refining our forecasting pipeline so that recommendations were not only accurate, but explainable, too.

We also ran into challenges designing the AI architecture itself. Combining multiple forecasting models, anomaly detection systems, and safety validation layers into a single pipeline required a lot of experimentation, debugging, and tuning. Small changes in one part of the system often had unexpected effects elsewhere.

Finally, we quickly learned that reducing food waste isn't just a machine learning problem. Food safety, storage requirements, and redistribution guidelines all had to be considered. This led us to develop the Safety Compiler, which ended up becoming one of the most important components of the entire platform.

Like most hackathon projects, there were plenty of late nights, broken builds, and moments where we weren't sure something would work. But overcoming those challenges ultimately helped us build a much stronger solution, our innovative and life-changing Second Bell.

Accomplishments that we're proud of

Honestly, we're proud that we got this idea off the whiteboard and turned it into something real after tireless and sleepless nights.

When we first started, Second Bell was just a conversation about a pile of wasted bananas in a school cafeteria. By the end of the hackathon, we have built a working platform that combines forecasting models, anomaly detection, safety validation, and an interactive dashboard into a single system.

We're also proud of how much the project evolved. What started as a simple food waste predictor became a much more complete decision-support platform. Along the way, we added demand forecasting, surplus estimation, anomaly detection, and the Safety Compiler after realizing that accurate predictions alone weren't enough.

Another accomplishment was building something that addresses a real-world problem. There are plenty of cool AI projects out there, but we wanted to create something that could have a tangible impact on schools, students, and sustainability efforts.

Most importantly, we're proud that we kept improving the idea every time we found a flaw in it. Many of the features we're most excited about weren't part of the original plan and just came from asking hard questions, testing assumptions, and being willing to hear each others' ideas out.

For us, the biggest accomplishment isn't the technology itself. It's taking a problem we genuinely cared about and building a solution that could realistically help solve it.

What we learned

This project taught us that real-world problems are a lot messier than they look on paper. We learned that building an AI model is only part of the challenge. The harder part is creating something that people can actually trust and use.

We also learned the importance of questioning our assumptions. Some of our best ideas came from realizing our original approach wasn't enough and being willing to start over, which we had to do three times before reaching our final product.

Most importantly, we learned that technology has the greatest impact when it's solving a problem that genuinely matters. We've worked on many projects before, but this one felt different. For the first time, we felt like we weren't just building technology; we were building something that could genuinely make a difference. The possibility that an idea born from a pile of wasted food could one day help students and schools has been both humbling and incredibly meaningful to us.

What's next for Second Bell

This is honestly the part we're most excited about.

Right now, Second Bell demonstrates what's possible. Next, we want to take it beyond a hackathon project and put it into the hands of real schools.

Our first goal is to partner with schools and run pilot programs using real cafeteria data. We're so passionate about this project that we've already started reaching out to local school districts to explore opportunities and bring Second Bell beyond the hackathon. We're also exploring integrations with cafeteria management systems, inventory platforms, and district-wide nutrition programs to make adoption as seamless as possible.

On the AI side, we plan to expand the forecasting engine with larger datasets, adaptive learning capabilities, and district-level analytics that can identify waste patterns across multiple schools rather than just one campus. Long term, we envision Second Bell becoming more than a food waste prediction tool. We see it evolving into a comprehensive decision-support platform that helps schools optimize resources, reduce environmental impact, and ensure that good food reaches students instead of landfills.

After all, if a simple observation about wasted bananas could spark this project, we're excited to see what happens when Second Bell starts making a real-world impact and make this something truly life-changing.

Demo Results

These results come from the current Second Bell demo scenario and synthetic cafeteria model. They show what the system can calculate in one run, not final real-world pilot results.

Demo Output Result
Scenario unopened-return forecast 436.9 items
After-school demand forecast 171 students
Projected recovered items 182.6 items
Approved primary actions 8 actions
Recovery coverage 41.8%
Food waste avoided 32.1 kg
CO2e avoided 27.6 kg CO2e
Estimated value protected $68.97
Forecast range shown Q10 / Q50 / Q90
Safety decision mode Human approval required

Source Grounding

Second Bell is grounded in public food recovery and waste-reduction guidance, including USDA share-table guidance, the EPA Wasted Food Scale, ReFED food-waste solutions, and the COCO dataset used by the browser object-detection model.

Tech Stack

React TypeScript Tailwind CSS Vite

Python FastAPI scikit-learn NumPy pandas

TensorFlow.js COCO-SSD joblib Force Touch Bridge

Vercel GitHub Git

Built With

Share this project:

Updates

Submission history