Skip to content

zero-abd/StorePal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

17 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

StorePal - AI Shopping Assistant πŸ›’

Built for HackUTA 2025 πŸŽ“

A comprehensive AI-powered shopping assistant that combines voice interaction, interactive store mapping, and intelligent product search to revolutionize the in-store shopping experience. Built with ElevenLabs ConvAI API, Pinecone Vector Database, FastAPI, and React.

🎯 Problem Statement

When new incoming students or residents visit local Walmart stores or any superstore, they often face a frustrating shopping experience:

  • Lost and Confused: Navigating large stores with thousands of products across multiple aisles can be overwhelming
  • Time Wasted: Customers spend valuable time wandering around trying to locate specific items
  • Limited Help: Finding store employees for assistance is often difficult, especially during peak hours
  • Language Barriers: International students and new residents may struggle to communicate their needs
  • Inefficient Shopping: The traditional "search and wander" approach leads to longer shopping trips and reduced customer satisfaction

πŸ’‘ Our Solution

StorePal revolutionizes the in-store shopping experience with a comprehensive suite of features:

🎀 Voice-First Interface

  • Natural Conversation: Speak naturally and get instant, accurate product location information
  • Real-time Transcription: See your words transcribed live as you speak
  • Audio Responses: Hear clear, spoken directions and product information
  • Multilingual Support: Break language barriers with AI-powered understanding

πŸ—ΊοΈ Interactive Store Mapping

  • Visual Navigation: Interactive store map with real-time product location pins
  • Aisle Highlighting: Products are highlighted on the map with color-coded pins
  • Smart Routing: Get visual guidance to your desired products
  • Department Overview: Navigate by store sections and departments

πŸ“Š Intelligent Dashboard

  • Product Analytics: View detailed product information and availability
  • Search History: Track your previous searches and recommendations
  • Store Insights: Get insights about store layout and popular products

πŸ” Advanced Search

  • Semantic Search: Powered by Pinecone vector database for intelligent product matching
  • Natural Language: Ask questions like "Where can I find organic almond milk?" and get precise aisle and section information
  • Context Awareness: Understand vague descriptions and provide relevant suggestions

Simply walk up to a kiosk, ask "Where can I find organic almond milk?" and get both spoken directions and visual map guidance instantly!

πŸŽ₯ Demo Video

StorePal Demo

Click the thumbnail above to watch our StorePal demo video!

πŸ—ΊοΈ UI Example

Home Page Kiosk

home_page

Map Page Kiosk

map_page

πŸ—οΈ Technical Architecture & Design Decisions

Why These Technologies?

πŸ”— Pinecone Vector Search + ElevenLabs Integration (Core Innovation)

  • Problem: ElevenLabs Knowledge Base can't handle large retail datasets (100k+ products) and lacks semantic search capabilities
  • Solution: Custom integration of Pinecone vector database with ElevenLabs ConvAI for intelligent product search
  • Technical Implementation:
    • Pinecone handles semantic search across 500+ products with millisecond response times
    • ElevenLabs ConvAI processes natural language and triggers Pinecone searches via function calls
    • Vector embeddings enable understanding of product relationships and synonyms
    • Real-time search results fed back to ElevenLabs for natural conversation flow
  • Why This Matters: Enables natural queries like "organic almond milk" to find products even with vague descriptions
  • Performance: Sub-second search + natural voice responses create seamless shopping experience

🎀 ElevenLabs ConvAI + Function Calling

  • Problem: Traditional chatbots can't trigger visual map updates or perform complex actions
  • Solution: ElevenLabs ConvAI with function calling allows the AI to decide when to show maps, search products, or provide directions
  • Implementation: AI agent uses function calls to trigger map pin placement and product search based on user queries
  • Benefit: Seamless voice-to-visual interaction without manual UI controls

