
SmartShelf
The Zero-Touch Inventory System for Modern Retail
Project links
About this project
The problem it solves
The Problem: Running a Store by Guesswork Millions of local Kirana store owners in India manage their businesses entirely by hand. They face constant challenges that hurt their profits:
Manual Tracking: Owners spend hours checking shelves to see what is missing.
Lost Sales: They often realize an item is out of stock only after a customer asks for it.
Wasted Money: They guess what to buy, often overstocking items that don't sell.
Inefficient Payments: Managing cash and negotiating prices with multiple suppliers takes up valuable time.
The Solution: SmartShelf SmartShelf replaces this manual work with an intelligent, autonomous agent. It acts like a digital manager that works 24/7 to keep the store stocked.
Instead of a human checking inventory, SmartShelf automates the entire loop:
Smart Monitoring: It watches stock levels in real-time.
AI Decisions: It uses Google Gemini Pro to analyze sales history and decide exactly how much to reorder, removing the guesswork.
Auto-Negotiation: It autonomously connects with suppliers using a simulated Agent-to-Agent (A2A) network to find the best deals.
Instant Settlement: It executes secure, verifiable payments immediately on the Base Sepolia blockchain using the x402 protocol.
By handling these tasks automatically, SmartShelf prevents stockouts and frees up the shopkeeper to focus on their customers rather than logistics.
Challenges we ran into
- Making the AI Speak "Code" The biggest challenge was that Google Gemini sometimes replied with extra conversational text (like "Here is your plan") instead of just the data we needed. This broke our app.
Solution: We wrote a simple "cleanup" function that strips away the extra text and forces the AI to give us only clean, usable JSON data.
- Browser Security Blocks (CORS) We ran into a security issue where the browser blocked our "Store" app from reading the payment proof (x-payment-hash) sent by the "Supplier" server.
Solution: We had to configure our backend specifically to "expose" this header so our frontend could verify the blockchain transaction legally.
- AI Model Availability We initially tried using specific faster AI models, but they weren't available in our region, causing 404 errors that crashed the agent.
Solution: We built a fallback system and switched to the stable Gemini Pro model to ensure the agent always works, even if one model is down.
- Syncing Two Dashboards We wanted the Supplier Dashboard to update instantly when the Store Agent placed an order. Connecting two separate apps in real-time was tricky.
Solution: We created a shared backend memory and used "polling" (checking every 2 seconds) to make sure the Supplier sees new orders the moment they happen.
About the founder
Building on Base from India