How vivek5130/virtual-assistant-frontend works
ShopSmart is a React storefront with an AI shopping assistant. The main workflow is browsing the home page and product categories, optionally asking for recommendations by text or voice, then viewing and managing a cart. The README also describes search/filtering, detailed product views, and quick actions such as order tracking and returns; those capabilities are represented where the tree supports them, but their full implementation is not shown in the excerpts. Edges reflect shown imports, calls, and data access; unverified feature links are dashed.
Main entry points: App.tsx Home & Assistant · main.tsx Routes & Mount · CartPage.tsx Cart Page · Navbar.tsx Navigation
Components 17
Storefront
- Routes & Mount
src/main.tsx - Navigation
src/components/Navbar.tsx - Home & Assistant
src/App.tsx - Hero Section
src/components/HeroSection.tsx
Product Catalog
- Featured Products
src/components/FeaturedProducts.tsx - Category Browse
src/components/shopByCategory.tsx - Product Cards
src/components/ProductCard.tsx - Product Details
src/components/ProductDetails.tsx - Product API
Shopping Assistant
- Assistant Chat
src/App.tsx - Gemini API
- Speech Recognition
Cart
- Cart Page
src/components/CartPage.tsx - Assistant Cart State
src/App.tsx - Browser Storage
- Cart Context
src/context/CartContext.tsx
Other components
- Shopper
Connections 19
- Shopper → Routes & Mount: opens store
- Routes & Mount → Home & Assistant: routes home
src/main.tsx - Routes & Mount → Cart Page: routes cart
src/main.tsx - Routes & Mount → Navigation: renders
src/main.tsx - Home & Assistant → Hero Section: renders
src/App.tsx - Home & Assistant → Featured Products: renders
src/App.tsx - Home & Assistant → Category Browse: renders
src/App.tsx - Home & Assistant → Assistant Chat: renders
src/App.tsx - Category Browse → Product API: fetches products
src/components/shopByCategory.tsx - Home & Assistant → Product API: fetches products
src/App.tsx - Assistant Chat → Gemini API: requests recommendations
src/App.tsx - Assistant Chat → Speech Recognition: captures voice
src/App.tsx - Assistant Chat → Assistant Cart State: updates cart
src/App.tsx - Assistant Cart State → Browser Storage: reads and writes
src/App.tsx - Cart Page → Browser Storage: loads and updates
src/components/CartPage.tsx - Navigation → Cart Page: links cart
src/components/Navbar.tsx - Home & Assistant → Product Details: shows product view
readme.md - Home & Assistant → Product Cards: uses product cards
- Cart Context → Assistant Cart State: shares cart state