How timewithpotato/bazardor works
BazarDor lets Dhaka shoppers compare accepted community prices with official TCB ranges, submit reports for filtering, inspect all report statuses, and view market-wide summaries. The frontend routes those workflows through a shared API client; FastAPI provides catalog, reporting, feed, trend, and overview endpoints backed by SQLAlchemy and SQLite. The README documents the main capabilities and report-filter behavior; some backend route implementations and frontend pages were not excerpted, so their links are limited to documented API calls and routing.
Main entry points: main.py HTTP API · App.jsx App navigation · ComparePage.jsx Area comparison · api.js API client
Components 23
Shopper interface
- App navigation
frontend/src/App.jsx - Area comparison
frontend/src/pages/ComparePage.jsx - Price reporting
frontend/src/pages/ReportPage.jsx - Live reports
frontend/src/pages/FeedPage.jsx - Market overview
frontend/src/pages/OverviewPage.jsx - Price ruler
frontend/src/components/PriceRuler.jsx - Product picker
frontend/src/components/ProductPicker.jsx - Price trend chart
frontend/src/components/Sparkline.jsx - Status and errors
frontend/src/components/States.jsx - Async state helpers
frontend/src/hooks.js - API client
frontend/src/api.js
Price services
- HTTP API
backend/app/main.py - Report submission
backend/app/main.py - Outlier and trust checks
backend/app/outlier.py - Area price feed
backend/app/main.py - Recent reports
backend/app/main.py - Price trend
backend/app/main.py - Market overview
backend/app/main.py
Catalog and persistence
- DB sessions
backend/app/database.py - Domain models
backend/app/models.py - API schemas
backend/app/schemas.py - Demo data seeding
backend/app/seed.py
Other components
- Shopper
Connections 37
- Shopper → App navigation: uses
README.md - App navigation → Area comparison: routes to
frontend/src/App.jsx - App navigation → Price reporting: routes to
frontend/src/App.jsx - App navigation → Live reports: routes to
frontend/src/App.jsx - App navigation → Market overview: routes to
frontend/src/App.jsx - App navigation → API client: loads catalog via
frontend/src/App.jsx - App navigation → Async state helpers: tracks loading via
frontend/src/App.jsx - Area comparison → API client: requests prices via
frontend/src/pages/ComparePage.jsx - Area comparison → Price ruler: renders
frontend/src/pages/ComparePage.jsx - Area comparison → Product picker: renders
frontend/src/pages/ComparePage.jsx - Area comparison → Price trend chart: renders
frontend/src/pages/ComparePage.jsx - Area comparison → Async state helpers: loads data with
frontend/src/pages/ComparePage.jsx - Price reporting → API client: submits reports via
frontend/src/pages/ReportPage.jsx - Live reports → API client: requests reports via
frontend/src/pages/FeedPage.jsx - Market overview → API client: requests summary via
frontend/src/pages/OverviewPage.jsx - Area comparison → Status and errors: shows errors via
frontend/src/pages/ComparePage.jsx - Price reporting → Status and errors: shows status via
frontend/src/pages/ReportPage.jsx - Live reports → Status and errors: shows status via
frontend/src/pages/FeedPage.jsx - Market overview → Status and errors: shows states via
frontend/src/pages/OverviewPage.jsx - API client → HTTP API: requests endpoints
frontend/src/api.js - HTTP API → Report submission: dispatches submit
README.md - HTTP API → Area price feed: dispatches feed
README.md - HTTP API → Recent reports: dispatches recent
README.md - HTTP API → Price trend: dispatches trend
backend/app/main.py - HTTP API → Market overview: dispatches overview
README.md - HTTP API → Domain models: queries domain data
backend/app/main.py - Report submission → Outlier and trust checks: evaluates report
README.md - Outlier and trust checks → Report submission: returns verdict
README.md - Report submission → DB sessions: persists report
backend/app/main.py - Area price feed → DB sessions: reads accepted reports
backend/app/main.py - Recent reports → DB sessions: reads submissions
backend/app/main.py - Price trend → DB sessions: reads accepted reports
backend/app/main.py - Market overview → DB sessions: reads market data
backend/app/main.py - DB sessions → Domain models: provides ORM base
backend/app/models.py - Demo data seeding → Domain models: creates demo records
backend/app/seed.py - Demo data seeding → Outlier and trust checks: evaluates sample reports
backend/app/seed.py - HTTP API → API schemas: validates responses
backend/app/main.py