How johnweslykurasa/buy-pilot works
Buy Pilot is a product-search and comparison application, with a Next.js frontend and two visible API implementations: a root-level Next.js API and a separate Express backend. The search workflow collects marketplace offers and groups matching products; the UI also exposes visual search, account access, and wishlists. The tree and excerpts show both stacks but do not establish which one the frontend uses for every feature, so those connections are omitted. Several backend routes and integrations are represented by their source paths, but their internal behavior was not sampled.
Main entry points: search.ts Search route · server.ts API server · SearchHeader.tsx Search interface · auth.ts Authentication routes
Components 25
Frontend experience
- Search interface
frontend/src/components/SearchHeader.tsx - Visual search
frontend/src/components/VisualSearchModal.tsx - Account modal
frontend/src/components/AuthModal.tsx - Wishlist drawer
frontend/src/components/WishlistDrawer.tsx - Home page
frontend/src/app/page.tsx
Next.js API
- Search route
src/app/api/search/route.ts - Analysis route
src/app/api/analyze/route.ts
Express API
- API server
backend/src/server.ts - Search route
backend/src/routes/search.ts - Analysis route
backend/src/routes/analyze.ts - Vision route
backend/src/routes/vision.ts - Authentication routes
backend/src/routes/auth.ts - JWT middleware
backend/src/middleware/auth.ts - Wishlist route
backend/src/routes/wishlist.ts - Prisma client
backend/src/lib/prisma.ts
Search providers and data
- Marketplace scrapers
src/lib/providers - Marketplace providers
backend/src/lib/providers - Yahoo fallback
backend/src/lib/yahooHelper.ts - Product types
backend/src/lib/types.ts - SerpApi provider
backend/src/lib/providers/SerpApiProvider.ts - Amazon provider
backend/src/lib/providers/AmazonProvider.ts - Flipkart provider
backend/src/lib/providers/FlipkartProvider.ts - Myntra provider
backend/src/lib/providers/MyntraProvider.ts
Other components
- Shopper
- Database
Connections 28
- Shopper → Search interface: searches
frontend/src/components/SearchHeader.tsx - Shopper → Home page: opens
- Search interface → Visual search: opens
frontend/src/components/SearchHeader.tsx - Search interface → Account modal: opens
frontend/src/components/SearchHeader.tsx - Search interface → Wishlist drawer: opens
frontend/src/components/SearchHeader.tsx - API server → Search route: mounts route
backend/src/server.ts - API server → Analysis route: mounts route
backend/src/server.ts - API server → Vision route: mounts route
backend/src/server.ts - API server → Authentication routes: mounts route
backend/src/server.ts - API server → Wishlist route: mounts route
backend/src/server.ts - Search route → Marketplace providers: dispatches searches
backend/src/routes/search.ts - Search route → SerpApi provider: queries
backend/src/routes/search.ts - Search route → Amazon provider: queries
backend/src/routes/search.ts - Search route → Flipkart provider: queries
backend/src/routes/search.ts - Search route → Myntra provider: queries
backend/src/routes/search.ts - Search route → Marketplace providers: groups offers
backend/src/routes/search.ts - Authentication routes → JWT middleware: authenticates with
backend/src/routes/auth.ts - Authentication routes → Prisma client: reads and writes
backend/src/routes/auth.ts - Wishlist route → JWT middleware: authenticates with
backend/src/routes/wishlist.ts - Wishlist route → Prisma client: reads and writes
backend/src/routes/wishlist.ts - Prisma client → Database: accesses
- Amazon provider → Yahoo fallback: uses fallback
backend/src/lib/providers/AmazonProvider.ts - Flipkart provider → Yahoo fallback: uses fallback
backend/src/lib/providers/FlipkartProvider.ts - Amazon provider → Product types: uses types
backend/src/lib/providers/AmazonProvider.ts - Flipkart provider → Product types: uses types
backend/src/lib/providers/FlipkartProvider.ts - Myntra provider → Product types: uses types
backend/src/lib/providers/MyntraProvider.ts - Search route → Marketplace scrapers: dispatches searches
src/app/api/search/route.ts - Analysis route → Search route: analyzes search results