AI-powered inventory management with dynamic pricing and demand forecasting for modern restaurants.
Stockd turns inventory data into restaurant profits. We help restaurants improve margins by 2-5%, save 8+ hours per week, and increase revenue 10-15% during peak periods through intelligent inventory management and dynamic pricing.
This repository now also serves as the real codebase for the networking course project, "Secure, Optimize, and Monitor Your Website."
Assignment-focused additions in this repo:
- deployable app/runtime/auth/UI/test surface transplanted from the
htmltestrepo into this canonicalStockdrepo - XSS hardening and safer imported-text handling in the real frontend
- server-enforced brute-force login protection through a Supabase Edge Function and lockout table
- security event persistence plus a monitoring page at
Frontend/pages/security-monitor.html - deterministic security-analysis artifacts in
logs/ - GitHub Actions CI and deploy workflows in
.github/workflows/
Useful course-project docs:
docs/security-hardening.mdassignment-integration-status.mdassignment-deploy-checklist.mdassignment-requirements-mapping.mdfinal-submission-checklist.mdfinal-demo-script.mdfinal-report-notes.mdrepo-transplant-summary.md
- Supabase rollout completed for the assignment enhancements:
auth_login_guardsmigration appliedsecurity_eventsmigration appliedauth-login,security-log-event, andsecurity-analyzedeployed
- live monitoring artifacts were regenerated from the real Stockd Supabase project
- the htmltest deployable app surface was transplanted into this Stockd repo, while Stockd docs/workflows/live backend names were preserved
- remaining manual step: redeploy the updated frontend through the real Stockd Vercel project so the public site exposes the guarded login flow and security monitor page
- GitHub Actions workflows are in repo, but repository secrets still need to be configured before deploy automation can run
- GitHub repository URL:
https://github.com/stockd-ai/Stockd - Live website URL:
<paste the verified Stockd production URL before submission>
Every year, restaurants in the United States waste 22-33 billion pounds of food and lose $162 billion annually to food waste. The average restaurant throws away 4-10% of purchases before it reaches a customer's plate.
Why? Most restaurants still track inventory with pen and paper or basic spreadsheets, leading to:
- Guesswork ordering based on gut feeling
- Over-purchasing that results in spoilage
- Stockouts and lost revenue
- No visibility into usage patterns
Traditional inventory systems cost thousands per month or are too complex for daily use.
Stockd combines real-time inventory tracking, AI-powered forecasting, and dynamic pricing to turn inventory management into a profit center.
โ Improve profit margins by 2-5% through optimized purchasing and dynamic revenue management โ Save 8+ hours per week with automated reorder suggestions โ Increase revenue 10-15% during peak periods with intelligent surge pricing โ Reduce food waste by 20-40% through precise ordering
- Real-time KPI tracking: revenue, inventory alerts, menu performance
- Interactive charts showing 4-week trends and category breakdowns
- Forecast accuracy metrics (MAPE tracking)
- Profit optimization metrics
- Predicts next-day demand using historical sales trends and AI-assisted analysis
- Analyzes 90 days of historical sales data
- Generates 7-day revenue forecasts
- Adapts to seasonal variations and day-of-week patterns
- Real-time ingredient tracking with automatic alerts
- Days of Supply calculationโknow when ingredients will run out
- Par level suggestions based on usage patterns
- Visual health dashboard (Critical, Warning, Healthy)
- Automated reorder quantity suggestions
- Real-time surge pricing based on demand patterns
- Toast POS API integration for live order flow
- Automatic price adjustments during peak hours
- Revenue optimization through convenience pricing
- Track food costs as percentage of revenue
- Identify waste hotspots and high-spoilage ingredients
- Calculate ROI of waste reduction initiatives
- Monitor inventory shrinkage
- Natural language interface powered by a Supabase Edge Function with OpenAI-based responses
- Ask questions like "What's my forecast for tomorrow?" or "Should I raise prices tonight?"
- Get actionable business insights instantly
- Vanilla JavaScript - Lightweight client-side logic
- HTML5 + CSS3 - Apple-inspired responsive design
- Chart.js - Interactive data visualizations
- Supabase - PostgreSQL database with real-time subscriptions
- PostgreSQL Functions - Custom RPC endpoints for complex queries
- Row Level Security (RLS) - Multi-tenant data isolation
- OpenAI Responses API - Natural language Copilot and pricing insights
- Custom algorithms - Time-series analysis with moving averages
- PapaParse - CSV parsing for bulk data imports
- Toast POS API (emulated) - Order flow data for surge pricing
โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ
โ Frontend โ โโโโโโโบ โ Supabase โ โโโโโโโบ โ OpenAI โ
โ (Vanilla โ โ (PostgreSQL โ โ API โ
โ JS) โ โ + Realtime)โ โ(Forecasting)โ
โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ
Days of Supply:
Days of Supply = Quantity on Hand / Average Daily Usage
Forecast Error (MAPE):
MAPE = (100% / n) ร ฮฃ|Actual - Forecast| / Actual
โ Sub-200ms Dashboard Load Time - Optimized queries and parallel data fetching โ 13% MAPE Forecast Accuracy - Rivals commercial solutions costing thousands/month โ Dynamic Pricing Engine - Increase revenue 10-15% during peak periods โ Beautiful, Intuitive UI - Apple-inspired design system โ 90-Day Historical Analysis - Process thousands of transactions for insights โ Functional AI Copilot - Natural language interface with actionable recommendations
- PostgreSQL Mastery - Window functions, CTEs, RLS policies, custom aggregates
- AI Integration - JSON schema validation, prompt engineering, and secure tool-calling flows
- Real-Time Architecture - WebSocket management, optimistic UI updates
- Data Visualization - Chart selection, color theory, accessibility
- Restaurant Operations - Par levels, food cost percentages, menu engineering
- Time-Series Forecasting - Moving averages, seasonality, MAPE measurement
- Dynamic Pricing - Price elasticity, surge pricing, race condition handling
Built custom PostgreSQL functions with aggressive caching to aggregate transaction-based ledger on-demand.
Improved from 35% MAPE to 13% MAPE by combining historical demand analytics with AI-assisted restaurant context.
Created synthetic data generator simulating realistic order flow patterns for testing surge pricing without live POS access.
Solved race conditions using PostgreSQL transactions with row-level locking and timestamp-based price versioning.
Optimized rendering of 90-day datasets through data sampling and proper instance cleanup.
- ๐ฑ Mobile App - iOS/Android with barcode scanning and offline support
- ๐ฐ Advanced Dynamic Pricing - ML-based price elasticity modeling
- ๐ Supplier Integration - Direct API connections to distributors
- ๐งพ Recipe Cost Analysis - Real-time menu item profitability
- ๐ข Multi-Location Support - Enterprise features for restaurant groups
- ๐ค Team Collaboration - Task assignments and approval workflows
- ๐ Advanced Analytics - ML-powered profit optimization
- ๐ฏ Revenue Intelligence - Dynamic bundling and upsell recommendations
- ๐ Industry Expansion - Hotels, catering, food trucks, retail
- ๐ค Predictive Automation - Auto-generate purchase orders
- ๐ณ Financial Integration - QuickBooks, Xero, P&L automation
- ๐ฑ Customer Experience - Loyalty programs, personalized menus
If just 10% of US restaurants adopted Stockd:
- ๐ฐ Save $4+ billion/year through optimized purchasing
- ๐ Generate $2+ billion in additional revenue via dynamic pricing
- โฑ๏ธ Free up 8+ million hours of manager time annually
- ๐ฑ Prevent 550-825 million pounds of food waste
Stockd turns inventory management from a cost center into a profit driver.
Built with โค๏ธ at UGAHacks 11 by:
UGAHacks 11 - University of Georgia ๐ Designed in Athens, GA ๐๏ธ February 2026
This project was created for UGAHacks 11. All rights reserved.
- ๐ Devpost Submission
Turning inventory data into restaurant profits. ๐