How rohanislambd/bazar-dor-nextjs-app works
Bazar-Dor is a Bengali grocery-price browsing app with account registration, sign-in, and profile access. The main browsing flow loads products for the home page, highlights price risers and fallers, and lets shoppers open a category or product detail. Authentication uses Better Auth with MongoDB persistence and Google/GitHub sign-in. The README is the default Next.js template and documents no additional product capabilities; relationships below are limited to source excerpts and indexed references.
Main entry points: type.ts Catalog Types · Products.tsx Product Listings · auth-client.ts Auth Client · page.tsx Category Page
Components 29
Storefront
- Home Page
src/app/page.tsx - Category Page
src/app/category/[categoryId]/page.tsx - Product Page
src/app/products/[productId]/page.tsx - Banner
src/components/Banner.tsx - Site Layout
src/app/layout.tsx
Price Catalog
- Product Listings
src/components/Products.tsx - Category Sorting
src/components/CategoryProductSorting.tsx - Product Card
src/components/ProductCard.tsx - Product Detail Card
src/components/ProductDetailCard.tsx - Category Header
src/components/CategoryHeader.tsx
Accounts
- Profile Page
src/app/profile/page.tsx - Sign In
src/app/signin/page.tsx - Sign Up
src/app/signup/page.tsx - Auth API Route
src/app/api/auth/[...all]/route.ts - Auth Server
src/lib/auth.ts - Auth Client
src/lib/auth-client.ts - User Info
src/components/UserInfo.tsx - Auth Redirect Toast
src/components/AuthRedirectToast.tsx
Shared UI
- Header
src/components/Header.tsx - Navigation Links
src/components/Navlinks.tsx - Category Links
src/components/CategoryLinks.tsx - Marquee
src/components/Marquee.tsx - Footer
src/components/Footer.tsx - Catalog Types
src/types/type.ts - Bangla Number Formatter
src/components/shared/common.ts
Other components
- Shopper
- MongoDB
- Google Sign-In
- GitHub Sign-In
Connections 41
- Shopper → Home Page: browses
src/app/page.tsx - Shopper → Category Page: opens category
src/app/category/[categoryId]/page.tsx - Shopper → Product Page: opens product
src/app/products/[productId]/page.tsx - Shopper → Sign In: signs in
src/app/signin/page.tsx - Shopper → Sign Up: registers
src/app/signup/page.tsx - Home Page → Banner: renders
src/app/page.tsx - Home Page → Product Listings: renders
src/app/page.tsx - Product Listings → Product Card: renders
src/components/Products.tsx - Product Listings → Catalog Types: uses types
src/components/Products.tsx - Product Listings → Bangla Number Formatter: formats counts
src/components/Products.tsx - Product Listings → Shopper: fetches prices
src/components/Products.tsx - Category Page → Shopper: fetches category prices
src/app/category/[categoryId]/page.tsx - Category Page → Category Header: renders
src/app/category/[categoryId]/page.tsx - Category Page → Category Sorting: renders
src/app/category/[categoryId]/page.tsx - Category Sorting → Product Card: renders
src/components/CategoryProductSorting.tsx - Category Sorting → Bangla Number Formatter: formats values
src/components/CategoryProductSorting.tsx - Category Sorting → Catalog Types: uses types
src/components/CategoryProductSorting.tsx - Product Page → Product Detail Card: renders
src/app/products/[productId]/page.tsx - Product Page → Catalog Types: uses types
src/app/products/[productId]/page.tsx - Product Card → Bangla Number Formatter: formats prices
src/components/ProductCard.tsx - Product Card → Catalog Types: uses types
src/components/ProductCard.tsx - Category Header → Bangla Number Formatter: formats values
src/components/CategoryHeader.tsx - Category Header → Catalog Types: uses types
src/components/CategoryHeader.tsx - Site Layout → Header: renders
src/app/layout.tsx - Site Layout → Marquee: renders
src/app/layout.tsx - Site Layout → Footer: renders
src/app/layout.tsx - Header → Navigation Links: renders
src/components/Header.tsx - Header → User Info: renders
src/components/Header.tsx - Navigation Links → Category Links: renders
src/components/Navlinks.tsx - Navigation Links → Catalog Types: uses types
src/components/Navlinks.tsx - Category Links → Catalog Types: uses types
src/components/CategoryLinks.tsx - Sign In → Auth Client: calls
src/app/signin/page.tsx - Sign In → Auth Redirect Toast: renders
src/app/signin/page.tsx - Sign Up → Auth Client: calls
src/app/signup/page.tsx - Profile Page → Auth Client: reads session
src/app/profile/page.tsx - User Info → Auth Client: reads session
src/components/UserInfo.tsx - Auth API Route → Auth Server: dispatches
src/app/api/auth/[...all]/route.ts - Auth Server → MongoDB: persists auth data
src/lib/auth.ts - Auth Client → Auth API Route: uses auth API
- Auth Server → Google Sign-In: configures provider
src/lib/auth.ts - Auth Server → GitHub Sign-In: configures provider
src/lib/auth.ts