How gopalvutukuri14-netizen/smartpick works
SmartPick is a conversational retail recommendation application: a shopper submits a query with persona and prior-product context, the backend interprets and routes it through specialized agents, then returns ranked, review-grounded recommendations for the chat UI. Documented branches handle comparisons, follow-ups, general questions, and out-of-scope requests. Authentication and preference memory support personalization; catalog indexing and sentiment processing support retrieval and ranking. Relationships for unsampled agent internals are based on README documentation, not direct source inspection.
Main entry points: nodes.py Intent routing · App.jsx Chat application · router.py Auth routes · agent.py Response synthesis
Components 33
Shopping experience
- Chat application
frontend/src/App.jsx - Chat UI
frontend/src/components/ChatWindow.jsx - Recommendation cards
frontend/src/components/ProductCard.jsx - Profile selector
frontend/src/components/ProfileSelector.jsx - Recommendation client
frontend/src/api/recommend.js - Auth state
frontend/src/context/AuthContext.jsx - Auth client
frontend/src/api/auth.js
API and identity
- FastAPI endpoints
backend/main.py - Auth routes
backend/auth/router.py - Token security
backend/auth/security.py
Conversation orchestration
- LangGraph workflow
backend/orchestrator/graph.py - Intent routing
backend/orchestrator/nodes.py - Pipeline state
backend/orchestrator/state.py
Recommendation agents
- Query understanding
backend/Agents/query_understanding/agent.py - Product retrieval
backend/Agents/retrieval/agent.py - Persona memory
backend/Agents/memory/agent.py - Recommendation ranking
backend/Agents/ranking/agent.py - Match explanations
backend/Agents/xai/agent.py - Follow-up suggestions
backend/Agents/follow_up/agent.py - Response synthesis
backend/Agents/response/agent.py - Gemini retry
backend/Agents/gemini_retry.py
Catalog and state
- Vector search
backend/pipeline/retrieval.py - Catalog embeddings
backend/pipeline/generate_embeddings.py - Vector index loading
backend/pipeline/load_chromadb.py - Product images
backend/pipeline/product_images.py - Review sentiment
backend/pipeline/sentiment_full.py - Database sessions
backend/database/session.py - User and preference records
backend/database/models.py - ChromaDB catalog
- User database
Other components
- Shopper
- Google Gemini
- Email delivery
Connections 35
- Shopper → Chat application: submits query
frontend/src/App.jsx - Chat application → Chat UI: renders conversation
frontend/src/App.jsx - Chat application → Profile selector: selects persona
frontend/src/App.jsx - Chat application → Recommendation client: requests recommendations
frontend/src/App.jsx - Recommendation client → FastAPI endpoints: calls API
- FastAPI endpoints → LangGraph workflow: runs pipeline
backend/main.py - LangGraph workflow → Intent routing: dispatches nodes
backend/orchestrator/graph.py - LangGraph workflow → Pipeline state: shares state
backend/orchestrator/graph.py - Intent routing → Query understanding: interprets query
- Intent routing → Product retrieval: retrieves candidates
backend/orchestrator/nodes.py - Intent routing → Persona memory: loads preferences
- Intent routing → Recommendation ranking: ranks candidates
- Intent routing → Match explanations: explains matches
- Intent routing → Follow-up suggestions: suggests next steps
- Intent routing → Response synthesis: builds response
- Product retrieval → Vector search: searches catalog
backend/Agents/retrieval/agent.py - Vector search → ChromaDB catalog: queries vectors
backend/pipeline/retrieval.py - Catalog embeddings → Vector index loading: prepares vectors
- Vector index loading → ChromaDB catalog: loads catalog
- Persona memory → Database sessions: reads and updates
backend/Agents/memory/agent.py - Database sessions → User and preference records: provides sessions
backend/database/models.py - User and preference records → User database: persists records
- Recommendation ranking → Review sentiment: uses review signals
- Response synthesis → Product images: resolves images
backend/Agents/response/agent.py - Query understanding → Google Gemini: calls model
- Gemini retry → Google Gemini: retries calls
- Response synthesis → Gemini retry: uses retry helper
backend/Agents/response/agent.py - Chat application → Auth state: reads identity
frontend/src/App.jsx - Auth state → Auth client: manages credentials
frontend/src/context/AuthContext.jsx - Auth client → Auth routes: calls auth endpoints
frontend/src/api/auth.js - FastAPI endpoints → Auth routes: registers routes
backend/main.py - Auth routes → Token security: verifies credentials
backend/auth/router.py - Auth routes → Database sessions: uses sessions
backend/auth/router.py - Auth routes → Email delivery: sends verification mail
- Response synthesis → Recommendation cards: returns recommendations