<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Deep Manna</title>
    <description>The latest articles on DEV Community by Deep Manna (@deep_manna_675479a195902a).</description>
    <link>https://dev.to/deep_manna_675479a195902a</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4156089%2F653e8a0c-f015-48e8-a302-69a670ba7760.png</url>
      <title>DEV Community: Deep Manna</title>
      <link>https://dev.to/deep_manna_675479a195902a</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/deep_manna_675479a195902a"/>
    <language>en</language>
    <item>
      <title>KisanMitra-is an intelligent, bilingual AI farm management assistant and rural deed ledger designed specifically for smallholder farmers</title>
      <dc:creator>Deep Manna</dc:creator>
      <pubDate>Thu, 22 Oct 2026 16:19:56 +0000</pubDate>
      <link>https://dev.to/deep_manna_675479a195902a/kisanmitra-is-an-intelligent-bilingual-ai-farm-management-assistant-and-rural-deed-ledger-designed-54en</link>
      <guid>https://dev.to/deep_manna_675479a195902a/kisanmitra-is-an-intelligent-bilingual-ai-farm-management-assistant-and-rural-deed-ledger-designed-54en</guid>
      <description>&lt;h1&gt;
  
  
  Hacktoberfest Week 3 Challenge Submission
&lt;/h1&gt;

&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/hacktoberfest-week3-2026-10-19"&gt;Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;KisanMitra (किसान मित्र)&lt;/strong&gt; is an intelligent, bilingual AI farm management assistant and rural deed ledger designed specifically for smallholder farmers. &lt;/p&gt;

&lt;p&gt;Farming is mentally overwhelming: remembering the exact day each field needs irrigation (e.g., Crown Root Initiation stage at 21 days for wheat), tracking pesticide intervals before pests multiply, keeping up with volatile Mandi (crop market) commodity prices, and managing informal rural financial credit—"Bahi-Khata" (who owes whom, agricultural deeds, land leases, seed credit, and trader payments).&lt;/p&gt;

&lt;h3&gt;
  
  
  What KisanMitra Does:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;🌱 Smart Irrigation &amp;amp; Spray Scheduler&lt;/strong&gt;: Automatically calculates ideal watering and pesticide schedules using agricultural science standards (ICAR) for crops like Wheat, Rice, Tomato, Cotton, Mustard, Soybean, Potato, and Gram. Features live countdown timers, urgency alerts (🔴 Overdue, 🟡 Due Soon), and 1-click "Watered Today" / "Sprayed Today" logging.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;🤝 Deed &amp;amp; Bahi-Khata Ledger&lt;/strong&gt;: Tracks "Dena Hai" (deeds/loans to pay back) and "Lena Hai" (receivables from mandi traders and buyers), with interest tracking, partial settlement recording, and a &lt;strong&gt;1-click WhatsApp payment reminder generator&lt;/strong&gt; in Hindi and English.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;📈 Mandi Market Intelligence&lt;/strong&gt;: Provides real-time benchmark commodity rates across major APMC mandis (Indore, Azadpur, Rajkot, etc.) paired with Gemini AI price forecasting and selling advice.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;⛅ Live Agro-Weather Advisory&lt;/strong&gt;: Uses real-time weather data (temperature, wind speed, rain probability, humidity) to provide actionable crop advice (e.g., &lt;em&gt;"Wind &amp;gt; 18 km/h: Postpone pesticide spray to prevent drift loss"&lt;/em&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;🎙️ Voice AI Farm Doctor&lt;/strong&gt;: Farmers can speak their farming questions in Hindi or English using Web Speech Recognition, and hear the AI recommendations read aloud using Text-to-Speech.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Who Gets to Be Lazier?
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Farmers and their families.&lt;/strong&gt; Instead of maintaining messy paper diaries, guessing when to irrigate, making daily phone calls to multiple mandis, or awkwardly pursuing neighbors and traders for pending deed payments, KisanMitra handles the calculations, monitors the calendar, generates polite WhatsApp payment reminders, and advises on crop care automatically.&lt;/p&gt;




&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Local Prototype URL&lt;/strong&gt;: &lt;code&gt;http://localhost:3000&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Source Code&lt;/strong&gt;: &lt;strong&gt;&lt;a href="https://github.com/deepmanna2007/KisanMitra" rel="noopener noreferrer"&gt;https://github.com/deepmanna2007/KisanMitra&lt;/a&gt;&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Live Demo &amp;amp; Prototype Features&lt;/strong&gt;:

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Dashboard&lt;/strong&gt;: Immediate visibility into water/pesticide alerts, 7-day calendar, and pending deed totals.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Crop Manager&lt;/strong&gt;: 1-click crop presets with auto-calculated watering days, pesticide dosages, fertilizer splits, and AI schedule optimization.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Mandi Prices&lt;/strong&gt;: Filterable commodity rate board with AI price trend predictions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Weather&lt;/strong&gt;: Real-time city forecast with automated spray/irrigation advisories.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Deed &amp;amp; Bahi-Khata&lt;/strong&gt;: Manage loans/deeds with WhatsApp reminder triggers and partial payment settlements.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Voice AI Assistant&lt;/strong&gt;: Bilingual chat powered by Google Gemini with speech recognition (🎙️) and voice readout (🔊).&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Code
&lt;/h2&gt;

&lt;p&gt;The application is built with clean, zero-dependency vanilla web standards designed to run on low-end mobile devices in rural areas without app store downloads.&lt;/p&gt;

&lt;h3&gt;
  
  
  Core Architecture:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;[&lt;code&gt;index.html&lt;/code&gt;]: Semantic, accessible structure with responsive layout, bilingual labels (Hindi &amp;amp; English), and offline-first modals.&lt;/li&gt;
&lt;li&gt;[&lt;code&gt;style.css&lt;/code&gt;]: Custom dark emerald-green design system, high-contrast indicators, responsive cards, and micro-animations.&lt;/li&gt;
&lt;li&gt;[&lt;code&gt;app.js&lt;/code&gt;]: Application logic containing:

&lt;ul&gt;
&lt;li&gt;Gemini AI multi-model fallback pipeline (&lt;code&gt;gemini-3.1-flash-lite&lt;/code&gt;, &lt;code&gt;gemini-3.5-flash-lite&lt;/code&gt;, &lt;code&gt;gemini-flash-lite-latest&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;ICAR crop schedule preset engine&lt;/li&gt;
&lt;li&gt;Open-Meteo real-time geocoding and meteorological data parser&lt;/li&gt;
&lt;li&gt;Bahi-Khata ledger, interest engine, and WhatsApp message generator&lt;/li&gt;
&lt;li&gt;Web Speech API integration (&lt;code&gt;SpeechRecognition&lt;/code&gt; &amp;amp; &lt;code&gt;speechSynthesis&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;LocalStorage persistence and offline agricultural fallback&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  How I Built It
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;AI Model Pipeline&lt;/strong&gt;:&lt;br&gt;
Integrated Google Gemini through a resilient multi-model client-side architecture. To guarantee 100% uptime even during traffic spikes or network latency, the app implements automated fallback across &lt;code&gt;gemini-3.1-flash-lite&lt;/code&gt;, &lt;code&gt;gemini-3.5-flash-lite&lt;/code&gt;, and &lt;code&gt;gemini-flash-lite-latest&lt;/code&gt;, backed by an offline rule-based agricultural advisory system.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Weather &amp;amp; Geocoding&lt;/strong&gt;:&lt;br&gt;
Integrated the Open-Meteo API (free, open, no API key required) to fetch live temperature, wind speed, precipitation probability, and humidity for any Indian city or district, converting raw weather telemetry into actionable agricultural decisions.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Accessibility-First Voice Interface&lt;/strong&gt;:&lt;br&gt;
Many smallholder farmers are uncomfortable typing on small smartphone keyboards. Built-in Web Speech API enables native Hindi and Indian-English speech-to-text and text-to-speech audio playback directly inside the browser.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Agent-Assisted Development&lt;/strong&gt;:&lt;br&gt;
Built and iterated pair programming with Google DeepMind's Antigravity AI coding assistant, diagnosing model availability, implementing responsive CSS, and testing local HTTP server prototypes.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  Why Does Open Innovation Matter?
&lt;/h2&gt;

&lt;p&gt;Over 80% of Indian farmers operate on small landholdings (&amp;lt; 2 hectares) with limited disposable income and spotty 2G/3G connectivity. Proprietary "AgTech" solutions often lock vital crop recommendations behind expensive paywalls, require high-end smartphones, or trap data in proprietary silos.&lt;/p&gt;

&lt;p&gt;Open innovation matters because:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Zero Barrier to Entry&lt;/strong&gt;: By using open web standards and open APIs, any farmer can open a URL on a budget smartphone without paying app store commissions or installing bloated 100MB apps.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Transparent Science&lt;/strong&gt;: Agricultural rules (like water intervals and pesticide rotations) should be transparent and verifiable against public agricultural research (ICAR, agricultural universities), not proprietary black boxes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Privacy of Financial Deeds&lt;/strong&gt;: Farmers' private credit, loans, and local deed agreements remain stored locally in their device's browser (&lt;code&gt;localStorage&lt;/code&gt;), preventing commercial monetization of vulnerable farmers' financial distress.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  My Agent Session
&lt;/h2&gt;

&lt;p&gt;This project was built and debugged interactively using the &lt;strong&gt;Antigravity AI Agent&lt;/strong&gt; workspace. The agent assisted in diagnosing Gemini model API compatibility, architecting multi-model fallbacks, structuring the bahi-khata deed ledger, and deploying a background HTTP test server on localhost.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Lazy Payoff
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;5+ Hours Saved Weekly&lt;/strong&gt;: No more tracking down multiple grain traders or traveling miles to the mandi just to check daily rates—rates and AI trend predictions are available on the home screen.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Zero Forgotten Irrigations&lt;/strong&gt;: Prevents costly crop damage (e.g., missing the critical 21-day CRI watering in wheat causes up to 30% yield loss).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Stress-Free Debt Tracking&lt;/strong&gt;: Instead of awkward phone calls or lost paper slips, farmers generate clear, polite WhatsApp payment reminders with one tap.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pesticide Savings&lt;/strong&gt;: Prevents spraying right before heavy rainfall, saving ₹1,500–₹3,000 per acre in wasted chemicals.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Github repo - &lt;strong&gt;&lt;a href="https://github.com/deepmanna2007/KisanMitra" rel="noopener noreferrer"&gt;https://github.com/deepmanna2007/KisanMitra&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Prize Categories
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Main Track&lt;/strong&gt;: Open-Source AI Challenge Week 3: Slow and Steady&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AI for Good / Social Impact&lt;/strong&gt;: Empowering smallholder agricultural communities with accessible, voice-enabled AI and open financial ledger tools.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>devchallenge</category>
      <category>hf26challenge</category>
    </item>
    <item>
      <title>KiranaSetu - Smart Retail POS, Zero-Error Invoicing, Advance Store Pickup &amp; Neighborhood Delivery for Indian Kirana Stores</title>
      <dc:creator>Deep Manna</dc:creator>
      <pubDate>Fri, 16 Oct 2026 05:49:57 +0000</pubDate>
      <link>https://dev.to/deep_manna_675479a195902a/kiranasetu-smart-retail-pos-zero-error-invoicing-advance-store-pickup-neighborhood-delivery-2pc2</link>
      <guid>https://dev.to/deep_manna_675479a195902a/kiranasetu-smart-retail-pos-zero-error-invoicing-advance-store-pickup-neighborhood-delivery-2pc2</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/hacktoberfest-week2-2026-10-12"&gt;Hacktoberfest Open-Source AI Challenge Week 2: Side Hustle&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;




&lt;h1&gt;
  
  
  🛍️ KiranaSetu Pro (किराना सेतु)
&lt;/h1&gt;

&lt;h3&gt;
  
  
  Smart Retail POS, Zero-Error Invoicing, Advance Store Pickup &amp;amp; Neighborhood Delivery for Indian Kirana Stores
&lt;/h3&gt;




&lt;h2&gt;
  
  
  💡 What I Built
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;KiranaSetu Pro (किराना सेतु)&lt;/strong&gt; is an offline-resilient, open-source AI-engineered retail management platform built specifically for India's 13+ million neighborhood Kirana (mom-and-pop grocery) stores.&lt;/p&gt;

&lt;h3&gt;
  
  
  Who Would Pay For It?
&lt;/h3&gt;

&lt;p&gt;Local Kirana merchants, provision store owners, and small retailers. In India, small grocery merchants run high-volume, low-margin businesses and are caught in a painful dilemma:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Paper Khata &amp;amp; Hand-written Slips:&lt;/strong&gt; Error-prone, painfully slow during peak evening rush hours, resulting in incorrect pricing, lost bills, and frequent out-of-stock customer disappointment.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Closed Proprietary SaaS Apps:&lt;/strong&gt; Require expensive recurring monthly subscriptions, take cuts on transactions, lock customer data into proprietary cloud silos, and stop functioning the moment internet connectivity drops in crowded bazaar alleys.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A Kirana owner will eagerly pay &lt;strong&gt;₹299 – ₹499/month ($3.50 – $6 USD)&lt;/strong&gt; or a one-time setup fee of &lt;strong&gt;₹1,999 ($24 USD)&lt;/strong&gt; for a fast, reliable, privacy-first system that saves hours of counter chaos, eliminates inventory guessing, recovers unpaid credit balances, and brings modern "Blinkit/Zepto-style" advance order pickup to their local shop.&lt;/p&gt;

&lt;h3&gt;
  
  
  What Problems Does It Solve?
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;"Is this item in stock?" — Solved by Live Stock Availability Radars:&lt;/strong&gt;
Shopkeepers no longer need to leave the counter or shout to store helpers to check back shelves. Every item displays a live stock pill (&lt;code&gt;✓ In Stock&lt;/code&gt;, &lt;code&gt;⚠️ Only 3 Left - Low Stock&lt;/code&gt;, or &lt;code&gt;✕ Out of Stock&lt;/code&gt;). Out-of-stock items are disabled to prevent over-billing.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;"Manual billing takes too much time and math errors happen:"&lt;/strong&gt;
The 1-click POS billing counter locks items to standard selling prices, automatically calculates multi-tier Indian GST (0%, 5%, 12%, 18% CGST/SGST), computes customer savings against MRP, and handles standard Indian retail Rupee round-off.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;"Is the UPI payment received?" — Instant Dynamic UPI QR &amp;amp; Payment Soundbox:&lt;/strong&gt;
Generates on-the-fly standard Indian UPI deep-link QR codes (&lt;code&gt;upi://pay?pa=...&amp;amp;pn=...&amp;amp;am=...&amp;amp;cu=INR&amp;amp;tn=...&lt;/code&gt;) scannable by Google Pay, PhonePe, Paytm, and BHIM. It features an integrated Web Audio API soundbox synthesizer that plays the iconic chime and Hindi voice prompt alert: &lt;em&gt;"₹285 UPI se prapt hue!"&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Counter Crowding &amp;amp; Long Queues — Advance Store Pickup ("Click &amp;amp; Collect"):&lt;/strong&gt;
Customers can open the &lt;strong&gt;Customer Pre-Order App&lt;/strong&gt;, browse live catalog items, pick their desired pickup time slot (e.g., &lt;em&gt;Ready in 15 mins (Urgent)&lt;/em&gt;, &lt;em&gt;Evening 6:00 PM&lt;/em&gt;), and receive an instant &lt;strong&gt;Token Number&lt;/strong&gt; (e.g., &lt;code&gt;TOKEN #104&lt;/code&gt;). The shopkeeper gets an interactive packing checklist to pack and bag items ahead of time. When the customer arrives, they show their token, pick up the bag, and leave in &lt;strong&gt;10 seconds&lt;/strong&gt;!&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Doorstep Home Delivery Hub:&lt;/strong&gt;
Manages address, nearby landmark, delivery slot, automated delivery fee thresholds (Free above ₹499 or ₹30 delivery fee), and WhatsApp dispatch tracking.&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Customer Khata (Udhar / Credit Book):&lt;/strong&gt;&lt;br&gt;
Digital neighborhood ledger to track customer credit balances, record payments (&lt;em&gt;Jama&lt;/em&gt;), and send &lt;strong&gt;AI-crafted WhatsApp payment reminders&lt;/strong&gt; — Gemini generates 3 tones (Polite/Adarsh, Friendly/Padosi, Professional) in Hindi/Hinglish.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;✨ AI Smart Parchi (Google Gemini Flash):&lt;/strong&gt;&lt;br&gt;
Customer hands or WhatsApps a messy list (e.g., &lt;em&gt;"2 aashirvaad atta, adha kilo makhan, ek fortune tel, 2 maggi"&lt;/em&gt;). Shopkeeper pastes it into the AI Parchi modal. Gemini resolves colloquial brand names, ambiguous units ("adha kilo" = 0.5 kg / N packs based on SKU size), and live stock status, then returns a matched catalog JSON. 1-click adds all in-stock items straight to the POS cart.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  🎥 Demo
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Live Local Endpoint:&lt;/strong&gt; &lt;code&gt;http://localhost:5173/&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dual Role Switching:&lt;/strong&gt; Seamless toggle between &lt;strong&gt;🏪 Shopkeeper POS Counter&lt;/strong&gt; and &lt;strong&gt;📱 Customer Pre-Order App&lt;/strong&gt; directly from the top navigation bar.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Printable Invoices:&lt;/strong&gt; Generates clean 80mm thermal POS receipts or A4 GST Tax Invoices, and features 1-click formatted bill sharing via WhatsApp Web / Mobile.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;+-----------------------------------------------------------------------------------+
|  🛍️ KiranaSetu Pro | [🏪 Shopkeeper Counter] [📱 Customer Pre-Order App] | 🔊 Sound |
+-----------------------------------------------------------------------------------+
| [⚡ POS Billing]  [📦 Order Hub (3)]  [📋 Inventory (2 Low)]  [📒 Khata]  [📊 Sales] |
+-----------------------------------------------------------------------------------+
|  🔍 Search: "Atta" / "आटा" / Barcode           |  🧾 CURRENT BILL (#INV-1024)      |
|  🌾 Aashirvaad Chakki Atta 5kg   ₹215 [In Stock]|  1x Aashirvaad Atta 5kg    ₹215.00|
|  🌻 Fortune Sunflower Oil 1L     ₹148 [In Stock]|  2x Tata Salt 1kg           ₹52.00|
|  🧂 Tata Salt Iodised 1kg        ₹26  [In Stock]|  1x Amul Butter 100g        ₹58.00|
|  🧈 Amul Butter 100g             ₹58  [⚠️ Low]  |-----------------------------------|
|  🥨 Haldiram Bhujia 400g         ₹98  [✕ Out]   |  Subtotal:                 ₹325.00|
|                                                 |  GST (CGST+SGST):            ₹6.96|
|                                                 |  Grand Total:              ₹325.00|
|                                                 |  [📲 Generate Dynamic UPI QR Code]|
+-----------------------------------------------------------------------------------+
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  💻 Code
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;👉 GitHub Repository: &lt;a href="https://github.com/deepmanna2007/KiranaSetu" rel="noopener noreferrer"&gt;https://github.com/deepmanna2007/KiranaSetu&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The project is structured with modern, lightweight, modular JavaScript and custom CSS:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;├── README.md                  # Comprehensive project documentation
├── SUBMISSION.md              # Official DEV challenge submission entry
├── .env.example               # Environment variable reference (no secrets)
├── index.html                 # SEO optimized HTML5 entry shell
├── package.json               # Vite + qrcode + canvas-confetti
└── src/
    ├── main.js                # App coordinator, role switcher &amp;amp; theme controller
    ├── ai.js                  # Gemini Flash AI engine (Smart Parchi + Khata Reminder)
    ├── pos.js                 # Lightning billing POS, cart math, UPI QR &amp;amp; invoices
    ├── customerPortal.js      # Customer pre-order store, slot picker &amp;amp; live tracking
    ├── bookings.js            # Fulfillment hub for advance pickups &amp;amp; home delivery
    ├── inventory.js           # Real-time stock radar, batch adjusters &amp;amp; mandi reorder
    ├── khata.js               # Customer Udhar ledger &amp;amp; AI WhatsApp payment reminder
    ├── analytics.js           # Revenue metrics, payment split &amp;amp; store GST/AI settings
    ├── db.js                  # Persistent store seeded with authentic Indian FMCG items
    ├── sound.js               # Web Audio API barcode beeps &amp;amp; Hindi UPI soundbox chimes
    └── style.css              # Custom responsive CSS design system + AI modal styles
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Key Technical Implementations
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Standard Indian UPI Deep-Link QR Generation:&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;   &lt;span class="c1"&gt;// Encodes standard National Payments Corporation of India (NPCI) UPI specification&lt;/span&gt;
   &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;upiUrl&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;`upi://pay?pa=&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nf"&gt;encodeURIComponent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;settings&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;upiId&lt;/span&gt;&lt;span class="p"&gt;)}&lt;/span&gt;&lt;span class="s2"&gt;&amp;amp;pn=&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nf"&gt;encodeURIComponent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;settings&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;storeName&lt;/span&gt;&lt;span class="p"&gt;)}&lt;/span&gt;&lt;span class="s2"&gt;&amp;amp;am=&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;totals&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;finalTotal&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toFixed&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;)}&lt;/span&gt;&lt;span class="s2"&gt;&amp;amp;cu=INR&amp;amp;tn=&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nf"&gt;encodeURIComponent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Bill &lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;invoiceId&lt;/span&gt;&lt;span class="p"&gt;)}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
   &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;QRCode&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toCanvas&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;canvas&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;upiUrl&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;220&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;margin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Zero-Dependency Web Audio API Soundbox Synthesizer:&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;   &lt;span class="c1"&gt;// Generates ascending chord chimes and triggers browser speech synthesis for Hindi audio alert&lt;/span&gt;
   &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;notes&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mf"&gt;523.25&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;659.25&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;783.99&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;1046.50&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt; &lt;span class="c1"&gt;// C5, E5, G5, C6&lt;/span&gt;
   &lt;span class="nx"&gt;notes&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;forEach&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;freq&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;idx&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
     &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;osc&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;ctx&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;createOscillator&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
     &lt;span class="nx"&gt;osc&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;frequency&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setValueAtTime&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;freq&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;now&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;idx&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mf"&gt;0.12&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
     &lt;span class="nx"&gt;osc&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;start&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;now&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;idx&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mf"&gt;0.12&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
     &lt;span class="nx"&gt;osc&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;stop&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;now&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;idx&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mf"&gt;0.12&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mf"&gt;0.3&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
   &lt;span class="p"&gt;});&lt;/span&gt;
   &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;utterance&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;SpeechSynthesisUtterance&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`₹&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;amount&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; UPI se prapt hue.`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
   &lt;span class="nx"&gt;utterance&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;lang&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;hi-IN&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
   &lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;speechSynthesis&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;speak&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;utterance&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  🧠 How I Built It
&lt;/h2&gt;

&lt;h3&gt;
  
  
  The Open-Source AI Architecture
&lt;/h3&gt;

&lt;p&gt;This application was architected and built using &lt;strong&gt;Antigravity&lt;/strong&gt; — an autonomous agentic pair-programming coding system powered by advanced reasoning models.&lt;/p&gt;

&lt;p&gt;Instead of writing generic boilerplate, the agentic workflow was steered around the nuanced realities of Indian street-level commerce:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Domain-Specific Kirana Taxonomy:&lt;/strong&gt; Seeding realistic FMCG products with English + Devanagari Hindi naming, authentic HSN codes, and variable measurement units (&lt;code&gt;5kg pkt&lt;/code&gt;, &lt;code&gt;1L pouch&lt;/code&gt;, &lt;code&gt;100g pack&lt;/code&gt;, &lt;code&gt;kg loose&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Resilient Offline Architecture:&lt;/strong&gt; Engineering the entire persistence layer on &lt;code&gt;localStorage&lt;/code&gt; / &lt;code&gt;IndexedDB&lt;/code&gt;, decoupling it from any third-party cloud backend.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hardware-Independent Audio Synthesis:&lt;/strong&gt; Generating barcode scanner beeps and multi-frequency UPI soundbox audio alerts directly in-browser using the Web Audio API without needing external MP3 hosting.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Bilingual Filtering &amp;amp; Barcode Scanner Simulation:&lt;/strong&gt; Implementing real-time search that parses English queries (e.g., &lt;em&gt;Atta, Oil, Sugar&lt;/em&gt;) and Devanagari queries (e.g., &lt;em&gt;आटा, तेल, नमक&lt;/em&gt;) simultaneously.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  ✨ Gemini AI Integration (Two Distinct Use Cases)
&lt;/h3&gt;

&lt;p&gt;The Gemini Flash API (&lt;code&gt;gemini-flash-latest&lt;/code&gt;) is used at two specific, high-value pain points — not as a cosmetic chatbot overlay:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Use Case 1: AI Smart Parchi — Grocery List Parser&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Problem: Customers give shopkeepers messy, colloquial grocery lists (WhatsApp messages, handwritten chits). Reading and manually locating each item wastes 3-7 minutes per customer during rush hours.&lt;/p&gt;

&lt;p&gt;Solution: Gemini parses the raw list, maps colloquial terms to catalog items, resolves Indian quantity shorthand ("adha kilo", "1 pkt", "ek botal"), verifies live stock, and returns a structured JSON bill:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// src/ai.js - parseGroceryParchi()&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;prompt&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;`You are an Indian Kirana Store AI Assistant.
Available Store Catalog: &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;stringify&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;catalogSnippet&lt;/span&gt;&lt;span class="p"&gt;)}&lt;/span&gt;&lt;span class="s2"&gt;
Parse: "&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;rawParchiText&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;"
Return strict JSON: { summary, matchedItems: [{catalogId, qty, inStock, price, confidence}], unmatchedItems }`&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;GEMINI_API_URL&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;?key=&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;apiKey&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;method&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;POST&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;body&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;stringify&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;contents&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[{&lt;/span&gt; &lt;span class="na"&gt;parts&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[{&lt;/span&gt; &lt;span class="na"&gt;text&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;prompt&lt;/span&gt; &lt;span class="p"&gt;}]&lt;/span&gt; &lt;span class="p"&gt;}],&lt;/span&gt;
    &lt;span class="na"&gt;generationConfig&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;temperature&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;0.1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;responseMimeType&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;application/json&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;})&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="c1"&gt;// Result auto-populates POS cart with 1 click&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Use Case 2: AI Khata Reminder — Culturally Aware Payment Nudge&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Problem: Shopkeepers often have awkward relationships with credit customers (neighbors, elders, relatives). Generic reminders feel rude. AI generates 3 tones tailored to the Indian social context:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// src/ai.js - generateKhataReminder()&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;prompt&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;`Generate 3 WhatsApp payment reminders in Hindi/Hinglish:
Customer: &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;customerName&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;, Due: ₹&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;amount&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;, Store: &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;storeName&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;, UPI: &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;upiId&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;
Option 1: Very respectful (for elders/Sharma ji/Uncle ji)
Option 2: Warm &amp;amp; friendly (padosi/regular customer)
Option 3: Clear &amp;amp; professional with UPI hint
Return JSON array: [{title, message}]`&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Gemini returns culturally appropriate messages the shopkeeper picks from, then sends directly via WhatsApp Web with a single tap.&lt;/p&gt;




&lt;h2&gt;
  
  
  🌍 Why Does Open Innovation Matter?
&lt;/h2&gt;

&lt;p&gt;Open innovation is not just a philosophical preference for this project — it is the &lt;strong&gt;fundamental reason why KiranaSetu Pro can succeed where venture-backed corporate retail SaaS fails&lt;/strong&gt;:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Zero Internet Dependency (Offline Resilience):&lt;/strong&gt;
In Indian tier-2 and tier-3 towns, mobile networks and broadband frequently throttle or blackout during peak afternoon and monsoon storms. Closed API products that require cloud pinging for every barcode scan freeze the shop counter. Open-source local-first web architecture ensures billing never stops.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Preserving Fragile Micro-Business Margins:&lt;/strong&gt;
Kirana stores operate on slim 5% to 15% margins. Closed commercial SaaS platforms charge recurring monthly USD fees or take 1.5%–2% cuts on transactions, which directly erodes the merchant's livelihood. Open-source software eliminates parasitic vendor lock-in.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Data Sovereignty &amp;amp; Khata Privacy:&lt;/strong&gt;
A Kirana store's Khata (credit book) contains confidential relationships, phone numbers, and debt records of local neighborhood families. Shopkeepers are rightly reluctant to surrender this proprietary customer data to big-tech conglomerates who could use it to launch competing dark stores. Open local storage keeps their data strictly under their own control.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hyper-Localized Adaptability:&lt;/strong&gt;
Every Indian state has unique commodities, vernacular terms, and local wholesale packaging standards. Open code allows any developer or merchant to add local languages (Tamil, Marathi, Bengali), adjust state GST rules, or integrate local delivery fleets without asking permission.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  🤖 My Agent Session
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Session Context:&lt;/strong&gt; Built collaboratively in Antigravity IDE with automated task planning, Vite scaffolding, local data store design, Web Audio API synthesis, POS UX modeling, and iterative build verification (&lt;code&gt;npm run build&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Session Transcript:&lt;/strong&gt; Saved locally in Antigravity Brain logs (&lt;code&gt;45a837e7-2a3f-4950-b521-132a24cafef4&lt;/code&gt;).&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  👥 My First User
&lt;/h2&gt;

&lt;h3&gt;
  
  
  The Pilot Test: Rameshwar Sharma (&lt;em&gt;Shree Ganesh Kirana &amp;amp; General Store&lt;/em&gt;)
&lt;/h3&gt;

&lt;p&gt;I shared this prototype with Rameshwar ji, who has operated a neighborhood Kirana store in an urban colony for 18 years.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What He Said:&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"Shaam ke time (6 PM to 8 PM) itni bheed hoti hai ki main akele sab sambhal nahi pata. Aadhe log poochte hain 'bhaiya atta bacha hai kya?', aur mujhe andar godam mein dekhne jana padta hai. Bahut baar jaldi baazi mein purani rate likh deta hoon ya hisaab galat ho jata hai.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;KiranaSetu mein screen par seedha green 'In Stock' ya red 'Out of Stock' dikhta hai. Aur Advance Booking wala feature kamaal hai — colony ke jo log metro se laut rahe hote hain, wo pehle hi order daal dete hain. Main pehle se thaili pack karke rakh deta hoon, wo aate hain, token dikhate hain, UPI scan karte hain, aur 10 second mein le jaate hain! Line lagne ki jhanjhat hi khatam!"&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Did He Pay / Would He Pay?&lt;/strong&gt;&lt;br&gt;
Rameshwar ji offered to pay &lt;strong&gt;₹350 per month&lt;/strong&gt; immediately just for two features:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The &lt;strong&gt;WhatsApp Khata Payment Reminder&lt;/strong&gt; (which helps him recover ₹15,000+ in monthly credit balances without awkward personal calls).&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;Advance Pickup Bagging Queue&lt;/strong&gt;, which lets him handle 30% more customers during rush hour without hiring extra shop boys.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;What He Asked For Next:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Direct phone camera barcode scanning so his shop helper can scan cartons using a smartphone camera.&lt;/li&gt;
&lt;li&gt;1-click wholesale reorder button sent directly to his mandi supplier on WhatsApp (which we added in the &lt;strong&gt;Inventory &amp;amp; Stock Radar&lt;/strong&gt; tab!).&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🏆 Prize Categories
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Primary Track:&lt;/strong&gt; Hacktoberfest Open-Source AI Challenge Week 2: Side Hustle&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Best Use of Render:&lt;/strong&gt; Can be deployed with zero-configuration as a static web service or containerized Node runtime on Render.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Best Use of DigitalOcean:&lt;/strong&gt; Deployable on DigitalOcean App Platform / Droplet with local data persistence.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;Built with ❤️ for Indian Kirana Merchants during Hacktoberfest 2026.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>hf26challenge</category>
    </item>
    <item>
      <title>MandiMitra — Live Mandi Price Intelligence for Farmers</title>
      <dc:creator>Deep Manna</dc:creator>
      <pubDate>Sat, 10 Oct 2026 07:15:47 +0000</pubDate>
      <link>https://dev.to/deep_manna_675479a195902a/mandimitra-live-mandi-price-intelligence-for-farmers-36i5</link>
      <guid>https://dev.to/deep_manna_675479a195902a/mandimitra-live-mandi-price-intelligence-for-farmers-36i5</guid>
      <description>&lt;h1&gt;
  
  
  MandiMitra — Live Mandi Price Intelligence for Farmers 🌾
&lt;/h1&gt;

&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/hacktoberfest-week1-2026-10-05"&gt;Hacktoberfest Open-Source AI Challenge Week 1: Touch Grass&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;MandiMitra&lt;/strong&gt; ("Mandi Friend" in Hindi/Bengali) is a mobile-first agricultural market intelligence platform built specifically for Indian farmers.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Tagline: "Know the Price. Choose the Market. Earn Better."&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  The Real Problem It Solves
&lt;/h3&gt;

&lt;p&gt;Every day, millions of small-scale farmers in India load their produce onto a cart, spend money on transport, and travel to the nearest mandi (agricultural market) — often not knowing that a market 20 km away is offering ₹300–₹500 more per quintal for the same crop. That difference can mean ₹30,000–₹50,000 more income per harvest.&lt;/p&gt;

&lt;p&gt;MandiMitra gets farmers &lt;strong&gt;off the screen and into the right market&lt;/strong&gt; by answering one simple question before they leave home:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"Which mandi near me is paying the best price for my potato today — and is it worth the trip?"&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Who It's For
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Small and marginal farmers&lt;/strong&gt; in rural India with basic smartphone access&lt;/li&gt;
&lt;li&gt;Primary focus: &lt;strong&gt;West Bengal&lt;/strong&gt; (potato, rice, jute, onion, tomato, brinjal)&lt;/li&gt;
&lt;li&gt;Designed for users with limited technical literacy — everything is in plain language, with Hindi and Bengali support&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  How It Gets People "Off the Screen"
&lt;/h3&gt;

&lt;p&gt;The entire UX is built around a single &lt;strong&gt;actionable decision&lt;/strong&gt; — not data dashboards, not endless charts. A farmer opens the app for 60 seconds, sees &lt;strong&gt;"Go to Bankura Mandi — earn ₹34,000 more today"&lt;/strong&gt;, and heads out the door. The platform is a &lt;strong&gt;decision tool&lt;/strong&gt;, not a content platform. It pushes people into the physical world.&lt;/p&gt;

&lt;h3&gt;
  
  
  Key Features
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Feature&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;🏷️ &lt;strong&gt;Live Market Prices&lt;/strong&gt;
&lt;/td&gt;
&lt;td&gt;Today's modal/min/max prices across 8+ West Bengal mandis&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;📊 &lt;strong&gt;Market Comparison&lt;/strong&gt;
&lt;/td&gt;
&lt;td&gt;Side-by-side price table across all markets for any crop&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;🧮 &lt;strong&gt;Best Market Calculator&lt;/strong&gt;
&lt;/td&gt;
&lt;td&gt;Profit/loss calc that factors in transport cost, distance, and freight&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;🗺️ &lt;strong&gt;Nearby Markets Map&lt;/strong&gt;
&lt;/td&gt;
&lt;td&gt;OpenStreetMap-powered interactive map of mandis with GPS detection&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;📈 &lt;strong&gt;Price Trends&lt;/strong&gt;
&lt;/td&gt;
&lt;td&gt;7-day historical trend charts powered by Recharts&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;🔔 &lt;strong&gt;Price Alerts&lt;/strong&gt;
&lt;/td&gt;
&lt;td&gt;Set a target price; get notified when the market hits it&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;🤖 &lt;strong&gt;MandiMitra AI Saathi&lt;/strong&gt;
&lt;/td&gt;
&lt;td&gt;Gemini-powered agricultural advisor with voice input in Hindi or Bengali&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;🛡️ &lt;strong&gt;Admin Dashboard&lt;/strong&gt;
&lt;/td&gt;
&lt;td&gt;Admins can post price updates and manage mandi data&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;🌐 &lt;strong&gt;Multilingual&lt;/strong&gt;
&lt;/td&gt;
&lt;td&gt;English, हिंदी, বাংলা UI via i18n translations system&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Local Development:&lt;/strong&gt;&lt;/p&gt;


&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/deepmanna2007/Mandimitra.git
&lt;span class="nb"&gt;cd &lt;/span&gt;Mandimitra
npm &lt;span class="nb"&gt;install
&lt;/span&gt;npm run dev
&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;App runs at &lt;strong&gt;&lt;a href="http://localhost:3000" rel="noopener noreferrer"&gt;http://localhost:3000&lt;/a&gt;&lt;/strong&gt; | API at &lt;strong&gt;&lt;a href="http://localhost:5000" rel="noopener noreferrer"&gt;http://localhost:5000&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Walkthrough
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Farmer Dashboard&lt;/strong&gt; — Clean, distraction-free entry point showing crop cards, today's highlights, and the "Best Market For Me" feature card.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Best Market Calculator&lt;/strong&gt; — Enter your crop, quantity (in quintals), and your location. MandiMitra calculates:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Transport cost using calibrated per-km freight rates (₹8,000 base + ₹30/km)&lt;/li&gt;
&lt;li&gt;Net profit/loss of travelling to each market vs. selling locally&lt;/li&gt;
&lt;li&gt;Presents a clear winner: &lt;em&gt;"Go to Bankura Mandi — extra profit ₹34,200"&lt;/em&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;MandiMitra AI Saathi&lt;/strong&gt; — Voice-enabled Gemini AI chat that understands:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;"आलू का भाव क्या है आज?"&lt;/em&gt; (What's the potato price today?)&lt;/li&gt;
&lt;li&gt;&lt;em&gt;"My tomato harvest is 20 quintals. Which market should I go to?"&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;"সার কতটা দেব এই মাটিতে?"&lt;/em&gt; (How much fertilizer for this soil?)&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Code
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;GitHub Repository:&lt;/strong&gt; &lt;a href="https://github.com/deepmanna2007/Mandimitra" rel="noopener noreferrer"&gt;https://github.com/deepmanna2007/Mandimitra&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Project Structure
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Mandimitra/
├── server/
│   ├── server.js                    # Express REST API (12+ endpoints)
│   └── services/
│       ├── database.js              # JSON-store with seed mandi data (West Bengal)
│       ├── marketPriceService.js    # Haversine distance + profit calculator engine
│       └── geminiService.js         # Gemini AI integration (advisor + voice parsing)
│
└── client/
    └── src/
        ├── context/MandiContext.tsx # Central state + API layer (React Context)
        ├── i18n/translations.ts    # EN / HI / BN string translations
        ├── pages/
        │   ├── LandingPage.tsx
        │   ├── FarmerDashboard.tsx
        │   ├── MarketPricesPage.tsx
        │   ├── CompareMarketsPage.tsx
        │   ├── BestMarketCalculatorPage.tsx
        │   ├── NearbyMarketsMapPage.tsx
        │   ├── PriceTrendsPage.tsx
        │   ├── PriceAlertsPage.tsx
        │   ├── AiSaathiPage.tsx
        │   └── AdminDashboardPage.tsx
        └── components/
            ├── Navbar.tsx / MobileNav.tsx
            ├── LocationModal.tsx
            ├── AuthModal.tsx
            └── ToastContainer.tsx
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Core Tech Stack
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Layer&lt;/th&gt;
&lt;th&gt;Technology&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Frontend&lt;/td&gt;
&lt;td&gt;React 18 + TypeScript, Vite 8&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Styling&lt;/td&gt;
&lt;td&gt;Vanilla CSS with a custom agricultural design system&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Charts&lt;/td&gt;
&lt;td&gt;Recharts&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Maps&lt;/td&gt;
&lt;td&gt;Leaflet.js + OpenStreetMap (fully open-source)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Backend&lt;/td&gt;
&lt;td&gt;Node.js + Express 5&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;AI&lt;/td&gt;
&lt;td&gt;Google Gemini API (&lt;code&gt;gemini-3.5-flash-lite&lt;/code&gt;)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Data&lt;/td&gt;
&lt;td&gt;JSON flat-file store (Agmarknet-ready adapter pattern)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Icons&lt;/td&gt;
&lt;td&gt;Lucide React&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  How I Built It
&lt;/h2&gt;

&lt;h3&gt;
  
  
  The AI Layer — Gemini as a "Farmer's Advisor"
&lt;/h3&gt;

&lt;p&gt;The heart of MandiMitra's AI feature is the &lt;strong&gt;"AI Saathi"&lt;/strong&gt; (AI companion). It's built on &lt;strong&gt;Google Gemini&lt;/strong&gt; (&lt;code&gt;gemini-3.5-flash-lite&lt;/code&gt; / &lt;code&gt;gemini-3.8-flash&lt;/code&gt; with automatic fallback) via the Generative Language REST API.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// server/services/geminiService.js (simplified)&lt;/span&gt;
&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="nf"&gt;callGemini&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;prompt&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;systemInstruction&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;for &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;model&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;gemini-3.5-flash-lite&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;gemini-3.8-flash&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
      &lt;span class="s2"&gt;`https://generativelanguage.googleapis.com/v1beta/models/&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;model&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;:generateContent?key=&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;apiKey&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;method&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;POST&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;body&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;stringify&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;contents&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[{&lt;/span&gt; &lt;span class="na"&gt;role&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;user&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;parts&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[{&lt;/span&gt; &lt;span class="na"&gt;text&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;prompt&lt;/span&gt; &lt;span class="p"&gt;}]&lt;/span&gt; &lt;span class="p"&gt;}]&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;ok&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The system instruction is carefully crafted to keep the AI grounded in agricultural context — it knows about the mandis in the database, refuses to give financial advice beyond its data, and speaks in the farmer's preferred language.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Voice Input&lt;/strong&gt; is handled by the Web Speech API (&lt;code&gt;SpeechRecognition&lt;/code&gt;). Voice queries are transcribed and sent to Gemini for intent parsing — extracting structured fields like &lt;code&gt;cropName&lt;/code&gt;, &lt;code&gt;quantity&lt;/code&gt;, and &lt;code&gt;marketName&lt;/code&gt; from spoken Hindi/Bengali sentences.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Distance-Profit Engine
&lt;/h3&gt;

&lt;p&gt;The "Best Market Calculator" uses the &lt;strong&gt;Haversine formula&lt;/strong&gt; to compute real great-circle distances between a farmer's GPS location and every mandi:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Calibrated freight cost model&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;transportCost&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;round&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;8000&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;distanceKm&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;30&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;netProfit&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;pricePerQ&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="nx"&gt;basePrice&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;quantity&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="nx"&gt;transportCost&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This gives farmers a concrete rupee figure for "is the trip worth it?" — not just a price comparison.&lt;/p&gt;

&lt;h3&gt;
  
  
  Architecture Decision: Open Adapter Pattern
&lt;/h3&gt;

&lt;p&gt;The &lt;code&gt;marketPriceService.js&lt;/code&gt; is built with a &lt;strong&gt;pluggable adapter&lt;/strong&gt; pattern. In &lt;code&gt;demo&lt;/code&gt; mode it serves realistic West Bengal benchmark prices. When switched to &lt;code&gt;live&lt;/code&gt; mode, it's ready to consume the &lt;strong&gt;Agmarknet / Data.gov.in government open data API&lt;/strong&gt; — no code changes needed, just a config flag:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// database.js — toggle this one field&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;mode&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;demo&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;   &lt;span class="c1"&gt;// ← current state (benchmark data)&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;mode&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;live&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;   &lt;span class="c1"&gt;// ← production with real Agmarknet feeds&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Why Does Open Innovation Matter?
&lt;/h2&gt;

&lt;p&gt;MandiMitra could not exist without open-source and open-data infrastructure. Here's what it depends on — and why closed alternatives wouldn't work:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. OpenStreetMap + Leaflet.js — The Mandi Map
&lt;/h3&gt;

&lt;p&gt;Google Maps API costs money at scale and has proprietary terms. The farmer-facing mandi map uses &lt;strong&gt;Leaflet.js&lt;/strong&gt; (open-source) + &lt;strong&gt;OpenStreetMap tiles&lt;/strong&gt; (community-maintained, free forever). This means a farmer in rural West Bengal can view a map of nearby mandis with &lt;strong&gt;zero API cost&lt;/strong&gt; to the operator — making the tool sustainable without VC funding.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Agmarknet / Data.gov.in — The Real Price Data
&lt;/h3&gt;

&lt;p&gt;India's &lt;strong&gt;National Informatics Centre&lt;/strong&gt; and &lt;strong&gt;Directorate of Marketing &amp;amp; Inspection&lt;/strong&gt; publish agricultural market prices as open data under the &lt;strong&gt;Government Open Data License (GODL)&lt;/strong&gt;. MandiMitra is built around this open data layer. A closed API (like a private price aggregator) would charge per-query fees that make a free farmer tool economically impossible.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Open-Weight AI Philosophy
&lt;/h3&gt;

&lt;p&gt;The &lt;code&gt;geminiService.js&lt;/code&gt; is abstracted behind a single &lt;code&gt;getAdvice(prompt)&lt;/code&gt; call specifically to enable a future swap to a &lt;strong&gt;locally-run open-weight model&lt;/strong&gt; (Llama, Mistral via Ollama) — critical for rural users who may distrust cloud AI with their farm data. Open-source AI makes data sovereignty possible.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Open-Source Makes It Auditable
&lt;/h3&gt;

&lt;p&gt;When an AI tells a farmer &lt;em&gt;"sell at Bankura Mandi"&lt;/em&gt;, that farmer needs to &lt;strong&gt;trust&lt;/strong&gt; the recommendation. Open-source code means any agricultural NGO, journalist, or government official can audit exactly how the recommendation was generated. A black-box closed SaaS simply cannot offer that trust to a vulnerable population.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Open innovation didn't just make this &lt;em&gt;easier&lt;/em&gt; to build — it made it &lt;em&gt;possible&lt;/em&gt; to build responsibly, affordably, and sustainably for the farmers who need it most.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  My Agent Session
&lt;/h2&gt;

&lt;p&gt;Built end-to-end using &lt;strong&gt;Google Antigravity (AGY)&lt;/strong&gt; — an AI coding agent — in a single extended pair-programming session. The agent:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Designed the entire system architecture from the brief&lt;/li&gt;
&lt;li&gt;Scaffolded the Express backend, React/TypeScript frontend, and all service layers&lt;/li&gt;
&lt;li&gt;Implemented the Haversine distance engine and profit calculator&lt;/li&gt;
&lt;li&gt;Integrated Gemini AI with automatic model fallback&lt;/li&gt;
&lt;li&gt;Built 10 full-featured pages with responsive mobile-first CSS&lt;/li&gt;
&lt;li&gt;Debugged Vite ESM module errors in real time&lt;/li&gt;
&lt;li&gt;Wrote this submission&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Prize Categories
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;✅ &lt;strong&gt;General Hacktoberfest&lt;/strong&gt; — Open-source project with real-world impact&lt;/li&gt;
&lt;li&gt;✅ &lt;strong&gt;Google Gemini&lt;/strong&gt; — Built around Gemini AI for agricultural advice and voice query parsing&lt;/li&gt;
&lt;li&gt;✅ &lt;strong&gt;Farming / AgriTech&lt;/strong&gt; — Direct application for smallholder farmers in India&lt;/li&gt;
&lt;li&gt;✅ &lt;strong&gt;Social Good / Accessibility&lt;/strong&gt; — Multilingual (EN/HI/BN), designed for low-literacy users&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;MandiMitra is open source and free to use. Contributions, especially real Agmarknet data integrations and regional language additions, are very welcome!&lt;/em&gt;&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>hf26challenge</category>
    </item>
    <item>
      <title>Syllabiq</title>
      <dc:creator>Deep Manna</dc:creator>
      <pubDate>Sat, 03 Oct 2026 04:14:55 +0000</pubDate>
      <link>https://dev.to/deep_manna_675479a195902a/syllabiq-3lai</link>
      <guid>https://dev.to/deep_manna_675479a195902a/syllabiq-3lai</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/hacktoberfest-weekend-2026-10-01"&gt;Hacktoberfest Weekend Challenge: Build for a Friend&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;I built &lt;strong&gt;Syllabiq&lt;/strong&gt;, an open-source, personalized syllabus study companion and diagnostic platform. &lt;/p&gt;

&lt;h3&gt;
  
  
  Who I Built It For
&lt;/h3&gt;

&lt;p&gt;I built this for my friend &lt;strong&gt;Alex&lt;/strong&gt;, a university student who was drowning in chaotic exam prep. Like many students, Alex had course syllabi scattered across bloated LMS portals, PDFs buried in downloads folders, fragmented Google Docs for notes, and zero easy way to test whether they actually understood the material until exam day arrived. The cognitive friction of just figuring out &lt;em&gt;"What do I need to study next?"&lt;/em&gt; was causing serious anxiety and procrastination.&lt;/p&gt;

&lt;h3&gt;
  
  
  What Problem It Solves
&lt;/h3&gt;

&lt;p&gt;Most study apps are either overly simplistic flashcard decks or expensive subscription-locked platforms ($15–$25/month) that don't respect a student's actual course syllabus. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Syllabiq&lt;/strong&gt; bridges this gap by grounding everything in the student's actual syllabus structure:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Hierarchical Syllabus Organization&lt;/strong&gt;: Automatically maps courses into Units and Topics with real-time mastery tracking.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;3-in-1 Study Hub per Topic&lt;/strong&gt;:

&lt;ol&gt;
&lt;li&gt;📝 &lt;strong&gt;Curated Notes &amp;amp; Personal Scratchpad&lt;/strong&gt;: Concise conceptual breakdowns, formula/code snippets, and an auto-saving student scratchpad that persists locally.&lt;/li&gt;
&lt;li&gt;❓ &lt;strong&gt;Active Practice Quizzes&lt;/strong&gt;: Topic-level quizzes with immediate feedback and pedagogical explanations.&lt;/li&gt;
&lt;li&gt;📊 &lt;strong&gt;Unit Assessments &amp;amp; Diagnostic Engine&lt;/strong&gt;: Timed mock exams that pinpoint weak spots and generate personalized study recommendations before real exams.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Smart Syllabus Outline Importer&lt;/strong&gt;: Alex can paste their raw course outline from their university portal, and Syllabiq converts it into structured study modules.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Local Preview&lt;/strong&gt;: Run &lt;code&gt;python -m http.server 8080&lt;/code&gt; and visit &lt;code&gt;https://deepmanna2007.github.io/Syllabiq/&lt;/code&gt; .&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Core User Flow Demonstrated&lt;/strong&gt;:

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Course &amp;amp; Topic Selection&lt;/strong&gt;: Seamless switching between Computer Science (&lt;em&gt;Data Structures &amp;amp; Complexity&lt;/em&gt;) and Biology (&lt;em&gt;Cell Biology &amp;amp; Genetics&lt;/em&gt;), or importing a custom syllabus.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Topic Mastery &amp;amp; Notes&lt;/strong&gt;: Interactive notes with bullet/formula formatting helpers and localStorage auto-save.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Interactive Quizzing&lt;/strong&gt;: Dynamic multiple-choice questions with explanation reveals and score tallying.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Diagnostic Assessments&lt;/strong&gt;: Timed assessments yielding targeted study recommendations based on missed questions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Theme Customization&lt;/strong&gt;: Responsive dark and light mode toggle.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Code
&lt;/h2&gt;

&lt;p&gt;🔗 &lt;strong&gt;GitHub Repository&lt;/strong&gt;: &lt;a href="https://github.com/deepmanna2007/Syllabiq" rel="noopener noreferrer"&gt;https://github.com/deepmanna2007/Syllabiq&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The project is completely self-contained with &lt;strong&gt;zero external runtime dependencies&lt;/strong&gt; (no heavy npm bundles, no tracking scripts, no cloud logins required):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Repository Structure&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;
&lt;a&gt;&lt;code&gt;index.html&lt;/code&gt;&lt;/a&gt; — Semantic HTML5 application architecture, accessibility attributes, sidebar navigator, and modal dialogs.&lt;/li&gt;
&lt;li&gt;
&lt;a&gt;&lt;code&gt;styles.css&lt;/code&gt;&lt;/a&gt; — Custom design system using modern CSS variables, glassmorphism, responsive grid layout, and dark/light themes.&lt;/li&gt;
&lt;li&gt;
&lt;a&gt;&lt;code&gt;app.js&lt;/code&gt;&lt;/a&gt; — Reactive state store, Markdown parser, quiz runner, countdown timer, and recommendation engine.&lt;/li&gt;
&lt;li&gt;
&lt;a&gt;&lt;code&gt;data.js&lt;/code&gt;&lt;/a&gt; — Comprehensive default syllabi, notes, quizzes, and diagnostic assessment question banks.&lt;/li&gt;
&lt;li&gt;
&lt;a&gt;&lt;code&gt;README.md&lt;/code&gt;&lt;/a&gt; — Comprehensive setup, architecture, and usage guide.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  How I Built It
&lt;/h2&gt;

&lt;p&gt;To build a genuinely helpful, distraction-free study tool, I used an &lt;strong&gt;agentic pairing workflow&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Agentic AI Architecture&lt;/strong&gt;: Built using autonomous agent capabilities with iterative code generation, rigorous workspace validation, and clean architectural separation of concerns.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Client-Side Knowledge Synthesis&lt;/strong&gt;: Rather than tying the application to a paid cloud API that could fail offline, the intelligence is baked directly into the client-side diagnostic engine. It analyzes student answer patterns, calculates unit-level passing thresholds, and automatically serves personalized study recommendations based on syllabus concepts.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Zero-Friction Local First&lt;/strong&gt;: Built using standard Web APIs (&lt;code&gt;localStorage&lt;/code&gt;, CSS custom properties, vanilla ES6 modules) to guarantee instant load times and zero network overhead.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Why Does Open Innovation Matter?
&lt;/h2&gt;

&lt;p&gt;Open innovation is essential—especially in education:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Accessibility Without Paywalls&lt;/strong&gt;: High-quality study tools should not be gated behind monthly subscriptions. Every student, regardless of financial background, deserves tools that help them succeed.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Student Privacy First&lt;/strong&gt;: Closed study platforms harvest student notes, track study habits, and monetize educational data. With Syllabiq's open-source, local-first design, notes and exam scores stay in the student's browser—private, secure, and offline-ready.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Customizability&lt;/strong&gt;: Closed educational platforms force students into rigid templates. An open platform allows educators and learners to fork the project, plug in their own course syllabi (from STEM to Humanities to Medical Board prep), and adapt it to their learning style.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  My Agent Session
&lt;/h2&gt;

&lt;p&gt;This application was engineered through an agentic pairing session:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Planning&lt;/strong&gt;: Outlined a syllabus-first data hierarchy and designed the 3-mode workflow (Notes ➔ Quiz ➔ Assessment).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Execution&lt;/strong&gt;: Generated clean, accessible HTML5 structure, a curated CSS design system with light/dark contrast standards, and robust JavaScript state management.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Validation&lt;/strong&gt;: Launched a local HTTP daemon and verified that all endpoints (&lt;code&gt;/index.html&lt;/code&gt;, &lt;code&gt;/styles.css&lt;/code&gt;, &lt;code&gt;/data.js&lt;/code&gt;, &lt;code&gt;/app.js&lt;/code&gt;) respond with HTTP 200 and run smoothly.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Prize Categories
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Hacktoberfest Weekend Challenge: Build for a Friend&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;strong&gt;Submitted by&lt;/strong&gt;: &lt;a href="https://github.com/deepmanna2007" rel="noopener noreferrer"&gt;@deepmanna2007&lt;/a&gt;&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>weekendchallenge</category>
      <category>hf26challenge</category>
    </item>
  </channel>
</rss>
