# ranit-007/baundule architecture

> Architecture diagram of the GitHub repository ranit-007/baundule, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-16). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ranit-007/baundule
- Repository: https://github.com/ranit-007/baundule

## Overview

Baundule is a streetwear ecommerce storefront with customer accounts and an admin console. Shoppers browse products, manage a cart and wishlist, apply coupons and pay at checkout; customers can also manage account details and submit product reviews. The graph highlights the documented storefront, checkout, review, and catalog-data layers. Many routes and admin capabilities are visible only in the file tree, so their internal calls are not inferred.

Main entry points: [`lib/prisma.ts`](https://github.com/ranit-007/baundule/blob/main/lib/prisma.ts) (Application database), [`app/checkout/checkout-client.tsx`](https://github.com/ranit-007/baundule/blob/main/app/checkout/checkout-client.tsx) (Checkout), [`app/actions/checkout.ts`](https://github.com/ranit-007/baundule/blob/main/app/actions/checkout.ts) (Checkout actions), [`app/product/[slug]/product-client.tsx`](https://github.com/ranit-007/baundule/blob/main/app/product/%5Bslug%5D/product-client.tsx) (Product detail)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_storefront["Storefront"]
  node_home["Home experience<br/>[homepage.tsx]"]
  node_catalog["Shop &amp; collections"]
  node_product["Product detail<br/>[product-client.tsx]"]
  node_productcards["Product cards<br/>[product-card.tsx]"]
end

subgraph group_shopping["Shopping"]
  node_cart["Cart state<br/>[store-provider.tsx]"]
  node_checkoutui["Checkout"]
  node_checkoutactions["Checkout actions<br/>[checkout.ts]"]
  node_paymentaction["Payment verification<br/>[payment.ts]"]
  node_webhook["Payment webhook<br/>[route.ts]"]
end

subgraph group_identity["Accounts &amp; Reviews"]
  node_customer["Account pages"]
  node_auth["Authentication<br/>[auth.ts]"]
  node_reviewsui["Product reviews"]
  node_reviewactions["Review actions<br/>[reviews.ts]"]
  node_reviewservice["Review service<br/>[review-service.ts]"]
end

subgraph group_operations["Store Operations"]
  node_adminui["Admin console"]
  node_adminactions["Admin actions"]
  node_seed["Catalog seeding<br/>[route.ts]"]
end

subgraph group_platform["Platform Services"]
  node_catalogdata["Catalog data<br/>[shop-data.ts]"]
  node_database[("Application database<br/>[prisma.ts]")]
end

node_shopper(("Shopper"))
node_razorpay{{"Razorpay"}}

node_shopper -->|"browses"| node_home
node_shopper -->|"browses"| node_catalog
node_shopper -->|"views"| node_product
node_home -.->|"loads catalog"| node_catalogdata
node_catalog -->|"renders"| node_productcards
node_product -->|"renders related"| node_productcards
node_product -.->|"updates cart"| node_cart
node_cart -->|"syncs cart"| node_database
node_shopper -->|"checks out"| node_checkoutui
node_checkoutui -->|"creates order"| node_checkoutactions
node_checkoutui -->|"validates coupon"| node_checkoutactions
node_checkoutui -->|"verifies payment"| node_paymentaction
node_checkoutactions -->|"reads and writes"| node_database
node_checkoutactions -->|"creates payment"| node_razorpay
node_paymentaction -.->|"verifies payment"| node_razorpay
node_razorpay -->|"sends events"| node_webhook
node_webhook -->|"updates orders"| node_database
node_shopper -->|"manages account"| node_customer
node_customer -->|"reads account"| node_database
node_shopper -->|"manages reviews"| node_reviewsui
node_reviewsui -->|"updates or deletes"| node_reviewactions
node_reviewactions -->|"checks and recalculates"| node_reviewservice
node_reviewactions -->|"reads and writes"| node_database
node_reviewservice -->|"aggregates ratings"| node_database
node_adminui -.->|"invokes"| node_adminactions
node_adminactions -.->|"manages records"| node_database
node_seed -->|"seeds catalog"| node_database
node_seed -->|"checks admin"| node_auth

click node_home "https://github.com/ranit-007/baundule/blob/main/components/home/homepage.tsx"
click node_catalog "https://github.com/ranit-007/baundule/tree/main/app/shop"
click node_product "https://github.com/ranit-007/baundule/blob/main/app/product/%5Bslug%5D/product-client.tsx"
click node_productcards "https://github.com/ranit-007/baundule/blob/main/components/ui/product-card.tsx"
click node_catalogdata "https://github.com/ranit-007/baundule/blob/main/lib/shop-data.ts"
click node_cart "https://github.com/ranit-007/baundule/blob/main/components/providers/store-provider.tsx"
click node_checkoutui "https://github.com/ranit-007/baundule/blob/main/app/checkout/checkout-client.tsx"
click node_checkoutactions "https://github.com/ranit-007/baundule/blob/main/app/actions/checkout.ts"
click node_paymentaction "https://github.com/ranit-007/baundule/blob/main/app/actions/payment.ts"
click node_webhook "https://github.com/ranit-007/baundule/blob/main/app/api/webhooks/razorpay/route.ts"
click node_customer "https://github.com/ranit-007/baundule/tree/main/app/account"
click node_auth "https://github.com/ranit-007/baundule/blob/main/auth.ts"
click node_reviewsui "https://github.com/ranit-007/baundule/blob/main/components/product/reviews-section.tsx"
click node_reviewactions "https://github.com/ranit-007/baundule/blob/main/app/actions/reviews.ts"
click node_reviewservice "https://github.com/ranit-007/baundule/blob/main/lib/review-service.ts"
click node_adminui "https://github.com/ranit-007/baundule/tree/main/app/admin"
click node_adminactions "https://github.com/ranit-007/baundule/tree/main/app/actions"
click node_database "https://github.com/ranit-007/baundule/blob/main/lib/prisma.ts"
click node_seed "https://github.com/ranit-007/baundule/blob/main/app/api/admin/seed/route.ts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_home,node_catalog,node_product,node_productcards toneBlue
class node_cart,node_checkoutui,node_checkoutactions,node_paymentaction,node_webhook toneAmber
class node_customer,node_auth,node_reviewsui,node_reviewactions,node_reviewservice toneMint
class node_adminui,node_adminactions,node_seed toneRose
class node_catalogdata,node_database,node_shopper,node_razorpay toneIndigo
```

## Components

### Storefront

- [Home experience](https://github.com/ranit-007/baundule/blob/main/components/home/homepage.tsx): `components/home/homepage.tsx`
- [Shop & collections](https://github.com/ranit-007/baundule/tree/main/app/shop): `app/shop`
- [Product detail](https://github.com/ranit-007/baundule/blob/main/app/product/%5Bslug%5D/product-client.tsx): `app/product/[slug]/product-client.tsx`
- [Product cards](https://github.com/ranit-007/baundule/blob/main/components/ui/product-card.tsx): `components/ui/product-card.tsx`

### Shopping

- [Cart state](https://github.com/ranit-007/baundule/blob/main/components/providers/store-provider.tsx): `components/providers/store-provider.tsx`
- [Checkout](https://github.com/ranit-007/baundule/blob/main/app/checkout/checkout-client.tsx): `app/checkout/checkout-client.tsx`
- [Checkout actions](https://github.com/ranit-007/baundule/blob/main/app/actions/checkout.ts): `app/actions/checkout.ts`
- [Payment verification](https://github.com/ranit-007/baundule/blob/main/app/actions/payment.ts): `app/actions/payment.ts`
- [Payment webhook](https://github.com/ranit-007/baundule/blob/main/app/api/webhooks/razorpay/route.ts): `app/api/webhooks/razorpay/route.ts`

### Accounts & Reviews

- [Account pages](https://github.com/ranit-007/baundule/tree/main/app/account): `app/account`
- [Authentication](https://github.com/ranit-007/baundule/blob/main/auth.ts): `auth.ts`
- [Product reviews](https://github.com/ranit-007/baundule/blob/main/components/product/reviews-section.tsx): `components/product/reviews-section.tsx`
- [Review actions](https://github.com/ranit-007/baundule/blob/main/app/actions/reviews.ts): `app/actions/reviews.ts`
- [Review service](https://github.com/ranit-007/baundule/blob/main/lib/review-service.ts): `lib/review-service.ts`

### Store Operations

- [Admin console](https://github.com/ranit-007/baundule/tree/main/app/admin): `app/admin`
- [Admin actions](https://github.com/ranit-007/baundule/tree/main/app/actions): `app/actions`
- [Catalog seeding](https://github.com/ranit-007/baundule/blob/main/app/api/admin/seed/route.ts): `app/api/admin/seed/route.ts`

### Platform Services

- [Catalog data](https://github.com/ranit-007/baundule/blob/main/lib/shop-data.ts): `lib/shop-data.ts`
- [Application database](https://github.com/ranit-007/baundule/blob/main/lib/prisma.ts): `lib/prisma.ts`

### Other components

- **Shopper**
- **Razorpay**

## Connections

- Shopper → Home experience: browses
- Shopper → Shop & collections: browses (evidence: `app/shop/shop-client.tsx`)
- Shopper → Product detail: views (evidence: `app/product/[slug]/product-client.tsx`)
- Home experience → Catalog data: loads catalog
- Shop & collections → Product cards: renders (evidence: `app/shop/shop-client.tsx`)
- Product detail → Product cards: renders related (evidence: `app/product/[slug]/product-client.tsx`)
- Product detail → Cart state: updates cart (evidence: `app/product/[slug]/product-client.tsx`)
- Cart state → Application database: syncs cart (evidence: `components/providers/store-provider.tsx`)
- Shopper → Checkout: checks out (evidence: `app/checkout/checkout-client.tsx`)
- Checkout → Checkout actions: creates order (evidence: `app/checkout/checkout-client.tsx`)
- Checkout → Checkout actions: validates coupon (evidence: `app/checkout/checkout-client.tsx`)
- Checkout → Payment verification: verifies payment (evidence: `app/checkout/checkout-client.tsx`)
- Checkout actions → Application database: reads and writes (evidence: `app/actions/checkout.ts`)
- Checkout actions → Razorpay: creates payment (evidence: `app/actions/checkout.ts`)
- Payment verification → Razorpay: verifies payment
- Razorpay → Payment webhook: sends events (evidence: `app/api/webhooks/razorpay/route.ts`)
- Payment webhook → Application database: updates orders (evidence: `app/api/webhooks/razorpay/route.ts`)
- Shopper → Account pages: manages account (evidence: `app/account/page.tsx`)
- Account pages → Application database: reads account (evidence: `app/account/page.tsx`)
- Shopper → Product reviews: manages reviews (evidence: `components/product/reviews-section.tsx`)
- Product reviews → Review actions: updates or deletes (evidence: `components/product/reviews-section.tsx`)
- Review actions → Review service: checks and recalculates (evidence: `app/actions/reviews.ts`)
- Review actions → Application database: reads and writes (evidence: `app/actions/reviews.ts`)
- Review service → Application database: aggregates ratings (evidence: `lib/review-service.ts`)
- Admin console → Admin actions: invokes (evidence: `app/admin/reviews/[id]/review-actions-client.tsx`)
- Admin actions → Application database: manages records (evidence: `app/actions/reviews.ts`)
- Catalog seeding → Application database: seeds catalog (evidence: `app/api/admin/seed/route.ts`)
- Catalog seeding → Authentication: checks admin (evidence: `app/api/admin/seed/route.ts`)
