How rahat-karim5452/bazar-dor-web-app works
BazarDor is a daily essential-goods price browser: visitors scan headline price movements, browse and sort category listings, then open market-level price details. Detailed product prices require sign-in; users can create accounts, authenticate with email or social providers, view and update their profile, and sign out. Price data is fetched from the documented external API, while BetterAuth handles account flows. The sampled files show the product-data and authentication call sites; other feature links below rely on README statements where noted.
Main entry points: auth-client.ts Auth client · api.ts Price data client · use-require-auth.ts Session guard · page.tsx Profile
Components 23
Price discovery
- Home page
src/app/page.tsx - Hero section
src/app/components/HeroSection.tsx - Price ticker
src/app/components/Marquee.tsx - Category navigation
src/app/components/Navbar.tsx - Price movers
src/app/components/ProductCards.tsx - Category browser
src/app/category/[slug]/page.tsx - Shared site layout
src/app/layout.tsx
Product details
- Product detail
src/app/product/[slug]/page.tsx
Accounts
- Session guard
src/lib/use-require-auth.ts - Sign in
src/app/signin/page.tsx - Sign up
src/app/signup/page.tsx - Social sign-in
src/app/components/SocialAuthButtons.tsx - Auth client
src/lib/auth-client.ts - Auth endpoint
src/app/api/auth/[...all]/route.ts - Auth server
src/lib/auth.ts - Profile
src/app/profile/page.tsx - Profile update
src/app/profile/update/page.tsx - Profile menu
src/app/components/UserProfileMenu.tsx
External services
- Price data client
src/lib/api.ts - BazarDor API
- Google and GitHub
- MongoDB Atlas
Other components
- Market visitor
Connections 36
- Market visitor → Home page: browses
README.md - Home page → Hero section: renders
src/app/page.tsx - Home page → Price movers: renders
src/app/page.tsx - Shared site layout → Category navigation: renders
src/app/layout.tsx - Shared site layout → Price ticker: renders
src/app/layout.tsx - Shared site layout → Home page: wraps
- Price ticker → Price data client: loads prices
src/app/components/Marquee.tsx - Price movers → Price data client: loads products
src/app/components/ProductCards.tsx - Category navigation → Price data client: loads categories
src/app/components/Navbar.tsx - Market visitor → Category browser: browses category
README.md - Category browser → Price data client: loads listings
src/app/category/[slug]/page.tsx - Category browser → Product detail: opens product
- Market visitor → Product detail: requests details
README.md - Product detail → Session guard: checks session
src/app/product/[slug]/page.tsx - Product detail → Price data client: loads product data
src/app/product/[slug]/page.tsx - Price data client → BazarDor API: fetches prices
src/lib/api.ts - Market visitor → Sign in: signs in
README.md - Market visitor → Sign up: creates account
README.md - Sign up → Auth client: registers email
src/app/signup/page.tsx - Sign in → Auth client: authenticates email
src/app/signin/page.tsx - Sign in → Social sign-in: offers providers
src/app/signin/page.tsx - Sign up → Social sign-in: offers providers
src/app/signup/page.tsx - Social sign-in → Auth client: starts social sign-in
src/app/components/SocialAuthButtons.tsx - Auth client → Auth endpoint: calls auth API
- Auth endpoint → Auth server: dispatches requests
src/app/api/auth/[...all]/route.ts - Auth client → Google and GitHub: uses OAuth
README.md - Market visitor → Profile: views account
README.md - Profile → Session guard: checks session
src/app/profile/page.tsx - Profile → Auth client: signs out
src/app/profile/page.tsx - Profile → Profile update: opens update
src/app/profile/page.tsx - Profile update → Session guard: checks session
src/app/profile/update/page.tsx - Profile update → Auth client: updates account
src/app/profile/update/page.tsx - Profile menu → Auth client: reads session
src/app/components/UserProfileMenu.tsx - Profile menu → Session guard: uses guard
src/app/components/UserProfileMenu.tsx - Session guard → Auth client: reads session
src/lib/use-require-auth.ts - Auth server → MongoDB Atlas: persists accounts
README.md