πŸ—ΊοΈ SVG-Based Interactive Store Maps

  • Problem: Static images can't show dynamic product locations or provide interactive navigation
  • Solution: Custom SVG store layouts with programmatic pin placement
  • Technical Implementation:
    • SVG allows precise coordinate-based pin placement at exact aisle locations
    • Real-time pin updates based on search results
    • Zoom/pan functionality for large store navigation
    • Color-coded pins for different product categories
  • UI Points: Precisely positioned at aisle intersections and department entrances for customer guidance

🎨 Modern Glassy UI Theme (iOS-Inspired Design)

  • Problem: Traditional kiosk interfaces look outdated and uninviting to modern users
  • Solution: Glassmorphism design with frosted glass effects, subtle transparency, and modern iOS-style aesthetics
  • Technical Implementation:
    • CSS backdrop-filter for glassy blur effects
    • Semi-transparent backgrounds with subtle gradients
    • Smooth animations and micro-interactions
    • Modern typography and spacing following iOS design principles
  • User Experience: Creates premium, approachable interface that encourages interaction

⚑ WebSocket Real-Time Communication

  • Problem: HTTP requests create lag in voice interactions
  • Solution: WebSocket streaming for instant audio processing
  • Benefits:
    • Sub-200ms response times for natural conversation flow
    • Real-time transcription display
    • Instant map updates as user speaks
    • Bidirectional audio streaming for seamless interaction

🎯 App Architecture

User: "Where's the milk?"
↓
ElevenLabs ConvAI processes speech
↓
Function Call: search_products("milk")
↓
Pinecone vector search returns dairy products
↓
Function Call: show_on_map(aisle_7, dairy_section)
↓
SVG map updates with pin at exact aisle location
↓
AI responds: "I found milk in the dairy section, aisle 7. Let me show you on the map..."

πŸ† Why This Architecture Wins

  1. Scalability: Pinecone handles enterprise-scale product catalogs (100k+ items)
  2. Performance: Sub-second search + real-time voice interaction
  3. User Experience: Natural conversation with instant visual feedback
  4. Accuracy: Semantic search finds products even with vague descriptions
  5. Flexibility: Function calling allows complex multi-step interactions

✨ Features

🎀 Voice & Conversation

  • Voice-Activated Search: Simply speak to find products
  • Natural Language Understanding: Ask questions like you would to a human
  • Real-time Transcription: See your words transcribed live as you speak
  • Audio Responses: Hear clear, spoken directions and product information
  • Multilingual Support: Help customers in multiple languages
  • Conversation History: Track your interaction history

πŸ—ΊοΈ Interactive Store Mapping

  • Visual Store Layout: Interactive SVG-based store map
  • Real-time Product Pins: Products highlighted with color-coded pins on the map
  • Aisle Navigation: Visual guidance to specific aisles and sections
  • Department Overview: Navigate by store sections and departments
  • Smart Pin Management: Automatic pin placement and removal
  • Map Controls: Zoom, pan, and interact with the store layout

πŸ“Š Intelligent Dashboard

  • Product Analytics: View detailed product information and availability
  • Search History: Track your previous searches and recommendations
  • Store Insights: Get insights about store layout and popular products
  • Real-time Status: Connection status and system health monitoring
  • User Interface: Clean, modern dashboard for data visualization

πŸ” Advanced Search & AI

  • Semantic Search: Pinecone vector database for intelligent product search
  • Context-Aware Responses: Understand vague descriptions and provide relevant suggestions
  • Product Matching: Advanced algorithms for finding the right products
  • Inventory Integration: Real-time product database with 500+ items
  • AI-Powered Conversations: ElevenLabs ConvAI for natural dialogue

⚑ Technical Features

  • Real-Time Communication: WebSocket-based low-latency interactions
  • Robust API: FastAPI backend with comprehensive endpoints
  • Modern UI: Beautiful React interface with live transcripts and speaking indicators
  • Automatic Audio Processing: PCM 16kHz format handling
  • Cross-Platform: Web-based interface accessible on kiosks or mobile devices
  • Responsive Design: Optimized for various screen sizes and devices

Prerequisites

System Requirements

  • Python 3.8+ (recommended: Python 3.9 or 3.10)
  • Node.js 16+ (recommended: Node.js 18 LTS)
  • Microphone and speakers/headphones for voice interaction
  • Modern web browser with WebSocket and Web Audio API support

API Accounts Required

  • ElevenLabs API account with API key and Agent ID (Get Started)
  • Pinecone API key for vector database (Get Started)

πŸš€ Quick Start Guide

Step 1: Clone and Navigate

git clone <your-repo-url>
cd StorePal

Step 2: Backend Setup

2.1 Create Python Virtual Environment

cd backend
python -m venv .venv

# Activate virtual environment:
# Windows:
.venv\Scripts\activate
# macOS/Linux:
source .venv/bin/activate

2.2 Install Python Dependencies

pip install -r requirements.txt

⚠️ PyAudio Installation Issues?

  • Windows: pip install pipwin && pipwin install pyaudio
  • macOS: brew install portaudio then pip install pyaudio
  • Linux: sudo apt-get install portaudio19-dev python3-pyaudio

2.3 Configure API Keys

Create a .env file in the backend directory:

# Create .env file
touch .env  # Linux/macOS
# or create manually on Windows

# Add your API credentials:
ELEVENLABS_API_KEY=your_elevenlabs_api_key_here
ELEVENLABS_AGENT_ID=your_agent_id_here
PINECONE_API_KEY=your_pinecone_api_key_here

2.4 Initialize Vector Database

cd backend/pinecone_vdb
python upload_data.py

This uploads the Walmart inventory data to Pinecone for semantic search.

Step 3: Frontend Setup

3.1 Install Node.js Dependencies

cd frontend
npm install

Step 4: Run the Application

Option A: Full Web Application (Recommended)

Terminal 1 - Start Backend Server:

cd backend
python main.py

Server will start at http://localhost:8000

Terminal 2 - Start React Frontend:

cd frontend
npm start

Frontend will start at http://localhost:3000

πŸŽ‰ Success! Open your browser to http://localhost:3000 and start talking! 🎀

Option B: Python Audio Client (Testing)

Terminal 1 - Start Backend Server:

cd backend
python main.py

Terminal 2 - Start Voice Client:

cd backend
python audio_client.py

Step 5: Verify Installation

  1. Backend Health Check: Visit http://localhost:8000/health
  2. API Documentation: Visit http://localhost:8000/docs
  3. Frontend Interface: Visit http://localhost:3000
  4. Test Voice: Click the microphone button and speak
  5. Test Map: Ask for a product and watch the map update

🎯 Usage Guide

Getting Started

  1. Open the Application: Navigate to http://localhost:3000
  2. Connect: Click the "Connect" button to establish WebSocket connection
  3. Start Speaking: Click the microphone button and speak naturally
  4. View Results: Watch the interactive map update with product locations
  5. Access Dashboard: Click the dashboard button for analytics and insights

Voice Interaction

Basic Commands

  • "Where can I find [product]?" - Get product location and map pin
  • "What products do you have in [category]?" - Browse by category
  • "Show me [product] on the map" - Visual product location
  • "What's in aisle [number]?" - Aisle-specific browsing

Example Conversation:

πŸ‘€ You: "Where can I find organic almond milk?"
πŸ€– Agent: "I found organic almond milk in the dairy section, aisle 7. 
          Let me show you on the map..."
πŸ—ΊοΈ Map: [Product pin appears on aisle 7]
πŸ‘€ You: "What other dairy products are nearby?"
πŸ€– Agent: "In the dairy section, you'll find milk, yogurt, cheese, 
          and butter. Let me highlight those areas..."
πŸ—ΊοΈ Map: [Multiple pins appear in dairy section]

Interactive Store Map

Map Features

  • Zoom & Pan: Navigate around the store layout
  • Product Pins: Color-coded pins show product locations
  • Aisle Navigation: Click on aisles for detailed information
  • Department Overview: Browse by store sections

Map Controls

  • Zoom In/Out: Mouse wheel or zoom buttons
  • Pan: Click and drag to move around
  • Reset View: Return to full store view
  • Pin Management: Pins automatically appear/disappear based on search

Analytics Dashboard

Dashboard Features

  • Search History: Track your previous queries
  • Product Analytics: View popular products and categories
  • Store Insights: Understand store layout and traffic patterns
  • Performance Metrics: Connection status and response times

Dashboard Sections

  • Recent Searches: Your last 10 product queries
  • Popular Products: Most searched items
  • Category Breakdown: Search distribution by department
  • System Status: Real-time connection and performance data

Advanced Features

Multi-Product Search

πŸ‘€ You: "I need milk, bread, and eggs"
πŸ€– Agent: "I'll help you find all three items. Milk is in dairy (aisle 7), 
          bread is in bakery (aisle 3), and eggs are in dairy (aisle 7). 
          Let me show you the optimal route..."
πŸ—ΊοΈ Map: [Multiple pins with suggested route]

Category Browsing

πŸ‘€ You: "What's in the produce section?"
πŸ€– Agent: "The produce section has fresh fruits, vegetables, and herbs. 
          You'll find apples, bananas, lettuce, tomatoes, and more. 
          Let me show you the produce area..."
πŸ—ΊοΈ Map: [Produce section highlighted]

Tips for Best Results

  1. Speak Clearly: Use a good microphone in a quiet environment
  2. Be Specific: "Organic almond milk" works better than "milk"
  3. Use Natural Language: Ask questions like you would to a human
  4. Check the Map: Visual guidance helps with navigation
  5. Use the Dashboard: Track your shopping patterns and preferences

πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                        React Frontend                          β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”            β”‚
β”‚  β”‚   Voice     β”‚  β”‚   Store     β”‚  β”‚  Dashboard  β”‚            β”‚
β”‚  β”‚ Interface   β”‚  β”‚    Map      β”‚  β”‚   Analytics β”‚            β”‚
β”‚  β”‚             β”‚  β”‚             β”‚  β”‚             β”‚            β”‚
β”‚  β”‚ β€’ Microphoneβ”‚  β”‚ β€’ SVG Map   β”‚  β”‚ β€’ Product   β”‚            β”‚
β”‚  β”‚ β€’ Transcriptβ”‚  β”‚ β€’ Pins      β”‚  β”‚   Analytics β”‚            β”‚
β”‚  β”‚ β€’ Audio     β”‚  β”‚ β€’ Navigationβ”‚  β”‚ β€’ History   β”‚            β”‚
β”‚  β”‚   Playback  β”‚  β”‚ β€’ Controls  β”‚  β”‚ β€’ Insights  β”‚            β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜            β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
    β”‚                    β”‚                    β”‚
    β”‚                    β”‚                    β”‚
    β”‚ WebSocket          β”‚ WebSocket          β”‚ WebSocket
    β”‚ Real-time          β”‚ Map Updates        β”‚ Data Updates
    β”‚ Communication      β”‚                    β”‚
    β”‚                    β”‚                    β”‚
    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                         β”‚
                         β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    FastAPI Backend                             β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”            β”‚
