Problem Statement
Currently, the runAllScrapers function in app/services/scrapers/index.ts is just a stub generating random fake prices. To provide real value to users (and compete with apps like Pricely), FlipTrack needs to fetch real-time market data so resellers know the actual market value of their inventory.
Proposed Solution
Implement a robust scraping architecture or integrate an unofficial API to fetch live ask/bid prices for sneakers and streetwear based on SKU. This data must be stored in the database and updated periodically.
Acceptance Criteria
- Scraping Engine: Implement a Puppeteer/Playwright scraper OR integrate a reliable unofficial API for StockX or GOAT in
app/services/scrapers/index.ts.
- Data Model: Ensure the
MarketPrice Prisma model accurately stores askPrice, bidPrice, and lastSold.
- Resilience: Add try/catch blocks and exponential backoff to handle rate limits from the target marketplaces.
- UI Integration: Ensure the
market-prices.tsx route accurately displays this newly scraped data.
Technical Hints
- Focus on StockX first, as it is the most common pricing benchmark.
- Use a headless browser pool if scraping to avoid memory leaks.
- Ensure the cron job triggers this scraper function securely.
Problem Statement
Currently, the
runAllScrapersfunction inapp/services/scrapers/index.tsis just a stub generating random fake prices. To provide real value to users (and compete with apps like Pricely), FlipTrack needs to fetch real-time market data so resellers know the actual market value of their inventory.Proposed Solution
Implement a robust scraping architecture or integrate an unofficial API to fetch live ask/bid prices for sneakers and streetwear based on SKU. This data must be stored in the database and updated periodically.
Acceptance Criteria
app/services/scrapers/index.ts.MarketPricePrisma model accurately storesaskPrice,bidPrice, andlastSold.market-prices.tsxroute accurately displays this newly scraped data.Technical Hints