How adrianhajdin/pricewise works
PriceWise is an Amazon product price-tracking application. A shopper submits an Amazon URL, which the server scrapes and stores; the home page lists tracked products, and a product page offers price details and an email opt-in. A scheduled cron route refreshes stored products, updates price history, and sends alerts for price drops, discounts, or restocks. The graph includes the documented carousel and product views. Source excerpts show the principal calls; unsampled integrations and scheduling are limited to README evidence or marked unverified.
Main entry points: actions/index.ts Product actions · route.ts Scheduled refresh · page.tsx Home page · scraper/index.ts Amazon scraper
Components 22
Shopper experience
- Home page
app/page.tsx - Hero carousel
components/HeroCarousel.tsx - Product search
components/Searchbar.tsx - Navigation
components/Navbar.tsx - App layout
app/layout.tsx - Product cards
components/ProductCard.tsx - Product details
app/products/[id]/page.tsx - Tracking opt-in
components/Modal.tsx - Price summaries
components/PriceInfoCard.tsx
Product tracking
- Product actions
lib/actions/index.ts - Scheduled refresh
app/api/cron/route.ts - Amazon scraper
lib/scraper/index.ts - Price and alert rules
lib/utils.ts
Product persistence
- Product model
lib/models/product.model.ts - DB connection
lib/mongoose.ts
Notifications
- Email generation and delivery
lib/nodemailer/index.ts
Other components
- Shopper
- Amazon product pages
- Bright Data proxy
- MongoDB
- Outlook mail service
- Cron scheduler
Connections 29
- Shopper → Home page: browses
README.md - Home page → Hero carousel: renders
app/page.tsx - Home page → Product search: renders
app/page.tsx - Home page → Product actions: loads products
app/page.tsx - Home page → Product cards: renders
app/page.tsx - App layout → Navigation: renders
app/layout.tsx - Shopper → Product search: submits URL
components/Searchbar.tsx - Product search → Product actions: invokes scrape
components/Searchbar.tsx - Product actions → DB connection: connects
lib/actions/index.ts - Product actions → Product model: queries and updates
lib/actions/index.ts - Product actions → Amazon scraper: scrapes URL
lib/actions/index.ts - Product actions → Price and alert rules: calculates prices
lib/actions/index.ts - Product actions → Email generation and delivery: sends welcome
lib/actions/index.ts - Amazon scraper → Amazon product pages: fetches page
lib/scraper/index.ts - Amazon scraper → Bright Data proxy: configures proxy
lib/scraper/index.ts - Amazon scraper → Price and alert rules: extracts fields
lib/scraper/index.ts - Product cards → Product details: links to
components/ProductCard.tsx - Product details → Product actions: loads product data
app/products/[id]/page.tsx - Product details → Tracking opt-in: renders
app/products/[id]/page.tsx - Product details → Price summaries: renders
app/products/[id]/page.tsx - Tracking opt-in → Product actions: registers email
components/Modal.tsx - Scheduled refresh → DB connection: connects
app/api/cron/route.ts - Scheduled refresh → Product model: reads and updates
app/api/cron/route.ts - Scheduled refresh → Amazon scraper: refreshes products
app/api/cron/route.ts - Scheduled refresh → Price and alert rules: computes alerts
app/api/cron/route.ts - Scheduled refresh → Email generation and delivery: sends alerts
app/api/cron/route.ts - Cron scheduler → Scheduled refresh: triggers
README.md - DB connection → MongoDB: connects
README.md - Email generation and delivery → Outlook mail service: sends mail
lib/nodemailer/index.ts