β”‚  β”‚ WebSocket   β”‚  β”‚   Vector    β”‚  β”‚   Static    β”‚            β”‚
β”‚  β”‚ Handler     β”‚  β”‚   Search    β”‚  β”‚   Files     β”‚            β”‚
β”‚  β”‚             β”‚  β”‚   Engine    β”‚  β”‚   Server    β”‚            β”‚
β”‚  β”‚ β€’ Audio     β”‚  β”‚             β”‚  β”‚             β”‚            β”‚
β”‚  β”‚   Streaming β”‚  β”‚ β€’ Pinecone  β”‚  β”‚ β€’ Store     β”‚            β”‚
β”‚  β”‚ β€’ Message   β”‚  β”‚   Queries   β”‚  β”‚   Maps      β”‚            β”‚
β”‚  β”‚   Routing   β”‚  β”‚ β€’ Semantic  β”‚  β”‚ β€’ Assets    β”‚            β”‚
β”‚  β”‚ β€’ Response  β”‚  β”‚   Search    β”‚  β”‚             β”‚            β”‚
β”‚  β”‚   Handling  β”‚  β”‚             β”‚  β”‚             β”‚            β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜            β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
    β”‚                    β”‚                    β”‚
    β”‚ WebSocket          β”‚ HTTP API           β”‚ File Serving
    β”‚                    β”‚                    β”‚
    β–Ό                    β–Ό                    β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    External Services                            β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”            β”‚
β”‚  β”‚ ElevenLabs  β”‚  β”‚   Pinecone   β”‚  β”‚   Store     β”‚            β”‚
β”‚  β”‚ ConvAI API  β”‚  β”‚   Vector    β”‚  β”‚  Inventory  β”‚            β”‚
β”‚  β”‚             β”‚  β”‚   Database  β”‚  β”‚   Database  β”‚            β”‚
β”‚  β”‚ β€’ Voice     β”‚  β”‚             β”‚  β”‚             β”‚            β”‚
β”‚  β”‚   Synthesis β”‚  β”‚ β€’ Semantic  β”‚  β”‚ β€’ 500+      β”‚            β”‚
β”‚  β”‚ β€’ Speech    β”‚  β”‚   Search    β”‚  β”‚   Products  β”‚            β”‚
β”‚  β”‚   Recognitionβ”‚  β”‚ β€’ Vector   β”‚  β”‚ β€’ Aisle     β”‚            β”‚
β”‚  β”‚ β€’ Natural   β”‚  β”‚   Storage   β”‚  β”‚   Mapping   β”‚            β”‚
β”‚  β”‚   Language  β”‚  β”‚             β”‚  β”‚ β€’ Pricing  β”‚            β”‚
β”‚  β”‚   Processingβ”‚  β”‚             β”‚  β”‚   Info      β”‚            β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜            β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

How It Works:

  1. Voice Input: Customer speaks at kiosk β†’ Voice captured by React frontend
  2. Audio Streaming: Audio streamed to FastAPI backend via WebSocket
  3. AI Processing: Backend forwards to ElevenLabs ConvAI for natural language processing
  4. Semantic Search: User query triggers semantic search in Pinecone vector database
  5. Map Visualization: Relevant products with aisle/section info displayed on interactive map
  6. Audio Response: AI agent speaks the response back to customer
  7. Dashboard Updates: Analytics and search history updated in real-time

API Endpoints

The FastAPI server provides a clean REST + WebSocket API ready for frontend integration:

HTTP Endpoints

  • GET / - API info and status
  • GET /health - Health check
  • GET /docs - Interactive API documentation (Swagger UI)

WebSocket Endpoint

  • WS /ws/conversation - Real-time voice conversation stream

Visit http://localhost:8000/docs for interactive API documentation!

πŸ“ Project Structure

