This is a submission for the Hacktoberfest Open-Source AI Challenge Week 2: Side Hustle
What I Built
Small business side hustles β such as boutique apparel shops, artisanal candle makers, and independent coffee roasters β run on razor-thin margins and packed schedules. Most owners juggle inventory between handwritten notes, chaotic spreadsheets, or clunky enterprise ERPs designed for mega-warehouses.
When boutique owners turn to generic cloud AI tools for help, they face two critical dealbreakers:
- Hallucination Risk: Cloud LLMs invent numbers or round off inventory counts, causing costly stockouts or ghost stock.
- Privacy & Data Leakage: Uploading confidential supplier invoices, wholesale discount tiers, wholesale costs, and warehouse passcodes to proprietary third-party servers leaks proprietary business advantages.
StockMate AI is a privacy-first, open-source inventory assistant powered by Google Gemma 2 and MongoDB Atlas, built specifically for side hustles and boutique retailers.
Key Capabilities:
- π£οΈ Natural Language Stock Assistant: Shop owners speak or type casually (e.g., "Received 15 linen shirts from supplier" or "Sold 3 ceramic mugs in store").
- π‘οΈ Zero-Hallucination Safe Mode: Gemma classifies intent and extracts quantities, but transactions are validated by a deterministic Python state engine and confirmed via a human-in-the-loop modal before committing to the ledger.
- π Zero-Leak Privacy Whitelist: Before anything reaches Gemma, sensitive data (supplier emails, purchase contract notes, wholesale costs, warehouse coordinates) is stripped. Only sanitized operational metrics (e.g.
Item-Apparel-P-101) are processed. - β οΈ Smart Restocking with Uncertainty Modeling: Proactively alerts owners when stock breaches safety thresholds, providing explicit uncertainty levels (
Low,Medium,High) based on sales velocity. - π Grounded Business Q&A: Answers questions like "What should I restock this week?" or "What is my total inventory valuation?" grounded in verified MongoDB aggregation numbers.
- π Immutable Movement Ledger: Automatically logs all sales, restocks, and transit losses with permanent timestamps.
Who Would Pay For It?
Independent boutique retailers, craft creators on Etsy/Shopify, and specialty roasters. StockMate AI saves 5+ hours of tedious weekly stock reconciliation while ensuring trade secrets and customer margins never leak. (I will keep it available as open source (the hosted solution might go down if my free quota expires or any thing else happened, but code is free and will be available in github.) And local setup is fully working, so just run it :) )
Demo
Deployed:
The above website is live thanks to Render.
- π Live Web Application: (If db not loading wait for a min and refresh , it should fetch from atlas) https://stockmate.chiranjib.tech
- π‘ Interactive API Docs: https://api.stockmate.chiranjib.tech/docs
(Hosted on Render with custom domain and automatic Let's Encrypt SSL).
Code
StockMate AI π¦π€
Privacy-First, Open-Source AI Inventory Assistant for Small Businesses & Side Hustles
Built for DEV Hacktoberfest 2026 Open-Source AI Challenge: Week 2 (Side Hustle)
π‘ The Core Idea & The "Side Hustle" Dilemma
Solo entrepreneurs, boutique retailers, Instagram sellers, and artisan makers are running real businesses on razor-thin margins. Most still manage thousands of dollars in stock using chaotic spreadsheets, paper notebooks, or mental memory.
The Pain Points:
- Costly Stockouts: High-velocity best-sellers suddenly hit zero stock before anyone notices, causing missed sales and frustrated customers.
- Tied-Up Working Capital: Over-ordering slow-moving inventory because reorder calculations and sales velocity math are tedious and neglected.
- The AI Privacy Paradox: Small business owners want AI assistance, but commercial platforms demand direct database access or require uploading sensitive supplier emails, wholesale invoices, customer details, and warehouse access codes.
The Solution: StockMate AI
StockMate AI is an intelligent, privacy-aware inventory operations platform designed specificallyβ¦
- Repository: github.com/chiranjib2001/StockMate-AI
- License: MIT Open Source License
How I Built It
StockMate AI is architected as a hybrid open-weight intelligence pipeline:
flowchart TD
User(["Boutique Owner"]) <--> UI["React 18 + Vite UI (Glassmorphism & Recharts)"]
subgraph Backend ["FastAPI Backend"]
API["REST API Gateway"]
Router["Products Β· Movements Β· Analytics Β· AI"]
API <--> Router
subgraph PrivacyLayer ["Privacy Guard Layer"]
Sanitizer["PII Regex Redactor"]
Whitelist["Field Minimizer & Token Masker"]
AuditLog["AI Audit Trail Logger"]
Sanitizer --> Whitelist
end
subgraph DeterministicEngine ["Deterministic Safe Engine"]
Rules["Inventory Availability Rules"]
Math["Sales Velocity & Reorder Buffers"]
Atomic["Atomic DB Transaction Commit"]
Rules --> Math --> Atomic
end
end
subgraph OpenWeightAI ["Open-Weight AI Pipeline"]
Local["Local Ollama (Gemma 2:2b)"]
Cloud["Cloud OpenRouter & Groq (Gemma 4 & Gemma 2)"]
end
subgraph DataLayer ["Data Layer"]
DB[("MongoDB Atlas Replica Set")]
end
UI <--> API
Router --> Sanitizer
Whitelist --> Local
Whitelist --> Cloud
Local --> AuditLog
Cloud --> AuditLog
Router <--> DeterministicEngine
DeterministicEngine <--> DB
Technology Stack:
Open-Weight AI (Google Gemma 2 & Gemma 4):
Local Private Mode: Runs offline via Ollama (gemma2:2b) with zero cloud data transmission.
Cloud Production Fallback (only for render we can't use localhost so need cloud providers): Powered by OpenRouter (google/gemma-4-26b-a4b-it:free) and Groq (gemma2-9b-it) with automatic multi-key rotation and rate-limit recovery.
Backend Engine:
FastAPI (Python 3.11) with async routing, Pydantic schemas, and structured error handling.
Async Motor Driver connecting to MongoDB Atlas.
Deterministic regex and token-overlap product matching to prevent zero-inventory edge cases.
Frontend Experience:
React 18 + TypeScript + Vite styled with a custom dark-mode Obsidian glassmorphism design system.
Recharts for real-time inventory category valuations and KPI distribution.
Lucide Icons for responsive micro-interactions.
Cloud Infrastructure & Domain:
- Render Web Service: Hosts the FastAPI backend container.
- Render Static Site: Deploys the optimized Vite React production build.
- .tech Domain: Live at stockmate.chiranjib.tech with automated TLS/SSL.
Why Does Open Innovation Matter?
True Privacy for Sensitive Trade Secrets: Closed proprietary AI APIs often reserve rights to use prompt data for model training. For a small boutique, supplier names, bulk pricing discounts, and wholesale margins are core trade secrets. By running open-weight Gemma with a strict privacy whitelist layer, shop owners know their business data remains entirely in their control.
Zero Marginal Operating Cost: A side hustle cannot afford $0.03 per prompt when logging dozens of small updates every day. Running Gemma locally on Ollama costs $0.00 in API fees, keeping overhead virtually zero.
Freedom from Lock-in: If a cloud provider changes pricing or deprecates an API version, open weights guarantee that the business logic continues running unmodified on any laptop or container.
My Agent Session
For dev session not adding.
My First User
Not yet :) ;)
Prize Categories
Prize Categories
I am entering the following Hacktoberfest 2026 Partner Tracks:
- Overall 1.** Best Use of Render ** Frontend & Backend Production Hosting: Hosted entirely on Render using a FastAPI Web Service (stockmate-api) and an automated Vite React Static Site (stockmate-frontend) connected via Render custom domain routing.
- ** Best Use of Gemma ** Core Intelligence: Google Gemma is the core intelligence engine across the system β utilizing Gemma 2:2b for local offline inference and Gemma 4:26b / Gemma 2:9b for cloud-hosted natural language parsing and grounded business Q&A.
- ** Best Use of MongoDB Atlas ** Resilient Data Layer: Powered by MongoDB Atlas for atomic stock transactions, real-time inventory quantity adjustments ($inc), and immutable AI privacy audit logging.
- ** Best Use of a .tech Domain ** Custom Production Domain: Deployed live on a claimed Hacktoberfest .tech domain: Application: https://stockmate.chiranjib.tech Backend API: https://api.stockmate.chiranjib.tech
-
Best Use of GitHub: Automated CI/CD with GitHub Actions (
.github/workflows/ci.yml) to validate backend endpoints, run syntax checks, and test the production Vite build on every push.
Top comments (0)