Inspiration

India runs on a massive network of over 12 million Kirana stores and the traders who supply them. This ecosystem is not just "large"—it is the undisputed backbone of our economy, controlling over 90% of the Indian food and grocery market.

Yet, the "Digital India" revolution has largely skipped these small-scale business owners. While Quick Commerce giants are projected to capture $1.28 billion of Kirana sales in 2024, less than 13% of Kirana stores in major cities are actually tech-enabled. Why? Because existing business apps are designed for the tech-savvy: they require complex typing, navigation through endless menus, and literacy in English.

We noticed that a shopkeeper in a remote village handles complex mental math and "Udhaari" (credit) relationships effortlessly but struggles with a drop-down menu. We asked: What if the software could listen and act like a human assistant?

Smart Vyapar was born from the desire to bridge this digital divide. We wanted to bring Enterprise-Grade AI (Gemini 3.0) out of corporate offices and into the "Ghar-Ghar" (every home) level, replacing complex interfaces with the most natural tool available: Voice

What it does

Smart Vyapar is an AI-powered operating system for small traders and shopkeepers that functions completely hands-free. It doesn't just "chat"; it performs physical tasks and builds business connections.

AI-Powered B2B Networking: This is a game-changer. The AI helps new Traders approach Shopkeepers and new Shopkeepers find the best Traders in their area. It breaks the barrier of "who knows whom," allowing a small shopkeeper to get better rates from new suppliers instantly.

Voice-Controlled Ledger: The informal credit gap for Indian Kiranas is estimated at ₹20 lakh crore ($230 billion). Managing this is critical. Users can simply say, "Ramesh ke naam pe 500 rupay likh do" (Write 500 rupees against Ramesh), and the AI updates the complex credit database instantly.

AI-Powered OCR (Bill Scanning): Instead of manual data entry, the trader says "Bill scan karo". The AI triggers the camera, reads the invoice using Optical Character Recognition (OCR), and updates the inventory automatically.

Logistics & Location Tracking: The AI can autonomously verify the shop's location for delivery logistics using GPS, triggered solely by voice command.

Context-Aware Memory: Unlike basic bots, Smart Vyapar remembers context. If you scan a bill and then say "Iska total kya hai?", it knows you are talking about the just-scanned items.

Always-On Assistant: Using a system-wide floating overlay, the AI is accessible even when the phone is locked, ensuring it fits into their busy lifestyle.

How we built it

We built Smart Vyapar using Flutter for a seamless cross-platform experience, heavily integrated with the Google Generative AI SDK.

Gemini 3.0 Flash Integration: We used the latest Gemini models for their speed and multimodal capabilities.

Function Calling (The "Brain-Hand" Connection): This is the core innovation. We defined custom tools using FunctionDeclaration:

startOCRScan(): Bridges the AI to the device's camera and ML Kit text recognition.

updateShopkeeperLocation(): Bridges the AI to the geolocator plugin.

When the user speaks, Gemini decides intent and executes the actual Dart code function on the device.

State Management: We implemented an AppStateManager that feeds the current app state (inventory, last scanned item, active user) back into the AI's prompt as "System Instructions." This gives Gemini "Short-Term Memory."

System Alert Window: We utilized Android's SYSTEM_ALERT_WINDOW permission to create a persistent Voice Overlay, allowing the AI to live outside the app boundary.

Challenges we ran into

The "Function Declaration" Syntax: Integrating the new google_generative_ai package (v0.4.7+) was tricky. We faced issues with mapping Dart's positional arguments to the AI's schema requirements (Schema.object), causing build failures. We solved this by strictly defining the tool definitions to match the latest SDK protocols.

Context Retention: Initially, the AI would forget the previous transaction. We had to build a feedback loop where the app's state is injected into every new prompt, ensuring the AI knows "Who is logged in" and "What was just scanned."

Overlay Permissions: Managing the lifecycle of the floating widget so it doesn't crash when the app is in the background required careful handling of Android's background service limitations.

Accomplishments that we're proud of

Bridging the Trader-Shopkeeper Gap: Creating a platform where a new trader can easily approach a shopkeeper they've never met, solely through digital discovery.

True Automation: We didn't just build a chatbot; we built an Agent. Seeing the AI actually open the camera and process a bill based on a voice command was a magical moment.

Empowering the Underserved: With 87% of young MSME owners already using smartphones, our "Zero Typing" UI unlocks the digital economy for millions who were previously excluded by text-heavy apps.

Seamless "Udhaari" Management: Digitizing the informal credit system of rural India is a massive challenge, and we made it as easy as talking to a friend.

What we learned

AI as an OS: We learned that LLMs are not just text generators; they are excellent orchestrators of software functions.

The Importance of Latency: For a shopkeeper with a customer waiting, speed is everything. Optimizing the OCR and Gemini Flash response times was critical.

Cultural Context: "Smart" isn't about features; it's about understanding the user. A simple "Namaste" and understanding Hindi/Hinglish commands makes the AI 10x more effective than a complex English dashboard.

What's next for Smart Vyapar

Hyper-Local Marketplace: We plan to launch a feature where Traders can broadcast offers ("Rice sale today") and nearby Shopkeepers get notified via Voice, creating a real-time B2B market.

Vernacular Language Support: Expanding Gemini's system instructions to natively support Tamil, Telugu, and Bengali dialects.

Offline AI: Exploring Gemini Nano to run basic credit logging on-device without the internet, crucial for remote villages.

Predictive Stocking: Using the data to tell the shopkeeper, "Boss, doodh khatam hone wala hai" (Milk is about to run out) before it actually does.

Built With

Share this project:

Updates