<?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: Zaid Bhimala</title>
    <description>The latest articles on DEV Community by Zaid Bhimala (@zaidm124).</description>
    <link>https://dev.to/zaidm124</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%2F729743%2F9d351571-877d-4ddf-a27b-8acac2d22bfe.jpeg</url>
      <title>DEV Community: Zaid Bhimala</title>
      <link>https://dev.to/zaidm124</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/zaidm124"/>
    <language>en</language>
    <item>
      <title>How I Built a Real-Time Grocery Price Comparator with React Native &amp; Groq AI</title>
      <dc:creator>Zaid Bhimala</dc:creator>
      <pubDate>Sat, 14 Nov 2026 12:20:25 +0000</pubDate>
      <link>https://dev.to/zaidm124/how-i-built-a-real-time-grocery-price-comparator-with-react-native-groq-ai-49p4</link>
      <guid>https://dev.to/zaidm124/how-i-built-a-real-time-grocery-price-comparator-with-react-native-groq-ai-49p4</guid>
      <description>&lt;p&gt;Indian quick-commerce platforms deliver groceries in 10 minutes, but catalog fragmentation and dynamic pricing mean that identical grocery baskets often differ in price by 20% or more.&lt;/p&gt;

&lt;p&gt;To solve this, I built &lt;strong&gt;BasketBuddy&lt;/strong&gt;—a React Native app that compares grocery baskets across stores in real time, auto-matches catalog entities, and bridges carts directly to store checkouts.&lt;/p&gt;

&lt;p&gt;Here is an architectural breakdown of how it works and the engineering hurdles faced.&lt;/p&gt;




&lt;h3&gt;
  
  
  1. The Core Engineering Challenge: Catalog Entity Resolution
&lt;/h3&gt;

&lt;p&gt;Store catalogs rarely share standardized SKUs or naming conventions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Store A&lt;/strong&gt;: &lt;em&gt;"Amul Taaza Homogenised Toned Milk 1L"&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Store B&lt;/strong&gt;: &lt;em&gt;"Amul Toned Milk 1000ml pouch"&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Store C&lt;/strong&gt;: &lt;em&gt;"Amul Taaza Fresh Milk - 1 Litre"&lt;/em&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Standard Levenshtein distance fails because volume formatting (&lt;code&gt;1L&lt;/code&gt; vs &lt;code&gt;1000ml&lt;/code&gt;) and promotional noise (&lt;code&gt;Super Saver&lt;/code&gt;, &lt;code&gt;Combo&lt;/code&gt;) distort similarity scores.&lt;/p&gt;

&lt;h4&gt;
  
  
  Solution: Hybrid Deterministic + LLM Matching
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Deterministic Normalization&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;Standardizes unit tokens (&lt;code&gt;ml&lt;/code&gt; -&amp;gt; &lt;code&gt;l&lt;/code&gt;, &lt;code&gt;gm&lt;/code&gt; -&amp;gt; &lt;code&gt;kg&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Strips common promotional stop-words.&lt;/li&gt;
&lt;li&gt;Extracts brand tokens and item weight/quantity.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sub-second LLM Fallback (via Groq)&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;When deterministic confidence falls below threshold, an ultra-fast LLM call through &lt;code&gt;@ai-sdk/groq&lt;/code&gt; evaluates the ambiguous title candidates in &lt;strong&gt;~200–300ms&lt;/strong&gt; to verify item equivalence.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  2. Natural Language AI Mode (Recipe to Cart)
&lt;/h3&gt;

&lt;p&gt;Instead of searching item-by-item, users can type natural meal prompts:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"Ingredients for Butter Chicken and Jeera Rice for 4 people"&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Using structured outputs with Groq:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The prompt translates into a list of normalized grocery ingredients with realistic quantities.&lt;/li&gt;
&lt;li&gt;The auto-matcher searches available inventory across stores and maps them directly to active stock.&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  3. Architecture &amp;amp; Tech Stack
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Framework&lt;/strong&gt;: React Native with Expo SDK 58 &amp;amp; Expo Router (typed routing)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Language&lt;/strong&gt;: TypeScript&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AI Integration&lt;/strong&gt;: Vercel AI SDK (&lt;code&gt;@ai-sdk/groq&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Animation&lt;/strong&gt;: React Native Reanimated (fluid price delta transitions)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Store Bridges&lt;/strong&gt;: In-app WebViews to preserve session context and export finalized baskets&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Testing&lt;/strong&gt;: 560+ deterministic unit tests using &lt;code&gt;jest-expo&lt;/code&gt; (mocked network &amp;amp; store layers)&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  4. Key Takeaways
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Avoid purely algorithmic matching for messy real-world retail data&lt;/strong&gt;: Combining lightweight token extraction with an ultra-fast LLM fallback yields over 90%+ match accuracy without breaking latency budgets.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Mocking third-party integrations early&lt;/strong&gt;: Quick-commerce web structures change rapidly. Keeping store adapters strictly decoupled and mocked in unit tests saved countless hours of debugging.&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  Links &amp;amp; Resources
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Google Play Store&lt;/strong&gt;: &lt;a href="https://play.google.com/store/apps/details?id=com.zaidbhimala.basketbuddy" rel="noopener noreferrer"&gt;Download BasketBuddy&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Video Walkthrough&lt;/strong&gt;: &lt;a href="https://www.youtube.com/watch?v=cNFrxJnmf1o" rel="noopener noreferrer"&gt;Watch on YouTube&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Have you tackled entity matching across messy e-commerce catalogs? What heuristics or embedding approaches worked best for you? Let's discuss in the comments!&lt;/p&gt;

</description>
      <category>ai</category>
      <category>architecture</category>
      <category>mobile</category>
      <category>reactnative</category>
    </item>
  </channel>
</rss>
