How st4rk-7/riven works
Riven is a competitor-price and stock monitoring product for small retailers. A retailer signs in, adds a product, and the app discovers competitor offers; collection can also be triggered from Amazon pages via the Chrome extension or by the server crawler. Observations are extracted, matched to products, and recorded so the app can show match status and price history. The graph preserves the documented review and scheduling capabilities; unsampled subsystems are represented only where the tree or README supports them, so some links are documented rather than source-verified.
Main entry points: observations.ts Observation routes · riven-main.tsx Retailer app · products.ts Product routes · app.ts Fastify API
Components 20
Retailer apps
- Retailer app
web/riven-main.tsx - Product screens
web/screens - Catalog and history view
web/data.ts - Chrome extension
extension/src/background.ts
API and identity
- Fastify API
server/app.ts - Sign-in and identity
server/auth.ts - Product routes
server/products.ts - Observation routes
server/observations.ts - Offer discovery
server/discovery.ts - Product matching
server/matching.ts
Offer collection
- Scheduled crawler
server/crawler.ts - Amazon collector
server/sources/amazon-collector.ts - Page capture and send
extension/src/capture.ts - Site rules
server/sources/sites.ts - Offer extraction
server/sources/extract.ts
Product and observation data
- Observation persistence
server/save-observation.ts - PostgreSQL
Other components
- Retailer
- Amazon pages
- Better Auth
Connections 29
- Retailer → Retailer app: uses
README.md - Retailer app → Product screens: renders
web/riven-main.tsx - Retailer app → Catalog and history view: builds catalog
web/riven-main.tsx - Product screens → Catalog and history view: reads offers
web/screens/Competitors.tsx - Retailer app → Fastify API: requests data
README.md - Retailer app → Chrome extension: requests page fetch
web/riven-main.tsx - Retailer → Chrome extension: shares viewed pages
README.md - Chrome extension → Amazon pages: captures pages
README.md - Chrome extension → Fastify API: sends observations
README.md - Fastify API → Sign-in and identity: registers routes
server/app.ts - Sign-in and identity → Better Auth: delegates sign-in
server/auth.ts - Fastify API → Product routes: registers routes
server/app.ts - Fastify API → Observation routes: registers routes
server/app.ts - Product routes → Product matching: uses matching
server/products.ts - Product routes → Amazon collector: starts collection
server/products.ts - Product routes → Offer discovery: discovers offers
- Observation routes → Offer extraction: uses extraction
server/observations.ts - Observation routes → Scheduled crawler: coordinates checks
server/observations.ts - Observation routes → Offer discovery: requests discovery
server/observations.ts - Observation routes → Observation persistence: saves observations
server/observations.ts - Scheduled crawler → Amazon collector: rechecks offers
- Amazon collector → Offer extraction: extracts pages
server/sources/amazon-collector.ts - Amazon collector → Site rules: selects rules
server/sources/amazon-collector.ts - Offer extraction → Site rules: applies rules
server/sources/extract.ts - Amazon collector → Amazon pages: fetches pages
- Observation persistence → PostgreSQL: writes records
- Product routes → PostgreSQL: reads and writes
- Observation routes → PostgreSQL: reads records
- Sign-in and identity → PostgreSQL: uses database
server/auth.ts