Intelligent Retail Operations Platform

The Baker

A production-grade architecture that bridges Customer Experience and Operational Efficiency using Hybrid AI.

For Customers

Real-Time Portal

A Progressive Web App for live inventory visibility and reservations — no more wasted trips.

For Staff

Deterministic AI

A dual-target machine learning ensemble predicts daily demand and waste margins mathematically.

First Week Live

Early Signals

70%Opt-in Rate
300+Real Customers
500+Point Records
150+Repeat Visits

All numbers from production database records — actual purchases and point issuance, not demo data. The core goal is retention, and repeat visits showed up immediately.

The Problem

Two Critical Failures

Demand Volatility

Weather-dependent sales with no way to predict daily demand accurately.

Operational Waste

Perishable inventory and guesswork production leading to daily losses.

The Solution

Unified Platform

Customer Portal

Real-time PWA for live inventory visibility, preventing customer friction.

Staff Decision Engine

Deterministic XGBoost & LSTM ensembles explicitly model separate revenue and waste targets.

Under The Hood

Deterministic AI
Architecture

A dual-target ML orchestrated via LangGraph, pairing XGBoost math with Gemini explanations.

01
Primary

Machine Learning Engine

XGBoost + PyTorch LSTM Dual-Targeting
Dual-Target: Models explicitly predict `sold_qty` and `waste_qty` as separate buffers.
Anti-Leakage: Uses strict shift(1) moving averages and 28-day temporal windows.
Ensemble Circuit Breaker: Compares XGBoost vs LSTM gap; if >20%, triggers anomaly degradation.
Safe Output: LLMs never guess numbers. Integers are mathematically validated first.
02
Orchestrator

LangGraph + Gemini

Goal: Human-Readable Staff Trust
LangGraph DAG: State machine coordinates concurrent XGBoost/LSTM execution nodes.
Pydantic LLM Boundary: Gemini is strictly fed the finalized integers using fixed schema limits.
Qualitative Briefing: LLM translates the weather impact into a conversational bakery summary.
Result: Staff receive a completely transparent, math-backed production plan.
Built With

Tech Stack

Java 17Spring Boot 3.2
FastAPILangGraph API
XGBoostDual-Target ML
PostgreSQLDatabase
DockerInfrastructure