How ishtiaq74/pricesniper works
PriceSniper is a MERN price-tracking application. A user signs in, adds a product URL and target price, and the backend scrapes and stores price snapshots; the UI presents tracked products and history, while refreshes can trigger target-price email alerts. The README also documents currency conversion and web price comparison. The graph follows documented routes and indexed module references; some background scheduling and external-service wiring is supported only by documentation or index references.
Main entry points: App.js App routing · server.js Express server · scraperController.js Product controller · priceAlertService.js Price alert job
Components 28
Web app
- App routing
frontend/src/App.js - Sign-in page
frontend/src/pages/AuthPage.js - Auth state
frontend/src/context/AuthContext.js - Dashboard
frontend/src/pages/Dashboard.js - My products
frontend/src/pages/MyProductsPage.js - Add product form
frontend/src/components/AddProductForm.js - Product card
frontend/src/components/ProductCard.js - Price history chart
frontend/src/components/PriceChart.js
Product tracking
- Product API routes
backend/routes/productRoutes.js - Product controller
backend/controllers/scraperController.js - Product operations
backend/services/productService.js - Multi-site scraper
backend/services/scraperService.js - Tracked products
backend/models/Product.js
Authentication
- Auth API routes
backend/routes/authRoutes.js - Auth controller
backend/controllers/authController.js - Registration and login
backend/services/authService.js - User accounts
backend/models/User.js
Alerts and integrations
- Price alert job
backend/services/priceAlertService.js - Email delivery
backend/services/emailService.js - Currency rates
backend/services/currencyService.js - Product comparison search
backend/services/searchService.js
Backend runtime
- Express server
backend/server.js
Other components
- Price tracker user
- MongoDB
- E-commerce sites
- Brevo API
- Google Custom Search
- Exchange-rate provider
Connections 34
- Price tracker user → App routing: uses
frontend/src/App.js - App routing → Auth state: provides auth
frontend/src/App.js - App routing → Sign-in page: routes to
frontend/src/App.js - App routing → Dashboard: routes to
frontend/src/App.js - App routing → My products: routes to
frontend/src/App.js - Sign-in page → Auth state: uses
frontend/src/pages/AuthPage.js - Dashboard → Add product form: renders
frontend/src/pages/Dashboard.js - Dashboard → Product card: renders
frontend/src/pages/Dashboard.js - Product card → Price history chart: renders
frontend/src/components/ProductCard.js - Auth state → Auth API routes: calls auth API
frontend/src/context/AuthContext.js - Add product form → Product API routes: submits product
- Product API routes → Product controller: dispatches
backend/routes/productRoutes.js - Product API routes → Registration and login: protects routes
- Product controller → Product operations: delegates
backend/controllers/scraperController.js - Product controller → Currency rates: gets rates
backend/controllers/scraperController.js - Product controller → Product comparison search: searches
backend/controllers/scraperController.js - Product operations → Multi-site scraper: scrapes product
backend/services/productService.js - Product operations → Tracked products: reads and writes
backend/services/productService.js - Multi-site scraper → E-commerce sites: fetches pages
README.md - Auth API routes → Auth controller: dispatches
backend/routes/authRoutes.js - Auth controller → Registration and login: delegates
backend/controllers/authController.js - Registration and login → User accounts: reads and creates
backend/services/authService.js - Price alert job → Tracked products: checks prices
backend/services/priceAlertService.js - Price alert job → Multi-site scraper: refreshes prices
backend/services/priceAlertService.js - Price alert job → Email delivery: sends alerts
backend/services/priceAlertService.js - Email delivery → Brevo API: sends email
backend/services/emailService.js - Product comparison search → Google Custom Search: queries
backend/services/searchService.js - Currency rates → Exchange-rate provider: gets rates
- Express server → Product API routes: mounts routes
backend/server.js - Express server → Auth API routes: mounts routes
backend/server.js - Express server → MongoDB: connects
backend/server.js - Express server → Price alert job: starts job
backend/server.js - Tracked products → MongoDB: persists
- User accounts → MongoDB: persists