cd /news/ai-products/cartpulse-building-an-in-store-ai-bu… · home › topics › ai-products › article
[ARTICLE · art-152533] src=dev.to ↗ pub= topic=ai-products verified=true sentiment=↑ positive

CartPulse: Building an In-Store AI Budget Guardian That Shoppers Would Actually Pay For

A developer built CartPulse, an in-store shopping companion web app that combines barcode scanning, predictive product search, live cart tracking and a budget meter with an open-weight AI shopping assistant to stop shoppers overspending before checkout. The assistant runs Qwen 2.5 0.5B Instruct (Apache 2.0) locally in the browser via WebGPU/ONNX, which the developer says drives inference cost to $0.00 per scan and keeps all cart and budget data on-device. The project proposes a $3.99/month consumer freemium tier and a white-label license for supermarket chains, and was submitted to the Hacktoberfest 2026 Open-Source AI Challenge.

by read8 min views1 publishedOct 18, 2026

#

🛒 CartPulse: Building an In-Store AI Budget Guardian That Shoppers Would Actually Pay For

Built for the Hacktoberfest 2026 Open-Source AI Challenge: Week 2 ("Side Hustle").

#

💡 The Side Hustle: What We Built & Who Would Pay For It

Every weekend, millions of shoppers walk into supermarkets with a mental spending limit—say, ₦15,000 or $50—and walk out stunned at the register after spending 30% more than planned.

The reasons are universal:

  1. Product prices are scattered across aisles and easily forgotten while walking the store.
  2. Mental math deteriorates after 20 minutes of navigating fluorescent-lit aisles.
  3. Impulse additions quietly push the basket over the budget limit.
  4. When shoppers finally reach the cashier, returning embarrassing unscanned items causes delays and frustration for everyone in line.

CartPulse is an in-store shopping companion web application that puts a financial guardian in the shopper's pocket. It combines instant barcode scanning, predictive product search, live cart state tracking, dynamic budget metering, and an open-weight AI shopping assistant that actively prevents overspending before reaching checkout.

Who Would Pay For This?

We designed CartPulse with two distinct, viable revenue paths:

  1. Direct-to-Consumer (B2C Freemium / $3.99/mo)

Target Audience: College students on tight allowances, single professionals managing strict weekly grocery limits, and families balancing household budgets amidst inflation. #

Value Proposition: If CartPulse saves a family ₦5,000–₦15,000 ($10–$30) per shopping trip by highlighting cheaper catalogue substitutes and flagging impulse creep, paying a modest subscription or tip is an immediate positive ROI. #

Premium Features: Multi-store loyalty catalogue sync, nutritional goal balancing, household shared lists, and receipt export.

  1. Retailer White-Label License (B2B SaaS / Store Partnership)

Target Audience: Supermarket chains (such as Shoprite, Spar, and regional grocery outlets). #

Value Proposition: Checkout bottleneck reduction. CartPulse generates an encrypted express checkout QR code summarizing verified items. Retailers accelerate checkout lane throughput by up to 40%, lower cashier staffing overhead during peak hours, and drastically reduce abandoned cart restock labor.

#

🧠 Why Open Innovation Matters for What We Built

The Hacktoberfest Week 2 prompt asked builders: Tell us why open innovation matters for what you built.

For CartPulse, open-weight AI is not an optional marketing badge—it is the structural reason the business model works:

  1. Zero Per-Query API Fees Makes the Unit Economics Work

If you build a shopping assistant with a proprietary closed API (e.g., OpenAI or Claude), every shopper scanning 20 items and asking 5 budget questions burns through dozens of token calls. At thousands of daily users, API bills completely destroy the margins of a lean consumer side hustle.

By running Qwen 2.5 0.5B Instruct (under an Apache 2.0 license) locally in the browser via WebGPU / ONNX, inference costs exactly $0.00 per scan. The business stays profitable from day one.

  1. Absolute Customer Privacy of Food & Expense Data

