<?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: Isa T. Q.</title>
    <description>The latest articles on DEV Community by Isa T. Q. (@isaqureshi).</description>
    <link>https://dev.to/isaqureshi</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%2F4031331%2F08c98b68-eebc-49e7-8744-5aa9f0d79a05.png</url>
      <title>DEV Community: Isa T. Q.</title>
      <link>https://dev.to/isaqureshi</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/isaqureshi"/>
    <language>en</language>
    <item>
      <title>Dukaan Digital: Teaching an AI to Read a Kirana Shop So Small Stores Can Compete on ONDC</title>
      <dc:creator>Isa T. Q.</dc:creator>
      <pubDate>Thu, 16 Jul 2026 04:53:33 +0000</pubDate>
      <link>https://dev.to/isaqureshi/dukaan-digital-teaching-an-ai-to-read-a-kirana-shop-so-small-stores-can-compete-on-ondc-2p0i</link>
      <guid>https://dev.to/isaqureshi/dukaan-digital-teaching-an-ai-to-read-a-kirana-shop-so-small-stores-can-compete-on-ondc-2p0i</guid>
      <description>&lt;p&gt;&lt;strong&gt;The problem nobody built for&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Walk into any Indian neighborhood and you'll find one within 200 meters: a kirana store. A shopkeeper who knows your family's grocery list better than you do, sells rice by the fistful, and has been running the same ledger-and-memory system for twenty years.&lt;/p&gt;

&lt;p&gt;Now walk through the Open Network for Digital Commerce (ONDC) — India's answer to letting &lt;em&gt;any&lt;/em&gt; seller, not just Amazon or Blinkit, plug into digital commerce. In theory, this is exactly the lifeline kirana stores need to compete with 10-minute delivery apps. In practice, almost none of them are on it.&lt;/p&gt;

&lt;p&gt;Why? Because getting listed means digitizing a catalog — hundreds of SKUs, prices, categories, descriptions — and typing all of that into a form is a full-time job the shopkeeper doesn't have time for. Half their inventory doesn't even have a barcode: loose grains, regional snacks, hand-weighed spices. There's no "Add to Catalog" button for a kilo of unbranded toor dal.&lt;/p&gt;

&lt;p&gt;That gap — between &lt;em&gt;wanting&lt;/em&gt; to go digital and &lt;em&gt;having the hours&lt;/em&gt; to do it — is the actual bottleneck. Not technology access. Not willingness. Time.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The idea: let the camera do the typing&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The insight behind Dukaan Digital is simple: a kirana shopkeeper already produces two documents every single day without thinking about it — a wholesale distributor's invoice, and a shelf full of visible stock. Both are already a complete inventory list. They just live in the wrong format.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;So instead of asking anyone to type anything, the app asks for a photo.&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Snap&lt;/strong&gt; — a photo of a messy, possibly handwritten distributor invoice, or a photo of a crowded shelf.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Extract&lt;/strong&gt; — Gemini 1.5 Flash reads the image and returns a structured list: product name, category, brand, quantity, unit, price, and whether it's a loose/unbranded item.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Describe&lt;/strong&gt; — for the items that don't have a listing anywhere on the internet (loose grains, local snacks, regional produce), the model generates a short, catchy description on the spot, because nobody else is going to write one.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Review&lt;/strong&gt; — extracted items show up as editable tags the shopkeeper can fix in ten seconds.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Export&lt;/strong&gt; — one tap produces an ONDC-shaped catalog JSON, ready to feed into a seller-app integration.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;What used to be an afternoon of data entry becomes a five-minute phone break between customers.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Under the hood&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The stack is deliberately unglamorous, because the hard part of this problem isn't the architecture — it's the extraction accuracy on genuinely messy, real-world input.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Vision &amp;amp; extraction&lt;/strong&gt;: Gemini 1.5 Flash, prompted to return strict JSON (name, category, brand, quantity, unit, price, &lt;code&gt;is_loose_item&lt;/code&gt;, description, confidence) — no prose, no markdown fences to strip.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Validation&lt;/strong&gt;: every model response gets checked against a Pydantic schema before it's allowed near a database. Malformed individual items get silently dropped instead of failing the whole scan — a photo with 40 products shouldn't fail because one line was unreadable.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Backend&lt;/strong&gt;: FastAPI, five routes — scan, save, list, delete, export.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Storage&lt;/strong&gt;: SQLite. A single-store prototype doesn't need more than that yet.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ONDC mapping&lt;/strong&gt;: the saved catalog gets shaped into something that mirrors an ONDC &lt;code&gt;on_search&lt;/code&gt; payload — &lt;code&gt;bpp/providers&lt;/code&gt; → &lt;code&gt;items[]&lt;/code&gt;, each with a descriptor, price, and quantity block.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The part I spent the most time on&lt;/p&gt;

&lt;p&gt;Not the API calls — the prompt. Getting a vision model to reliably parse a &lt;em&gt;handwritten&lt;/em&gt; invoice, in someone else's handwriting, with abbreviations and crossed-out quantities, is a genuinely different problem from reading a printed receipt. The prompt has to explicitly tell the model to fix spelling, expand abbreviations, and flag its own confidence — because a shopkeeper reviewing extracted data needs to know at a glance which line to double-check, not just trust everything blindly.&lt;/p&gt;

&lt;p&gt;The other deliberate choice was making loose/unbranded items a first-class concept instead of an edge case. A bag of Lay's has a barcode, a price, and a Wikipedia-adjacent amount of existing metadata. A kilo of local makhana from the shop two streets over has none of that — and that's exactly the inventory ONDC listings tend to ignore, because it's the hardest to catalog by hand. If this tool only worked for branded FMCG goods, it would be solving the easy 60% of the problem.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What it looks like in practice&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The interface leans into what a kirana shop actually looks like rather than defaulting to a generic dashboard: a shop-signboard header, a ledger-paper background, and — the part that gets the best reaction in demos — every scanned item shows up as a hand-tag clipped to a string, slightly rotated, punch-hole and all, exactly like the price tags already hanging in these stores. The shopkeeper isn't learning a new mental model. They're looking at a digital version of something they already touch every day.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What's still rough&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is a working prototype, not a finished product, and it's worth being honest about the gaps:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The ONDC export mirrors the &lt;em&gt;shape&lt;/em&gt; of a real catalog payload but hasn't been validated against the official protocol headers and versioning — that's the natural next step once there's an actual seller-app sandbox to test against.&lt;/li&gt;
&lt;li&gt;Extraction accuracy is only as good as the photo. Low light or extreme clutter still needs a retake.&lt;/li&gt;
&lt;li&gt;No multi-store or auth support yet — this is built for one shopkeeper at a time.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Why this matters beyond one shop&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;ONDC's entire premise is that small sellers shouldn't need a tech team to compete with platforms that have one. If digitization keeps requiring manual data entry, the network ends up onboarding the shops that were already digital-first — which defeats the point. A camera-first cataloguing flow isn't a nice-to-have feature; it's the difference between ONDC reaching the kirana stores it was actually built for, or reaching only the ones that didn't need the help in the first place.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Built as a submission for Gen AI Academy APAC — vision-based product cataloguing for ONDC, using Gemini 1.5 Flash for extraction and FastAPI for the backend. Code and setup instructions available on request.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>python</category>
      <category>ai</category>
      <category>productivity</category>
    </item>
  </channel>
</rss>
