How mahmudulhasanmaruf78/b14-a7-bazar-dor works
BazarDor is a Bengali-language market-price application. The main visitor flow loads product and category data for the home page, presents price movement and a searchable, sortable catalog, then routes product selections to market-level details; category pages provide a separate browse path. Authentication supports protected details, email/social sign-in, and profile updates. Edges are limited to calls and page composition shown in excerpts or the README; several page and authentication links are documented rather than source-sampled.
Main entry points: page.tsx Home page · api.ts Price API client · auth.ts BetterAuth server · ProductCard.tsx Product cards
Components 26
Market data
- Price API client
src/lib/api.ts - Market price service
Price browsing
- Home page
src/app/page.tsx - Price ticker
src/components/PriceTicker.tsx - Hero banner
src/components/Hero.tsx - Search and sort
src/components/HomeProductList.tsx - Sort controls
src/components/SortDropdown.tsx - Product cards
src/components/ProductCard.tsx - Category page
src/app/category/[slug]/page.tsx - Category results
src/app/category/[slug]/CategoryView.tsx
Product details
- Product page
src/app/product/[slug]/page.tsx - Market breakdown
src/app/product/[slug]/ProductDetailClient.tsx
Accounts
- Auth state
src/context/AuthContext.tsx - Auth client
src/lib/auth-client.ts - Sign-in page
src/app/signin/page.tsx - Sign-up page
src/app/signup/page.tsx - Auth endpoint
src/app/api/auth/[...all]/route.ts - BetterAuth server
src/lib/auth.ts - MongoDB client
src/lib/mongodb.ts - Mongo helper
src/lib/mongo-helper.ts - MongoDB
- Profile page
src/app/profile/page.tsx - Profile update
src/app/profile/update/page.tsx
Other components
- Visitor
- Google OAuth
- GitHub OAuth
Connections 35
- Visitor → Home page: opens
README.md - Home page → Price API client: loads prices
src/app/page.tsx - Price API client → Market price service: fetches data
src/lib/api.ts - Home page → Price ticker: renders
src/app/page.tsx - Home page → Hero banner: renders
src/app/page.tsx - Home page → Search and sort: renders
src/app/page.tsx - Home page → Product cards: renders
src/app/page.tsx - Search and sort → Product cards: renders
src/components/HomeProductList.tsx - Search and sort → Sort controls: uses
src/components/HomeProductList.tsx - Price ticker → Price API client: imports
src/components/PriceTicker.tsx - Visitor → Category page: browses
README.md - Category page → Price API client: loads products
src/app/category/[slug]/page.tsx - Category page → Category results: renders
src/app/category/[slug]/page.tsx - Category results → Price API client: uses data
src/app/category/[slug]/CategoryView.tsx - Category results → Product cards: renders
src/app/category/[slug]/CategoryView.tsx - Product cards → Product page: links to
src/components/ProductCard.tsx - Product page → Price API client: loads product
src/app/product/[slug]/page.tsx - Product page → Market breakdown: renders
src/app/product/[slug]/page.tsx - Market breakdown → Auth state: checks access
src/app/product/[slug]/ProductDetailClient.tsx - Visitor → Sign-in page: signs in
README.md - Visitor → Sign-up page: registers
README.md - Sign-in page → Auth client: calls
src/app/signin/page.tsx - Sign-up page → Auth client: calls
src/app/signup/page.tsx - Auth state → Auth client: calls
src/context/AuthContext.tsx - Auth client → Auth endpoint: requests
- Auth endpoint → BetterAuth server: delegates
src/app/api/auth/[...all]/route.ts - BetterAuth server → MongoDB client: configures adapter
src/lib/auth.ts - MongoDB client → Mongo helper: uses
src/lib/mongodb.ts - MongoDB client → MongoDB: connects
- BetterAuth server → Google OAuth: OAuth
src/lib/auth.ts - BetterAuth server → GitHub OAuth: OAuth
src/lib/auth.ts - Visitor → Profile page: views
README.md - Visitor → Profile update: updates
README.md - Profile page → Auth state: uses state
src/app/profile/page.tsx - Profile update → Auth state: updates user
src/app/profile/update/page.tsx