Slate Find Pipeline

Mocked marketplace intake, pricing comparison, and deal flagging in one deployable loop.

This scaffold wires Facebook Marketplace ingestion into a Craigslist benchmark, stores enriched listings in PostgreSQL, and formats flagged deals for a daily reseller digest.

CLI: npm run pipeline:run
Cron endpoint: /api/pipeline/run

Flow

1

Scrape mock Facebook Marketplace listings by city and keyword

2

Estimate Craigslist average and compute a normalized deal score

3

Persist flagged listings and format digest-ready email output

Mock scraper

A typed `scrapeFacebookMarketplace(city, keywords)` stub returns realistic listing payloads and contains TODO markers for real browser automation.

Pricing engine

Listings are scored with `(avg_price - listing_price) / avg_price` and flagged when the result is at least 0.40.

Digest output

Flagged listings are queried from PostgreSQL and rendered into plain-text and HTML email templates ready for delivery integration.

Current TODOs