How mehedilabs/bazar-dor works
BazarDor is a Bangladesh market-price browsing app with a parallel account-management capability. The main browse flow loads product data from the configured REST API, presents it on the homepage or category pages, and lets users open market-level product details; authentication supports registration, social sign-in, and profile updates. The graph includes documented ticker, trend, and category-navigation features. Some relationships for unsampled sign-in and layout components are based on README descriptions and the source index, not inspected implementation details.
Main entry points: api.ts Market API client · auth-client.ts Auth client · page.tsx Home route · auth.ts Auth configuration
Components 30
Price browsing
- Home route
src/app/page.tsx - Category route
src/app/category/[slug]/page.tsx - Product route
src/app/product/[slug]/page.tsx - Market API client
src/lib/api.ts - Product data model
src/types/product.ts - Price utilities
src/lib/utils.ts
Market presentation
- Hero section
src/components/home/Hero.tsx - Trend sections
src/components/home/ProductSections.tsx - Category products
src/components/category/CategoryProducts.tsx - Product card
src/components/product/ProductCard.tsx - Price details
src/components/product/ProductDetails.tsx - Price ticker
src/components/layout/PriceTicker.tsx - Ticker loader
src/components/layout/PriceTickerLoader.tsx - Category navigation
src/components/layout/CategoryNav.tsx - Category loader
src/components/layout/CategoryNavLoader.tsx - Site header
src/components/layout/Header.tsx - Market footer
src/components/layout/Footer.tsx
Accounts
- User information
src/components/Userinfo.tsx - Sign-in page
src/app/signin/page.tsx - Sign-up page
src/app/signup/page.tsx - Profile page
src/app/profile/page.tsx - OAuth feedback
src/components/auth/OAuthSuccessToast.tsx - Auth client
src/lib/auth-client.ts
Application runtime
- Auth endpoint
src/app/api/auth/[...all]/route.ts - Auth configuration
src/lib/auth.ts - Route proxy
src/proxy.ts
Other components
- Visitor
- BazarDor REST API
- MongoDB
- Google / GitHub
Connections 34
- Visitor → Home route: opens
README.md - Home route → Market API client: loads products
src/app/page.tsx - Market API client → BazarDor REST API: fetches data
src/lib/api.ts - Home route → Hero section: renders
src/app/page.tsx - Home route → Trend sections: renders products
src/app/page.tsx - Trend sections → Product card: renders cards
src/components/home/ProductSections.tsx - Visitor → Category route: browses category
README.md - Category route → Market API client: loads category data
src/app/category/[slug]/page.tsx - Category route → Category products: renders listings
src/app/category/[slug]/page.tsx - Category products → Product card: renders cards
src/components/category/CategoryProducts.tsx - Visitor → Product route: opens product
README.md - Product route → Market API client: loads product
src/app/product/[slug]/page.tsx - Product route → Price details: renders details
src/app/product/[slug]/page.tsx - Ticker loader → Market API client: loads prices
src/components/layout/PriceTickerLoader.tsx - Ticker loader → Price ticker: renders ticker
src/components/layout/PriceTickerLoader.tsx - Category loader → Market API client: loads categories
src/components/layout/CategoryNavLoader.tsx - Category loader → Category navigation: renders navigation
src/components/layout/CategoryNavLoader.tsx - Site header → User information: renders account
src/components/layout/Header.tsx - Visitor → Sign-in page: signs in
README.md - Visitor → Sign-up page: registers
README.md - Sign-up page → Auth client: submits credentials
src/app/signup/page.tsx - Sign-in page → Auth client: authenticates
src/app/signin/page.tsx - Profile page → Auth client: manages session
src/app/profile/page.tsx - User information → Auth client: reads account
src/components/Userinfo.tsx - OAuth feedback → Auth client: checks session
src/components/auth/OAuthSuccessToast.tsx - Auth client → Auth endpoint: calls auth service
- Auth endpoint → Auth configuration: dispatches requests
src/app/api/auth/[...all]/route.ts - Auth configuration → MongoDB: stores auth data
src/lib/auth.ts - Auth configuration → Google / GitHub: configures OAuth
src/lib/auth.ts - Route proxy → Auth configuration: checks access
src/proxy.ts - Market API client → Product data model: uses product types
src/lib/api.ts - Price details → Price utilities: formats prices
src/components/product/ProductDetails.tsx - Category products → Price utilities: sorts prices
src/components/category/CategoryProducts.tsx - Market footer → Visitor: shows disclaimer
README.md