How jithinkumarkk/ecommerce-app works
This repository is a Next.js fashion storefront prototype. The main journey renders the home page through a widget registry and its banner or product widgets; a separate dynamic product route looks up a product record and renders its detail view, gallery, and category breadcrumb. Navigation is assembled from menu data and shared through a context provider. Product data is local static content; no checkout, persistent store, or external commerce service is evidenced. Some component implementations were not excerpted, so their internal behavior and unshown links are omitted.
Main entry points: ProductView.tsx Product detail view · NavBar.tsx Navigation bar · WidgetRegistry.ts Widget registry · menu.ts Menu definitions
Components 26
Storefront shell
- Root layout
src/app/layout.tsx - Store layout
src/app/(store)/layout.tsx - Header
src/components/layout/Header.tsx - Footer
src/components/layout/Footer.tsx - Icon component
src/components/ui/AppIcon.tsx
Navigation
- Menu context
src/context/MenuContext.tsx - Navigation bar
src/components/layout/NavBar.tsx - Mega menu
src/components/layout/MegaMenu.tsx - Menu definitions
src/data/menu.ts - Store logo
src/components/layout/logo.tsx - Search box
src/components/layout/searchbox.tsx
Home discovery
- Home route
src/app/(store)/page.tsx - Home renderer
src/components/home/HomePageRenderer.tsx - Widget renderer
src/components/widgets/WidgetRenderer.tsx - Widget registry
src/components/widgets/WidgetRegistry.ts - Banner carousel
src/components/home/bannerCarousel.tsx - Carousel content
src/data/carousel.ts - Product carousel
src/components/product/ProductCarousel.tsx
Product catalog
- Product route
src/app/(store)/product/[id]/page.tsx - Product records
src/data/products.ts - Product detail view
src/components/product/ProductView.tsx - Product gallery
src/components/product/ProductGallery.tsx - Breadcrumb
src/components/ui/Breadcrumb.tsx - Product grid
src/components/product/ProductGrid.tsx - Product card
src/components/product/ProductCard.tsx
Other components
- Shopper
Connections 27
- Root layout → Menu context: wraps pages
src/app/layout.tsx - Store layout → Header: renders
src/app/(store)/layout.tsx - Header → Navigation bar: renders
src/components/layout/Header.tsx - Header → Menu context: uses context
src/components/layout/Header.tsx - Menu context → Menu definitions: loads menus
src/context/MenuContext.tsx - Navigation bar → Menu definitions: loads menus
src/components/layout/NavBar.tsx - Navigation bar → Mega menu: renders
src/components/layout/NavBar.tsx - Navigation bar → Store logo: renders
src/components/layout/NavBar.tsx - Navigation bar → Icon component: renders
src/components/layout/NavBar.tsx - Mega menu → Menu definitions: renders menus
src/components/layout/MegaMenu.tsx - Home route → Home renderer: renders
src/app/(store)/page.tsx - Home renderer → Widget renderer: renders
src/components/home/HomePageRenderer.tsx - Widget renderer → Widget registry: selects widgets
src/components/widgets/WidgetRenderer.tsx - Widget registry → Banner carousel: registers
src/components/widgets/WidgetRegistry.ts - Widget registry → Product grid: registers
src/components/widgets/WidgetRegistry.ts - Widget registry → Product card: registers
src/components/widgets/WidgetRegistry.ts - Widget registry → Product carousel: registers
src/components/widgets/WidgetRegistry.ts - Banner carousel → Carousel content: loads slides
src/components/home/bannerCarousel.tsx - Product route → Product records: looks up product
src/app/(store)/product/[id]/page.tsx - Product route → Product detail view: renders details
src/app/(store)/product/[id]/page.tsx - Product detail view → Product records: reads product fields
src/components/product/ProductView.tsx - Product detail view → Menu definitions: finds category
src/components/product/ProductView.tsx - Product detail view → Breadcrumb: renders breadcrumb
src/components/product/ProductView.tsx - Product detail view → Product gallery: renders images
src/components/product/ProductView.tsx - Product detail view → Icon component: renders icons
src/components/product/ProductView.tsx - Product grid → Product records: loads products
src/components/product/ProductGrid.tsx - Product grid → Product card: renders cards
src/components/product/ProductGrid.tsx