DEV Community

Cover image for SmartCart AI: The Automated Grocery Planner for Stress-Free Household Management
Hiral Kodiyatar
Hiral Kodiyatar

Posted on AI-assisted

SmartCart AI: The Automated Grocery Planner for Stress-Free Household Management

Hacktoberfest Weekend Challenge: Build for a Friend Submission 🤝

This is a submission for the Hacktoberfest Weekend Challenge: Build for a Friend (https://dev.to).

đź›’ What I Built

Managing a household's grocery needs is an exhausting, invisible mental load. I built SmartCart AI for my household partner, who bears the brunt of tracking what we consume. Between balancing intense work schedules and running the home, they constantly faced the stress of predicting expiration rates, auditing pantry levels, and wasting hours comparing prices across fractured online platforms.

SmartCart AI completely automates this lifecycle. It divides household inventory tracking into two frictionless paths: a predictive, macro-scheduled cycle for heavy monthly staples, and an instant "Emergency" track for sudden shortages. Operating fully on local open-weight AI models, it ensures total data privacy, dynamically splits carts across local storefronts to fight inflation, and enforces an adaptive payment framework to ensure zero financial surprises.


⚡ The Architecture: Two Parallel Shopping Tracks

To remove the friction of household management, the application separates tracking into two simple modules:

đź“… 1. The Core Recurring Order (Predictive & Scheduled)

This handles the heavy baseline of essential household items necessary every single month. To prevent the user from forgetting items during setup or review, the interface presents intuitive Visual Anchors / Icons categorized by staple types:

  • Fats & Oils: Cooking Oil, Ghee, Butter.
  • Flours & Grains: Different Attas (Wheat, Multigrain), Rice, Maida.
  • Pulses & Lentils: Different Dals (Toor, Moong, Chana, Urad), Whole Chana, Rajma.

The Smart Catch Feature: When the review cycle triggers, the AI doesn't just show a blank cart—it displays these grouped essentials as a checklist. If you are about to finalize the order but forgot a crucial staple, the visual layout lets you quickly tap and add it in one click before the cutoff.

🚨 2. The Emergency / On-Demand List (Instant Execution)

Life doesn't always wait for a 30-day or 60-day cycle. If the household suddenly runs out of milk, sugar, or fresh veggies mid-week:

  • Family members can instantly add items to the Emergency List at any moment via text or voice.
  • Unlike the main cycle, this list features an instant "Order Now" trigger.
  • The AI immediately bypasses the long-term schedule, processes the immediate cart, and pushes it to local delivery apps for near-instant dispatch.

🛠️ How It Works: The Full Workflow

  1. The Master List Setup: The user logs their initial baseline monthly items using organized visual categories (Attas, Dals, Oils).
  2. Dynamic Editing: Family members dynamically add or remove items on the fly using text or voice commands throughout the month, sorting items into either the Scheduled or Emergency queue.
  3. Customizable Frequency Cycles: The core scheduled system adapts seamlessly to the household’s lifestyle:
    • Monthly Plan: For standard, everyday household needs and fresh items.
    • Bi-Monthly Plan (Every 2 Months): Ideal for bulk items like large bags of rice, flour, cooking oil, or detergents.
    • Custom Plan: Fully flexible intervals (e.g., every 3 weeks or every 45 days).
  4. Smart Scheduling & AI Reminders: The AI automatically shifts its predictive alerts based on the chosen cycle:
    • 1 Week Before Target: The system reviews past consumption habits, predicts what bulk or standard items are running low, compiles the draft cart, and sends a "Review your upcoming order" notification.
    • 1 Day Before Target: A final "Last chance to edit your cart" reminder is sent.
    • Order Day: The app generates a finalized summary screen displaying the Smart Default Payment Selection with a transparent "Click to Order" confirmation button.
  5. Multi-Platform Integration & Price Optimization: The AI agent scans chosen online grocery delivery platforms, searches for the items, splits the items across multiple stores if requested to secure the lowest prices, and queues the final carts.
  6. Consistent Payment Safety & Returns: Carts execute safely using the designated payment method. If Pay on Delivery is kept active, users only hand over funds after checking items. Any mismatch triggers the automated return protocol instantly.

🌟 What Makes It Different: Key Innovations

đź’¸ 1. Smart "Anti-Inflation" Cart Splitting & Substitutions

Standard apps lock you into a single digital storefront. SmartCart AI acts as a localized financial optimizer. It scans prices across multiple available platforms simultaneously. If it finds that splitting a massive 2-month bulk order across two different vendors saves more money than the combined delivery fees, it automatically segments the carts. It also identifies identical, higher-value open-weight options for basic staples to lower the total bill.

📦 2. Expiry-Aware Dynamic Buffer (The "Anti-Waste" Engine)

Automated planners often reorder items blindly, creating expensive clutter. SmartCart AI keeps an estimated weight log based on your frequency cycle. If the household switches to a Bi-Monthly Plan, the AI adjusts its predictive algorithms to check if certain items have a longer shelf life. During the "1-Week Before" review, it actively prompts the user with smart checks like: "Based on your family's history, you likely still have 2kg of Ghee left. Should we skip Ghee for this cycle to save money?"

đź’ł 3. The Adaptive Payment Control Layer (Flexible Checkout & Returns)

To completely remove checkout friction, the system eliminates hardcoded payment restrictions. The household can dynamically change and prioritize their payment methods based on real-time budget priorities or physical inspection preferences.

  • Dynamic Choice Mode: Family members can switch between Cash on Delivery (COD), Digital Wallets, or UPI/Cards seamlessly via text or voice before the order finalizes.
  • The "Smart Default" Safety Switch: By default, the AI pre-selects Pay on Delivery / COD when generating orders. This ensures that no automated digital charges hit a bank account until the physical goods are delivered at the doorstep and verified for quality. However, users can toggle this configuration instantly in their preferences if they prefer hands-off digital auto-billing.
  • Automated Return Window Engine: If an item is damaged, missing, or incorrect upon delivery, the user can instantly trigger an emergency voice command (e.g., "SmartCart, return today's cooking oil"). The local AI agent immediately logs the dispute, pulls the vendor receipt, drafts the platform's return ticket automatically, and schedules the return courier collection.

đź’» How I Built It

To guarantee total reliability and immediate local parsing, the system is designed around a split-agent open architecture:

  • Framework: Powered by LangChain for Python to manage the multi-step cart generation and automated web-store queues.
  • Local Inference Engine: Leverages Ollama executing open-weight local models like Llama 3 right inside the home environment.
  • Browser Interaction: Uses Playwright to safely coordinate cart assembly and automate multi-platform storefront interactions behind the scenes.
  • Audio Layer: Integrates local voice-to-text processing models to convert real-time conversational kitchen commands straight into structured grocery modifications on the fly.

🔓 Why Open Innovation Matters

Open innovation matters immensely for this project because dealing with a household's personal routines, schedules, dietary needs, and financial logs demands absolute privacy.

By relying on open-weight models running locally rather than commercial, cloud-hosted closed APIs, no family tracking data ever leaves our local network. Furthermore, an open architecture ensures the app is completely free from unpredictable API subscription walls, rate limits, or sudden model deprecations—making household automation sustainable, secure, and truly independent.


🎥 Demo Links

đź“‹ Prize Categories

  • Main Challenge: Build for a Friend

Top comments (0)