Overview

ProcureSense helps procurement teams move from reactive purchasing to proactive decision-making by turning purchase history into clear next actions. It predicts what items are likely due for reorder, surfaces “often bought together” bundles, and (optionally) provides an AI-guided assistant that outputs a structured shopping list—all while keeping the core logic deterministic and demo-reliable.

Problem Statement

Procurement teams often struggle with fragmented data and manual workflows, which leads to:

  • Stockouts and missed reorder windows: reorder timing is guessed instead of derived from real buying cadence.
  • Missed companion supplies: buyers reorder the main item but forget the items commonly purchased with it.
  • Dashboard fatigue: even when insights exist, they’re hard to monitor without a simple, ranked view and clear explanations.
  • Unreliable demos/tools: CSV formatting issues or AI latency can derail the experience.

ProcureSense focuses on a “golden path” MVP: load purchase data → see reorder predictions → click an item → see bundle recommendations → optionally generate a kit list.

Inspiration

We kept seeing buyers and warehouse managers buried in spreadsheets and purchase logs, making high-impact decisions under time pressure. We wanted something that’s fast to understand in a demo, but grounded in reality: use the organization’s actual purchase patterns to recommend what to reorder and what to buy together.

What it does

ProcureSense provides four main capabilities:

1) Purchase Data Ingestion (CSV or One-Click Demo Load)

  • Upload purchase history via CSV, or click Load Demo Data to seed a known-good dataset.
  • Stores purchases and products in PostgreSQL as the system of record.
  • Shows a purchase summary so users can confirm what’s loaded.

2) Deterministic Reorder Predictions (“What’s due soon?”)

For each SKU, ProcureSense:

  • Groups purchases by org + SKU
  • Computes intervals (days between consecutive purchases)
  • Uses the median interval as the SKU’s typical cadence
  • Predicts the next reorder date from lastPurchaseAt + cadence
  • Calculates daysUntil and a deterministic confidence score based on how much history exists (and how stable it is)

This produces a ranked table of reorders—so buyers can immediately see what’s most urgent.

3) Deterministic Bundle Recommendations (“What should be bought together?”)

When you click a SKU, ProcureSense:

  • Groups purchases by order_id (or a defined fallback grouping)
  • Counts how often SKUs co-occur
  • Returns the top related SKUs with their coPurchaseCount

This helps buyers avoid missing companion supplies that historically show up in the same orders.

4) Physical “Glanceable” Stock Display (ESP32 + LED Matrix)

For the physical portion of the project, we used a 10×10 RGB LED matrix paired with an ESP32 microcontroller and a buzzer.

  • The ESP32 periodically pings the server for a 10-integer vector (representing normalized stock levels).
  • That vector is used to visualize stock status on the LED matrix.
  • The device beeps whenever the matrix is updated, creating an ambient, glanceable signal without needing to stare at a dashboard tab.

Optional: Guided Purchase Assistant (AI + Guardrails)

  • A chat-style flow where users describe a scenario (e.g., “new satellite warehouse setup”).
  • The assistant returns a structured shopping list (SKUs, quantities, reasons).
  • Guardrails ensure it only uses SKUs from the known catalog (no invented products).
  • Cached responses + deterministic fallback keep the demo reliable if the LLM is slow/unavailable.

How we built it

  • Frontend: Angular (TypeScript) + Angular Material
    • Dashboard with 3 regions: Reorders table → Item detail → Bundles panel
    • Optional Assistant page for scenario → shopping list
    • Clear loading/error/empty states for judge clarity
  • Backend: Java + Spring Boot (REST API)
    • Endpoints for ingestion, summaries, reorder insights, bundle insights, assistant chat, and a hardware stock endpoint
    • Deterministic services compute reorder cadence/confidence and co-purchase bundles
  • Database: PostgreSQL
    • Stores purchases/products
    • Stores cached AI explanations/rationales for speed and resiliency
  • AI Provider: OpenAI (Responses API)
    • Used only for short explanations/formatting
    • Never used to compute dates, confidence, or co-purchase counts
  • Hardware
    • ESP32 firmware polls the backend for a 10-int stock vector
    • 10×10 RGB matrix renders a glanceable stock visualization
    • Buzzer provides an audible update cue
  • Hackathon identity approach
    • “Demo-mode identity” via headers on every request:
    • X-Org-Id
    • X-Role
    • This demonstrates multi-org/role readiness without spending hackathon time on full auth.

Challenges we ran into

  • Demo reliability vs. real-world complexity: CSVs can be messy, so we prioritized a one-click demo dataset and clear validation errors.
  • Keeping AI from hallucinating: we had to constrain outputs to the product catalog, validate structured responses, and provide deterministic fallbacks.
  • Defining confidence and ranking: we needed reorder predictions to “feel right” and remain stable, using simple heuristics rather than opaque ML.
  • End-to-end integration: aligning API contracts and UI states early prevented mismatches during wiring.
  • Physical feedback loop: representing backend stock signals as a clean, stable LED visualization required choosing a simple 10-value protocol and update behavior.

Accomplishments that we’re proud of

  • A true golden path: Load data → Reorders → Detail → Bundles (with optional assistant) that is easy for judges to follow.
  • Deterministic, explainable insights derived from real purchase history (not AI guesswork).
  • Caching + fallback modes so the demo remains usable even under LLM latency/outage.
  • A “glanceable” physical companion display that brings key status out of the browser and into the workspace.
  • A clean architecture that’s “hackathon-fast” but still structured: consistent headers, clear endpoints, PostgreSQL as source of truth.

What we learned

  • Reliability wins hackathons: the best demo is the one that works every time.
  • AI is most effective as a layer for explanations and structured formatting, not as the source of truth for business-critical calculations.
  • Simple, transparent heuristics (median cadence, co-purchase counts) can deliver high value when presented clearly and consistently.
  • Ambient/physical cues can reduce “dashboard fatigue” by making critical status glanceable.

What’s next for ProcureSense

  • Stronger modeling: incorporate lead times, seasonality, quantity trends, and simple anomaly detection—while staying explainable.
  • Real authentication: add lightweight login/JWT while preserving the same org/role context pattern internally.
  • Workflow exports: generate a “ready-to-order” shopping list export (CSV/PO draft) from reorders + bundles.
  • Deeper catalog integration: richer product metadata (categories/tags) to improve bundle relevance and assistant responses.
  • Hardware evolution: configurable alert profiles (colors/sounds), smoother update cadence, and mapping alerts to specific high-priority SKUs.
  • Production hardening: background jobs for insight refresh, observability, and multi-tenant controls.
Share this project:

Updates