How chinmay-url/shopsmart works
ShopSmart turns live shopping results and product reviews into comparison and buying intelligence, with history tracking, saved products, alerts, and a conversational assistant. The main journey is search → compare → inspect product and review signals → decide whether to buy; signed-in users can also save products and track target prices. The graph combines documented capabilities with sampled calls and route wiring. Several page-to-API connections and unsampled implementations are not shown where their exact relationships cannot be verified.
Main entry points: server.js Express API · App.js React app · reviews.js Product and reviews · alerts.js Alert management
Components 31
Shopping experience
- React app
client/src/App.js - Search and results
client/src/pages/Results.js - Product details
client/src/pages/ProductDetails.js - Price history view
client/src/pages/PriceHistory.js - Price alerts view
client/src/pages/PriceAlerts.js - Profile and saved items
client/src/pages/Profile.js - Session context
client/src/context/AuthContext.js - Shopping assistant UI
client/src/components/chatbot/ChatWindow.jsx
Application API
- Express API
server/server.js - Shopping search
server/routes/search.js - Product and reviews
server/routes/reviews.js - Saved products API
server/routes/products.js - Authentication API
server/routes/auth.js - Alert management
server/routes/alerts.js - History API
server/routes/priceHistory.js - Chat API
server/routes/chat.js
Intelligence and history
- Buying-signal analysis
server/utils/researchAI.js - Review sentiment
server/utils/sentiment.js - Price-history analysis
server/utils/priceHistory.js - Store price history
server/utils/storePriceHistory.js - Category price history
server/utils/categoryPriceHistory.js
Accounts and alerts
- User and saved items
server/models/User.js - Alert records
server/models/PriceAlert.js - JWT authorization
server/middleware/auth.js - Alert scheduler
server/utils/priceAlertScheduler.js - Email delivery
server/utils/emailService.js
Other components
- Shopper
- SerpApi
- Groq
- MongoDB
- Email service
Connections 47
- Shopper → React app: uses
- React app → Search and results: routes to
client/src/App.js - React app → Product details: routes to
client/src/App.js - React app → Price history view: routes to
client/src/App.js - React app → Price alerts view: routes to
client/src/App.js - React app → Profile and saved items: routes to
client/src/App.js - React app → Session context: provides session
client/src/App.js - React app → Shopping assistant UI: renders
client/src/App.js - Search and results → Shopping search: requests search
- Product details → Product and reviews: requests analysis
- Price history view → History API: requests history
- Price alerts view → Alert management: manages alerts
- Profile and saved items → Saved products API: manages saved items
- Session context → Authentication API: fetches user
client/src/context/AuthContext.js - Shopping assistant UI → Chat API: sends messages
client/src/components/chatbot/ChatWindow.jsx - Express API → Shopping search: mounts route
server/server.js - Express API → Product and reviews: mounts route
server/server.js - Express API → Saved products API: mounts route
server/server.js - Express API → Authentication API: mounts route
server/server.js - Express API → Alert management: mounts route
server/server.js - Express API → History API: mounts route
server/server.js - Express API → Chat API: mounts route
server/server.js - Shopping search → SerpApi: fetches shopping data
- Shopping search → Store price history: logs prices
server/routes/search.js - Product and reviews → SerpApi: fetches product details
server/routes/reviews.js - Product and reviews → Review sentiment: analyzes reviews
server/routes/reviews.js - Product and reviews → Price-history analysis: gets product history
server/routes/reviews.js - Product and reviews → Buying-signal analysis: computes buying signals
server/routes/reviews.js - History API → Store price history: reads history
server/routes/priceHistory.js - Product and reviews → Buying-signal analysis: scores value and credibility
server/routes/reviews.js - Chat API → Groq: generates replies
- Authentication API → User and saved items: reads and writes
server/routes/auth.js - Authentication API → JWT authorization: protects user route
server/routes/auth.js - Authentication API → Email delivery: sends OTP
server/routes/auth.js - Saved products API → JWT authorization: requires token
server/routes/products.js - Saved products API → User and saved items: updates saved items
server/routes/products.js - Alert management → JWT authorization: requires token
server/routes/alerts.js - Alert management → Alert records: manages alerts
server/routes/alerts.js - Alert management → User and saved items: gets user details
server/routes/alerts.js - Alert management → Email delivery: sends notifications
server/routes/alerts.js - Express API → Alert scheduler: starts after connection
server/server.js - Alert scheduler → Alert records: checks tracked prices
server/utils/priceAlertScheduler.js - Alert scheduler → Store price history: records price checks
server/utils/priceAlertScheduler.js - Alert scheduler → Email delivery: sends price alerts
server/utils/priceAlertScheduler.js - Email delivery → Email service: sends email
server/utils/emailService.js - Express API → MongoDB: connects
server/server.js - Category price history → Store price history: supplements history