How prajwal471/nayantara-ecommerce-website works
Nayantara is a Next.js storefront with product browsing, product purchase pages, order-history email, and an administrative area for products and orders. The visible path is customer browsing to a product purchase page; the purchase form and payment completion details are not sampled, so their internal transitions are left out. Admin product listing, order history, email, and database behavior are represented where the source index shows connections. Several README claims, including authentication, cart, search, and filtering, are not corroborated by the tree or sampled relationships.
Main entry points: (customerFacing)/page.tsx Home page · db.ts Prisma database · ProductCard.tsx Product card · products/page.tsx Product management
Components 28
Storefront
- Home page
src/app/(customerFacing)/page.tsx - Product catalog
src/app/(customerFacing)/products/page.tsx - Product card
src/components/ProductCard.tsx - Hero section
src/components/HeroSection.tsx - Featured carousel
src/components/ScrollingProductSection .tsx
Checkout and orders
- Purchase page
src/app/(customerFacing)/products/[id]/purchase/page.tsx - Checkout form
src/app/(customerFacing)/products/[id]/purchase/_components/CheckoutForm.tsx - Purchase success
src/app/(customerFacing)/stripe/purchase-success/page.tsx - Order history action
src/actions/orders.tsx - Order history page
src/app/(customerFacing)/orders/page.tsx - History email
src/email/OrderHistory.tsx - Order details
src/email/components/OrderInformation.tsx - Purchase receipt
src/email/PurchaseReceipt.tsx - Stripe webhook
src/app/webhooks/stripe/route.tsx
Administration
- Product management
src/app/admin/products/page.tsx - Product editor
src/app/admin/products/_components/ProductForm.tsx - Product actions
src/app/admin/products/_components/ProductActions.tsx - Order management
src/app/admin/orders/page.tsx - Order actions
src/app/admin/orders/_components/OrderActions.tsx - User management
src/app/admin/users/page.tsx
Shared services
- Prisma database
src/db/db.ts - Page cache
src/lib/cache.ts - Formatters
src/lib/formatters.ts - Button primitive
src/components/ui/button.tsx - Card primitive
src/components/ui/card.tsx - Dropdown primitive
src/components/ui/dropdown-menu.tsx - Table primitive
src/components/ui/table.tsx
Other components
- Customer
Connections 36
- Customer → Home page: browses
README.md - Customer → Product catalog: browses
README.md - Customer → Purchase page: starts purchase
- Home page → Prisma database: queries products
src/app/(customerFacing)/page.tsx - Home page → Page cache: caches queries
src/app/(customerFacing)/page.tsx - Home page → Product card: renders products
src/app/(customerFacing)/page.tsx - Home page → Hero section: renders
src/app/(customerFacing)/page.tsx - Home page → Featured carousel: renders
src/app/(customerFacing)/page.tsx - Product catalog → Prisma database: queries products
src/app/(customerFacing)/products/page.tsx - Product catalog → Page cache: uses cache
src/app/(customerFacing)/products/page.tsx - Product catalog → Product card: renders products
src/app/(customerFacing)/products/page.tsx - Product card → Formatters: formats price
src/components/ProductCard.tsx - Purchase page → Prisma database: loads product
src/app/(customerFacing)/products/[id]/purchase/page.tsx - Purchase page → Checkout form: renders form
src/app/(customerFacing)/products/[id]/purchase/page.tsx - Order history action → Prisma database: reads orders
src/actions/orders.tsx - Order history action → History email: sends email
src/actions/orders.tsx - History email → Order details: renders details
src/email/OrderHistory.tsx - Purchase receipt → Order details: renders details
src/email/PurchaseReceipt.tsx - Stripe webhook → Prisma database: updates orders
src/app/webhooks/stripe/route.tsx - Stripe webhook → Purchase receipt: sends receipt
src/app/webhooks/stripe/route.tsx - Product management → Prisma database: queries products
src/app/admin/products/page.tsx - Product management → Formatters: formats values
src/app/admin/products/page.tsx - Product management → Product actions: renders actions
src/app/admin/products/page.tsx - Product actions → Dropdown primitive: uses menu
src/app/admin/products/_components/ProductActions.tsx - Product actions → Product editor: edits through
- Order management → Prisma database: queries orders
src/app/admin/orders/page.tsx - Order management → Formatters: formats values
src/app/admin/orders/page.tsx - Order management → Order actions: renders actions
src/app/admin/orders/page.tsx - Order actions → Dropdown primitive: uses menu
src/app/admin/orders/_components/OrderActions.tsx - User management → Prisma database: queries users
src/app/admin/users/page.tsx - Order management → Table primitive: renders table
src/app/admin/orders/page.tsx - Product management → Table primitive: renders table
src/app/admin/products/page.tsx - Product card → Card primitive: uses card
src/components/ProductCard.tsx - Product card → Button primitive: uses button
src/components/ProductCard.tsx - Home page → Button primitive: uses button
src/app/(customerFacing)/page.tsx - Order history action → Order details: formats currency
src/email/components/OrderInformation.tsx