Skip to content

Smart grocery comparison agent for Asian international students#1234

Merged
guihunwansui merged 8 commits intodevfrom
feat/smart-grocery-agent
Apr 3, 2026
Merged

Smart grocery comparison agent for Asian international students#1234
guihunwansui merged 8 commits intodevfrom
feat/smart-grocery-agent

Conversation

@guihunwansui
Copy link
Copy Markdown
Collaborator

Summary

  • Add grocery comparison skill for Asian international students to find best value groceries
  • Compare prices across Weee, Asian markets (168, H Mart, 99 Ranch), and mainstream stores (Kroger, Costco, Sam's Club)
  • Consider user taste preferences ("American cakes are too sweet"), distance, and cultural factors

Features

  • MongoDB Schema (grocery_store.rs): Products, prices, stores, user preferences
  • Kroger API Integration (kroger_api.rs): OAuth2 auth, product search, store lookup
  • Questionnaire UI (GroceryPreferencesQuestionnaire.jsx): 6-step onboarding wizard
    • Basic profile (cultural background, location, household size)
    • Shopping habits (transport, memberships, preferred stores)
    • Category selection & category-specific preferences
    • Taste profile (sweetness/spiciness sliders)
    • Budget & priority ranking (draggable)
  • Social Media Mining: Workflows for 小红书, Google Maps reviews
  • Data Source Status: Tested Weee (working), Google Maps (working), Kroger/Costco/Sam's (need API/login)

New Environment Variables

KROGER_CLIENT_ID=xxx    # From developer.kroger.com
KROGER_CLIENT_SECRET=xxx

Test Plan

  • Verify Rust compiles: cargo build -p scheduler_module
  • Test Kroger API with credentials
  • Test questionnaire UI renders correctly
  • E2E: Agent receives grocery query and uses skill

🤖 Generated with Claude Code

root and others added 6 commits April 2, 2026 03:12
This feature enables DoWhiz to help users (primarily Asian international students)
compare grocery prices across multiple channels:
- Online: Weee, Yami
- Asian markets: H Mart, 168 Asian Mart
- Mainstream: Kroger, Costco, Sam's Club, Aldi

Key additions:
- grocery-comparison skill with detailed instructions for price comparison
- GroceryStore MongoDB module for persisting prices and user preferences
- User preference template for taste/distance/cultural factors
- Prompt.rs integration to enable the agent to use the skill
- Market research and competitor analysis document

The agent considers:
- Cultural taste preferences ("American cakes are too sweet")
- Distance and transportation constraints
- Store memberships (Costco, Sam's)
- Delivery vs in-store trade-offs

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Added capabilities to mine price information from:
- Google Maps reviews (price sentiment and specific mentions)
- 小红书 (Xiaohongshu) - best source for Chinese grocery prices
- WeChat articles and public accounts
- Reddit and local forums
- Yelp reviews

Key additions:
- Social media price discovery workflow
- Search query templates for different scenarios
- Data freshness guidelines and trust levels
- Handling when no results are found
- Tips for saving discoveries to user memory

Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Remove unsupported allowed-tools frontmatter
- Add 6-step onboarding questionnaire flow for collecting user preferences
  - Basic profile (ethnicity, location, household size)
  - Shopping habits (transportation, delivery preference, memberships)
  - Main shopping categories
  - Category-specific preferences (meat, snacks, vegetables, hotpot)
  - Taste profile (sweetness, spiciness, saltiness acceptance)
  - Budget and priority ranking
- Add product evaluation extraction table for comprehensive reviews
  - 分量/规格, 品质评价, 加工难度, 口味描述, 性价比, 适合人群, 踩坑提醒
- Reference 小红书 "问一问" AI for quick product queries
- Define memory storage format for questionnaire results

Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Align template with new onboarding questionnaire structure
- Add cultural background, household size, taste profile sections
- Add category-specific preferences (meat, snacks, vegetables, hotpot)
- Add budget mindset and priority ranking
- Add product evaluation notes section for quality tracking
- Include example notes from 小红书 reviews

Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Create GroceryPreferencesQuestionnaire.jsx with 6-step wizard flow
  - Step 1: Basic profile (cultural background, location, household)
  - Step 2: Shopping habits (transport, preferences, memberships)
  - Step 3: Main categories selection
  - Step 4: Category-specific preferences (meat, snacks, vegetables, hotpot)
  - Step 5: Taste profile (sweetness, spiciness, saltiness sliders)
  - Step 6: Budget and priority ranking (draggable list)
- Create accompanying CSS with modern styling
- Add data source availability status to SKILL.md (tested 2026-04-02)
  - Weee: working
  - Google Maps: working
  - Kroger/Costco: blocked (need API/cookies)
  - Xiaohongshu: blocked (non-China IP)
- Document UI component usage in SKILL.md

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Kroger API Integration:
- Add kroger_api.rs with OAuth2 authentication
- Support product search, store lookup, and product details
- Automatic token refresh with expiry handling
- Full type-safe response parsing

Questionnaire Updates:
- Add store selection UI with categorized groups:
  - Asian online (Weee, Yami)
  - Asian physical (168, H Mart, 99 Ranch, etc.)
  - Warehouse clubs (Sam's Club, Costco)
  - Mainstream US (Kroger, Walmart, Target, Aldi, etc.)
- Require at least one store selection to proceed
- Add Sam's Club to data source availability status

Required env vars for Kroger API:
- KROGER_CLIENT_ID
- KROGER_CLIENT_SECRET

Register at: https://developer.kroger.com/

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 3, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
dowhiz Ready Ready Preview, Comment Apr 3, 2026 3:25am

Tested with credentials:
- OAuth2 token: working
- Product search: working
- Store lookup: working (3 stores near Ann Arbor 48109)
- Pricing: working when locationId specified

Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Extract product_data_to_kroger_product() helper in kroger_api.rs
- Pre-compute store category lists at module level
- Add useCallback to drag handlers in DraggablePriorityList

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@guihunwansui guihunwansui merged commit f8048d8 into dev Apr 3, 2026
1 check was pending
@guihunwansui guihunwansui deleted the feat/smart-grocery-agent branch April 3, 2026 03:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant