// the problem
Why This Needed to Exist
Small restaurant operations often rely on manual inventory tracking, leading to stockouts, over-ordering, and waste. I wanted to build a system that not only tracks inventory in real-time but also predicts future demand using machine learning — all within a lightweight, easily deployable web application.
// what i built
The Solution
I built a Flask-based inventory management system with a SQLite backend, featuring CRUD operations for inventory items, automated GST receipt generation, critical stock alerts, and an ML-powered demand forecasting module. The entire application is deployed on Vercel as a serverless Python function.
// key challenges
Problems I Solved
ML Model Integration in Serverless
Serverless environments have cold start limitations and memory constraints. I optimized the demand forecasting model to use lightweight sklearn estimators with pre-computed features, keeping the model serialized under 5MB and inference time under 200ms.
SQLite on Serverless
Vercel's serverless functions don't persist filesystem state between invocations. I implemented a strategy using SQLite with a read-only base dataset and write-ahead logging for session-based modifications, with clear data lifecycle documentation.
GST Calculation Accuracy
Canadian GST rules have edge cases around exempt items and rounding. I implemented precise decimal arithmetic using Python's decimal module and created a tax classification system for each inventory category.
// outcomes
What I Learned
The application serves as both a practical inventory tool and a portfolio piece demonstrating Python web development, ML integration, database management, and cloud deployment skills. It's live and accessible for anyone to test.
// tech stack
Tools & How I Used Them
Flask
Python web framework handling routing, templates, and API endpoints
scikit-learn
ML library for demand forecasting and predictive analytics
SQLite
Lightweight database for inventory persistence and transaction logs
Jinja2
Template engine for dynamic HTML rendering and receipt generation
Vercel
Serverless deployment platform with Python runtime support