What a shopper buys, what brand of medicine or cereal they pick, and how much cash they have left in their bank account is intimate personal data. Proprietary cloud LLMs route user queries through remote server farms and data brokers. With CartPulse:

  • Zero shopping cart data ever leaves the user's device.
  • All session states, budget thresholds, and item tallies live locally in browser storage.

  1. Supermarket Aisle Offline Resilience

Physical supermarkets are notorious Faraday cages. Thick concrete walls and metal shelving frequently kill cellular signals in Aisle 4. Because CartPulse pairs local open weights with a deterministic in-browser intelligence engine, shoppers get instant answers even when cellular bars drop to zero.

  1. Zero Hallucinations: Deterministic Financial Accuracy

In retail, hallucinating a price or miscalculating a budget total destroys user trust immediately. CartPulse strictly separates financial math from natural language reasoning:

All monetary calculations (totals, subtotals, remaining budget, overage, percentages) are computed by deterministic, pure TypeScript functions.

  • The open model receives structured application context and explains trade-offs, compares items, and suggests actions, but never invents fictional prices or products .

  1. Localization for Regional Supermarkets

Because the model weights are open, future iterations can easily be adapted for regional supermarkets across Africa, Europe, and Asia, understanding local brand colloquialisms (e.g., Nigerian pantry staples like Maggi Star Cubes, Peak Milk, Indomie, Golden Penny Spaghetti, and Dangote Sugar in Nigerian Naira ₦).

#

🏛️ System Architecture

flowchart TD
    subgraph Client ["Client Device (Mobile Browser / PWA)"]
        UI["Next.js 14 Mobile-First Interface\\n(Space Grotesk + Plus Jakarta Sans)"]
        ZStore[("Zustand Local Store\\n• Budget: ₦15,000\\n• Cart Items\\n• Active Store\\n• Recent Searches")]
        UI <--> ZStore
    end

    subgraph ScannerEngine ["In-Store Barcode & Search Gateway"]
        Cam["Viewfinder & Real Camera (getUserMedia)"]
        Toast["Scan Confirmation Toast\\n(3s Auto-Add / 5s Reject )"]
        Search["Predictive Search Engine\\n(Aisles 1-6 • Category Filtering)"]
        Cam --> Toast --> ZStore
        Search --> ZStore
    end

    subgraph DeterministicMath ["Deterministic Financial Engine"]
        M1["calculateCartTotal()"]
        M2["calculateRemainingBudget()"]
        M3["getBudgetStatus() (<80%, 80-99%, ≥100%)"]
        M4["simulatePurchaseImpact()"]
        ZStore <--> M1 & M2 & M3 & M4
    end

    subgraph AIEngine ["CartPulse Open AI Layer"]
        Qwen["Qwen 2.5 0.5B Instruct\\n(Apache 2.0 • Local In-Browser Inference)"]
        Adapter["CartPulseAIAdapter"]
        Tools["Recommendation Tools\\n• checkAffordability()\\n• findCartAlternatives()\\n• prioritizeCartItems()\\n• generatePreCheckoutSummary()"]

        Adapter <--> Qwen
        Adapter <--> Tools
        Tools <--> DeterministicMath
        ZStore <--> Adapter
    end

    subgraph CheckoutGate ["Express Gate Checkout"]
        Modal["Reality Check Verification Modal"]
        QR["SVG QR Matrix Session Generator\\n(Prototype Reference Token)"]
        UI --> Modal --> QR
    end

#

📱 User Experience & Key Features

  1. Screen 0: Store Check-In

Shoppers scan the entrance QR code or pick a geo-fenced branch preset (Shoprite Ikeja City Mall, Shoprite Minna, or Spar Victoria Island). Live pricing and aisle maps synchronize immediately with a pulsating laser reticle.

  1. Persistent Dynamic Shopping Header

Visible on every screen once checked in:

  • Active store indicator and live shopping bag unit counter.
  • Running totals: Total: ₦[cartTotal] andBudget: ₦[budget] (with 1-click inline budget editing).

Dynamic 3-Tier Budget Progress Bar : - < 80%: Electric emerald positive progress. #

80%–99%: Amber warning badge with remaining funds reminder. #

≥ 100%: Red danger alert displaying exact excess amount (₦X over budget! ).

  1. Screen 1: Camera Scanner & 3-Second Confirmation Toast
  • Dual-mode viewfinder: supports real camera stream via getUserMedia or high-fidelity simulated supermarket aisle.
  • Torch toggle with illumination beam effect.

Floating Scan Confirmation Toast : When a barcode is scanned, a compact card appears displaying the product photo, name, and emerald price. A 3-second animated timeout bar counts down—if not rejected, the item is auto-added with an audio synthesizer beep. PressingReject cancels the addition and s scanning for 5 seconds to prevent accidental duplicates.

  1. Screen 2: Predictive Product Search
  • Sub-millisecond instant filtering across 21 everyday grocery staples.
  • Category carousel: Seasoning & Spices ,Dairy & Breakfast ,Pasta & Grains ,Household & Pantry ,Bakery & Fresh ,Snacks & Beverages .

Budget Pacing Card : Live indicator showing available funds and whether the shopper is within limit.

  • 1-tap circular + addition buttons.

  1. Screen 3: Live Cart Dashboard
  • Full itemized basket with micro-steppers (- /+ ), individual subtotals, and SKU tags.
  • Accessible item removal with an instant Undo notification banner .
  • "Review my budget with AI" call-to-action button.
  • Pinned bottom checkout bar with "Finish Shopping" trigger.

  1. Screen 4 & 5: Reality Check & Checkout QR Code

Reality Check Modal : Displays an animated amber warning ping:"Does your physical cart match your digital list exactly? Unscanned items will cause delays at the checkout." #

Checkout Confirmation : Generates a high-contrast, self-contained SVG QR code matrix encoding a safe demonstration checkout reference token, accompanied by an itemized grocery breakdown.

  1. Smart Shopping Assistant Panel

Accessible from bottom navigation, persistent header, or floating action button (FAB):

  • Displays the Qwen 2.5 0.5B • Apache 2.0 • Local In-Browser Inference badge.
  • Instant suggested question chips:
    • "Can I still afford milk and bread?"
    • "What can I remove to stay within my budget?"
    • "Find cheaper alternatives to the products in my cart."
    • "Which items should I prioritize?"
    • "Summarize my shopping so far."

Interactive Actionable Recommendation Cards : When the assistant suggests cheaper substitutes (e.g. switching Peak Powdered Milk ₦3,100 to Dano Full Cream ₦2,400 to save ₦700), it presents a 1-tapSwitch orAdd button that directly modifies the live cart!

#

🧪 Automated Test Suite

We built a comprehensive automated test suite with Vitest to guarantee mathematical correctness, state consistency, and AI reasoning reliability:

#

🛠️ Tech Stack

Framework: Next.js 14 (App Router) #

Language: TypeScript 5 (Strict Mode) #

Styling: Tailwind CSS 3 (CartPulse Dark Precision Engineering Design System) #

Typography: Space Grotesk (Headlines, Numerics, Tabular Figures) & Plus Jakarta Sans (Body) #

State Management: Zustand with safe local storage persistence & SSR hydration handling #

Audio Feedback: Web Audio API synthesizer #

Testing: Vitest #

License: Apache 2.0

#

🛒 Try It Out

Clone the repository:

Install dependencies:

Run automated tests:

Start the local server:

Open http://localhost:3000 in your mobile browser or desktop browser!

CartPulse proves that open-source AI is not just for cloud researchers—it's the foundation for real, privacy-first side hustles that solve everyday human problems.

── more in #ai-products 4 stories · sorted by recency
── more on @cartpulse 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/cartpulse-building-a…] indexed:0 read:8min 2026-10-18 · —