Potion Guard — Devpost

Inspiration

We wanted a simple way to spot when potion volumes don’t add up—whether that’s overflow losses or potential theft—without changing the source systems. We were also inspired by the challenge's fun analogy for real-world energy management: tracking a valuable, flowing resource (potions) in a network of containers (cauldrons) and identifying that loss.

What it does

Potion Guard ingests the HackUTD EOG API and compares expected (from tickets) vs. actual (from data) daily collected volume per cauldron. It compensates for the continuous fill rate during drain events, then flags discrepancies in a clean, interactive dashboard. The UI features KPIs for total loss incidents and liters lost, with a time-travel slider to replay and audit the entire timeline.

How we built it

  • Backend: A Flask server provides a pass-through to the EOG API and runs an analysis module to detect drain events, calculate true volumes, and match them against the end-of-day tickets.
  • Frontend: A Next.js dashboard that calls our Flask endpoints and visualizes the data with a map, overflow panel, and an accordion-style table to review discrepancies by date.

Challenges we ran into

  • Correctly calculating the "actual" volume by compensating for the continuous fill rate during a drain event.
  • Writing an algorithm to match date-only tickets to a week's worth of minute-by-minute drain windows.
  • The classic hackathon environment hurdles (CORS, port conflicts, and merging different developer setups).

Accomplishments that we’re proud of

  • Our pipeline works. It successfully analyzed the data to find 107 distinct loss incidents from 118 flagged discrepancies, totaling ~2489.7 L of missing or unlogged potion.
  • Building a clean, decoupled backend that made frontend integration smooth.

What we learned

  • For a hackathon MVP, a practical time-series heuristic (like our drain detector) beats over-engineering a perfect one.
  • Small integration details (ports, CORS, data types) are just as critical as the core algorithm.

What’s next for Potion Guard

Our dashboard is great at auditing the past, but the next step is to predict the future. We've laid the groundwork for the bonus challenge, and our plan is to:

  • Fully implement the Optimal Witch Path algorithm.
  • Use our existing forecasting data to generate a daily pickup schedule that guarantees zero overflows with the minimum number of witches possible.
  • Add real-time alerting (thresholds, webhooks) and even more detailed analytics per cauldron.

Built With

Share this project:

Updates