Skip to content

feat(scraping): Implement Real-Time Market Prices (StockX/GOAT) #122

Description

@rushikesh-bobade

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

  1. Scraping Engine: Implement a Puppeteer/Playwright scraper OR integrate a reliable unofficial API for StockX or GOAT in app/services/scrapers/index.ts.
  2. Data Model: Ensure the MarketPrice Prisma model accurately stores askPrice, bidPrice, and lastSold.
  3. Resilience: Add try/catch blocks and exponential backoff to handle rate limits from the target marketplaces.
  4. 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.

Metadata

Metadata

Labels

ECSoC26Required label for ECSOC Sentinel scoringenhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions