How aditya7pandey/netr-part2 works
Peakfuel’s pipeline turns QuickShelf search results into a trusted analytics brief: the crawler collects resumable page data, validates responses, and runs dataset checks; the API serves dashboard metrics and a tool-using AI ask-box; the React page presents the brief and crawl history. The README documents the end-to-end pipeline and live crawl controls. Source excerpts confirm key API dispatch and metric/tool calls; some UI and crawler internals are indexed but not excerpted, so their finer relationships are omitted.
Main entry points: App.tsx Dashboard shell · server.ts HTTP API routes · crawl.py Resumable crawler · metrics.ts Metrics and queries
Components 26
Collection
- QuickShelf platform
apps/quickshelf/quickshelf_mock.py - Resumable crawler
apps/crawler/peakfuel_crawler/crawl.py - Crawler config
apps/crawler/peakfuel_crawler/config.py - Crawl control agent
apps/crawler/peakfuel_crawler/agent.py
Data and checks
- Response validation
apps/crawler/peakfuel_crawler/validate.py - Dataset checks
apps/crawler/peakfuel_crawler/checks.py - Postgres data store
- Shared Prisma client
packages/db/src/index.ts
Analytics API
- HTTP API routes
apps/api/src/server.ts - Metrics and queries
apps/api/src/metrics.ts - Brief assembly
apps/api/src/overview.ts - Crawl history and control
apps/api/src/crawl.ts - AI ask agent
apps/api/src/ask/agent.ts - Analytics tools
apps/api/src/ask/tools.ts - Groq model
Dashboard
- Dashboard shell
apps/web/src/App.tsx - Coverage heatmap
apps/web/src/Coverage.tsx - Quality view
apps/web/src/Quality.tsx - Search shelf view
apps/web/src/Shelf.tsx - Shelf playback
apps/web/src/ShelfPlayer.tsx - Shopper comparison
apps/web/src/ShopperSaw.tsx - Stock view
apps/web/src/Stock.tsx - Crawl history view
apps/web/src/Crawler.tsx - Live crawl screen
apps/web/src/LiveCrawl.tsx - Ask box
apps/web/src/AskBox.tsx
Other components
- Brand manager
Connections 31
- Resumable crawler → QuickShelf platform: fetches pages
- Resumable crawler → Response validation: validates responses
apps/crawler/peakfuel_crawler/crawl.py - Resumable crawler → Postgres data store: stores crawl data
- Dataset checks → Postgres data store: checks dataset
- Resumable crawler → Crawler config: uses settings
apps/crawler/peakfuel_crawler/crawl.py - Crawl control agent → Resumable crawler: runs crawl
- Crawl control agent → Crawler config: uses settings
apps/crawler/peakfuel_crawler/agent.py - Shared Prisma client → Postgres data store: connects
- HTTP API routes → Brief assembly: routes brief
apps/api/src/server.ts - HTTP API routes → Metrics and queries: routes queries
apps/api/src/server.ts - HTTP API routes → Crawl history and control: routes crawl
apps/api/src/server.ts - HTTP API routes → AI ask agent: routes questions
apps/api/src/server.ts - Brief assembly → Metrics and queries: reads metrics
apps/api/src/overview.ts - Metrics and queries → Shared Prisma client: queries data
apps/api/src/metrics.ts - Crawl history and control → Shared Prisma client: reads crawl records
apps/api/src/crawl.ts - AI ask agent → Analytics tools: dispatches tools
apps/api/src/ask/agent.ts - Analytics tools → Metrics and queries: calls queries
apps/api/src/ask/tools.ts - AI ask agent → Groq model: requests completion
apps/api/src/ask/agent.ts - Brand manager → Dashboard shell: uses dashboard
- Dashboard shell → Coverage heatmap: renders view
apps/web/src/App.tsx - Dashboard shell → Quality view: renders view
apps/web/src/App.tsx - Dashboard shell → Search shelf view: renders view
apps/web/src/App.tsx - Dashboard shell → Stock view: renders view
apps/web/src/App.tsx - Dashboard shell → Crawl history view: renders view
apps/web/src/App.tsx - Dashboard shell → Live crawl screen: renders screen
apps/web/src/App.tsx - Dashboard shell → Ask box: opens ask box
apps/web/src/App.tsx - Search shelf view → Shelf playback: renders player
apps/web/src/Shelf.tsx - Search shelf view → Shopper comparison: renders comparison
apps/web/src/Shelf.tsx - Crawl history view → Crawl history and control: loads crawl history
apps/web/src/Crawler.tsx - Live crawl screen → HTTP API routes: controls crawl
- Ask box → HTTP API routes: sends questions