StorePal/
β”œβ”€β”€ backend/                         # FastAPI Backend Server
β”‚   β”œβ”€β”€ main.py                      # Main FastAPI server with WebSocket
β”‚   β”œβ”€β”€ audio_client.py              # Python voice client (testing)
β”‚   β”œβ”€β”€ requirements.txt             # Python dependencies
β”‚   β”œβ”€β”€ data/
β”‚   β”‚   └── winmart_inventory.csv    # Store product database (500+ items)
β”‚   β”œβ”€β”€ pinecone_vdb/               # Vector Database Integration
β”‚   β”‚   β”œβ”€β”€ upload_data.py           # Upload inventory to Pinecone
β”‚   β”‚   β”œβ”€β”€ vector_search.py         # Semantic search functions
β”‚   β”‚   β”œβ”€β”€ example_usage.py         # Usage examples
β”‚   β”‚   β”œβ”€β”€ README.md                # Vector DB documentation
β”‚   β”‚   β”œβ”€β”€ QUICK_REFERENCE.md       # Quick reference guide
β”‚   β”‚   └── IMPLEMENTATION_SUMMARY.md # Implementation details
β”‚   β”œβ”€β”€ static/                      # Static files (store maps, assets)
β”‚   β”‚   └── store_map.svg            # Interactive store map
β”‚   β”œβ”€β”€ PINECONE_SETUP.md            # Pinecone setup guide
β”‚   β”œβ”€β”€ QUICKSTART.md                # Backend quick start
β”‚   └── .venv/                       # Virtual environment (auto-created)
β”œβ”€β”€ frontend/                        # React Frontend Application
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ App.js                   # Main React component with WebSocket
β”‚   β”‚   β”œβ”€β”€ App.css                  # Beautiful UI styles
β”‚   β”‚   β”œβ”€β”€ StoreMap.js              # Interactive store map component
β”‚   β”‚   β”œβ”€β”€ Dashboard.js             # Analytics dashboard component
β”‚   β”‚   β”œβ”€β”€ Dashboard.css            # Dashboard styles
β”‚   β”‚   └── index.js                 # React entry point
β”‚   β”œβ”€β”€ public/
β”‚   β”‚   └── index.html               # HTML template
β”‚   β”œβ”€β”€ build/                       # Production build (auto-generated)
β”‚   β”œβ”€β”€ package.json                 # Node dependencies
β”‚   └── README.md                    # Frontend documentation
β”œβ”€β”€ .env                             # Your API credentials (create this!)
β”œβ”€β”€ .env.example                     # Template for credentials
β”œβ”€β”€ .gitignore                       # Git ignore rules
└── README.md                        # This file

Key Components

🎀 Voice Interface (frontend/src/App.js)

  • Real-time WebSocket communication
  • Audio recording and playback
  • Live transcription display
  • Connection status management

πŸ—ΊοΈ Interactive Store Map (frontend/src/StoreMap.js)

  • SVG-based store layout visualization
  • Dynamic product pin placement
  • Interactive navigation controls
  • Real-time map updates

πŸ“Š Analytics Dashboard (frontend/src/Dashboard.js)

  • Product search analytics
  • User interaction tracking
  • Store performance insights
  • Search history visualization

⚑ Backend API (backend/main.py)

  • FastAPI server with WebSocket support
  • ElevenLabs ConvAI integration
  • Pinecone vector search
  • Static file serving for maps

πŸ” Vector Search Engine (backend/pinecone_vdb/)

  • Semantic product search
  • Inventory data management
  • Vector database operations
  • Search optimization

Customization

Edit the agent's personality in backend/main.py:

config_override = {
    "agent": {
        "prompt": {
            "prompt": "You are a helpful AI assistant for StorePal..."
        },
        "first_message": "Hi! I'm your StorePal assistant...",
        "language": "en"
    }
}

Restart the server to apply changes.

πŸ”§ Troubleshooting

Common Issues and Solutions

Issue Symptoms Solution
PyAudio Installation Fails ERROR: Failed building wheel for pyaudio Windows: pip install pipwin && pipwin install pyaudio
macOS: brew install portaudio && pip install pyaudio
Linux: sudo apt-get install portaudio19-dev python3-pyaudio
Microphone Not Detected No audio input, silent recording 1. Check system audio settings
2. Grant microphone permissions to browser/Python
3. Test with system audio recorder
4. Try different microphone
WebSocket Connection Failed Connection refused or WebSocket closed 1. Ensure backend is running: python main.py
2. Check if port 8000 is available
3. Verify firewall settings
4. Try http://localhost:8000/health
API Authentication Errors 401 Unauthorized or Invalid API key 1. Verify .env file exists in backend directory
2. Check API keys are correct and active
3. Ensure no extra spaces in .env values
4. Test API keys independently
No Audio Playback Silent responses, no sound 1. Check system volume and speakers
2. Test with system audio player
3. Verify browser audio permissions
4. Try different browser
Map Not Loading Blank map or "Map not available" 1. Check if backend/static/ directory exists
2. Verify static file serving is working
3. Check browser console for errors
4. Ensure SVG files are present
Vector Search Fails "No products found" for all queries 1. Run python upload_data.py in backend/pinecone_vdb/
2. Check Pinecone API key and index name
3. Verify inventory data is uploaded
4. Check Pinecone dashboard for index status
Frontend Build Errors npm start fails or build errors 1. Delete node_modules and package-lock.json
2. Run npm install again
3. Check Node.js version (16+ required)
4. Clear npm cache: npm cache clean --force
Port Already in Use Address already in use 1. Find process using port: netstat -ano | findstr :8000
2. Kill process: taskkill /PID <pid> /F
3. Or change port in main.py
Slow Performance Laggy audio, delayed responses 1. Check internet connection
2. Close other applications
3. Verify API rate limits
4. Check system resources

Debug Mode

Enable debug logging by setting environment variables:

# Backend debug mode
export DEBUG=1
python main.py

# Frontend debug mode
REACT_APP_DEBUG=true npm start

Health Checks

Test each component individually:

# 1. Backend health
curl http://localhost:8000/health

# 2. API documentation
open http://localhost:8000/docs

# 3. Frontend
open http://localhost:3000

# 4. WebSocket connection
# Check browser developer tools β†’ Network β†’ WS

Log Files

Check logs for detailed error information:

  • Backend logs: Console output from python main.py
  • Frontend logs: Browser developer tools β†’ Console
  • Network logs: Browser developer tools β†’ Network

πŸ› οΈ Technologies Used

AI & Machine Learning

  • ElevenLabs ConvAI - Advanced conversational AI with natural voice synthesis
  • Pinecone Vector Database - Serverless vector database for semantic search
  • OpenAI Embeddings - Text embeddings for intelligent product matching

Backend

  • FastAPI - Modern, high-performance Python web framework
  • WebSockets - Real-time bidirectional communication
  • PyAudio - Professional audio I/O for Python
  • Python-dotenv - Secure environment variable management
  • Pandas - Data processing for inventory management

Frontend

  • React 18 - Modern component-based UI framework
  • WebSocket API - Browser-native real-time communication
  • MediaRecorder API - Browser audio capture
  • Web Audio API - High-quality audio playback

Data & Storage

  • CSV Inventory System - 500+ product database with aisle/section mapping
  • Vector Embeddings - Semantic search for natural language queries

πŸŽ“ HackUTA 2025

This project was built for HackUTA 2025 to solve real-world challenges faced by new students and residents when shopping at large superstores. Our goal is to make shopping more accessible, efficient, and enjoyable for everyone.

Impact

  • Saves Time: Reduces average shopping time by providing instant product location
  • Improves Accessibility: Helps international students and non-native speakers
  • Enhances Experience: Makes shopping less stressful and more efficient
  • Scalable Solution: Can be deployed in any retail environment

πŸ“š Documentation

  • Backend Setup: See backend/QUICKSTART.md for detailed backend setup
  • Pinecone Guide: See backend/PINECONE_SETUP.md for vector database setup
  • Vector Search: See backend/pinecone_vdb/README.md for search implementation
  • Frontend: See frontend/README.md for React app details
  • API Docs: Visit http://localhost:8000/docs when running

🀝 Support

For issues related to:

πŸ‘₯ Team

Built with passion and dedication for HackUTA 2025 πŸŽ“


StorePal - Making Shopping Easier, One Voice at a Time πŸ›’βœ¨

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors