How lyp0746/mercari-monitor works
The product monitors six secondhand marketplaces, stores and filters discovered listings, and notifies users; it can be operated through a web UI, desktop GUI, or headless mode. The web workflow is user → React client → FastAPI routes/runtime → marketplace monitors → persisted listings and notifications, with WebSocket events for live updates. The README documents filtering, watchlists, blocked items, settings, stats, and Telegram commands; those capabilities are represented, though some route implementations were not sampled. Edges reflect only shown calls or README claims; unsampled route internals are not inferred.
Main entry points: base.py Polling and filtering · deps.py Monitor runtime · monitors Marketplace adapters · notifier.py Notification dispatcher
Components 23
User interfaces
- Web application
web/src/App.tsx - API client
web/src/api/client.ts - Live event client
web/src/hooks/useWS.ts - Management pages
web/src/pages - Desktop GUI
src/gui/app.py - Headless runner
src/main.py
Web API
- API application
src/api/main.py - API routes
src/api/routes - Monitor runtime
src/api/deps.py - Event broadcaster
src/api/deps.py
Monitoring
- Polling and filtering
src/monitors/base.py - Marketplace adapters
src/monitors - Mercari adapter
src/monitors/mercari.py - Carousell adapter
src/monitors/carousell.py - Yahoo Auctions adapter
src/monitors/yahoo_auctions.py
Configuration and state
- JSON configuration
src/config.py - SQLite database
src/database.py
Notifications
- Notification dispatcher
src/notifier.py - Telegram command service
src/telegram_bot_service.py
Other components
- Operator
- Telegram
- Discord webhook
- Marketplace services
Connections 34
- Operator → Web application: operates
README.md - Web application → Management pages: renders
web/src/App.tsx - Web application → API client: uses
web/src/App.tsx - Web application → Live event client: subscribes
web/src/App.tsx - Management pages → API client: requests data
web/src/pages/Dashboard.tsx - API client → API application: HTTP requests
web/src/api/client.ts - Live event client → Monitor runtime: receives events
- Operator → Desktop GUI: operates
README.md - Operator → Headless runner: starts
README.md - API application → API routes: registers
src/api/main.py - API routes → Monitor runtime: delegates
src/api/deps.py - Monitor runtime → Marketplace adapters: selects adapters
src/api/deps.py - Headless runner → Marketplace adapters: selects adapters
src/main.py - Desktop GUI → Marketplace adapters: uses adapters
src/gui/app.py - Marketplace adapters → Mercari adapter: maps platform
src/monitors/__init__.py - Marketplace adapters → Carousell adapter: maps platform
src/monitors/__init__.py - Marketplace adapters → Yahoo Auctions adapter: maps platform
src/monitors/__init__.py - Mercari adapter → Polling and filtering: inherits
src/monitors/mercari.py - Carousell adapter → Polling and filtering: inherits
src/monitors/carousell.py - Yahoo Auctions adapter → Polling and filtering: inherits
src/monitors/yahoo_auctions.py - Polling and filtering → Marketplace services: polls
README.md - Polling and filtering → JSON configuration: reads settings
src/monitors/base.py - Monitor runtime → SQLite database: reads keywords
src/api/deps.py - Polling and filtering → SQLite database: uses listing state
- JSON configuration → SQLite database: syncs settings
src/config.py - Monitor runtime → Notification dispatcher: constructs
src/api/deps.py - Polling and filtering → Notification dispatcher: notifies
- Notification dispatcher → Telegram: sends messages
README.md - Notification dispatcher → Discord webhook: posts embeds
README.md - Monitor runtime → Event broadcaster: broadcasts events
src/api/deps.py - Notification dispatcher → Event broadcaster: registers callback
src/api/deps.py - Telegram → Telegram command service: sends commands
README.md - Telegram command service → Notification dispatcher: processes commands
- Desktop GUI → SQLite database: uses
src/gui/app.py