# arjun271201/bvm-main architecture

> Architecture diagram of the GitHub repository arjun271201/bvm-main, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-07). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/arjun271201/bvm-main
- Repository: https://github.com/arjun271201/bvm-main

## Overview

This is a devotional-media site and commerce storefront backed by Payload CMS. Visitors browse songs, videos, courses, and products; shoppers add items to a persistent cart, proceed to checkout, and have payments verified through Razorpay. Editors manage the site’s content and homepage through Payload’s admin interface. The source index and excerpts show the CMS configuration and selected client/API relationships; several page-to-data and feature integrations are unsampled, so those links are omitted or marked unverified.

Main entry points: [`src/payload.config.ts`](https://github.com/arjun271201/bvm-main/blob/main/src/payload.config.ts) (Payload configuration), [`src/app/api/checkout/create-order/route.ts`](https://github.com/arjun271201/bvm-main/blob/main/src/app/api/checkout/create-order/route.ts) (Order creation), [`src/app/api/checkout/verify/route.ts`](https://github.com/arjun271201/bvm-main/blob/main/src/app/api/checkout/verify/route.ts) (Payment verification), [`src/app/(frontend)/songs/SongsClient.tsx`](https://github.com/arjun271201/bvm-main/blob/main/src/app/(frontend)/songs/SongsClient.tsx) (Song library)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Visitor experience"]
  node_home["Homepage<br/>[page.tsx]"]
  node_songs["Song library<br/>[SongsClient.tsx]"]
  node_songcard["Song player card<br/>[SongCard.tsx]"]
  node_videos["Video browsing"]
  node_courses["Course browsing<br/>[CoursesClient.tsx]"]
end

subgraph group_commerce["Commerce and payment"]
  node_store["Product storefront<br/>[StoreClient.tsx]"]
  node_cart["Cart state<br/>[CartContext.tsx]"]
  node_checkout["Checkout page<br/>[page.tsx]"]
  node_createorder["Order creation<br/>[route.ts]"]
  node_verify["Payment verification<br/>[route.ts]"]
  node_razorpay["Razorpay"]
end

subgraph group_content["Content management"]
  node_orders[("Orders<br/>[Orders.ts]")]
  node_catalog[("Content collections")]
  node_homepageconfig["Homepage settings<br/>[Homepage.ts]"]
end

subgraph group_platform["CMS platform"]
  node_admin["Payload admin<br/>[page.tsx]"]
  node_payloadconfig["Payload configuration<br/>[payload.config.ts]"]
  node_payloadapi["Payload API<br/>[route.ts]"]
  node_database[("PostgreSQL")]
end

node_visitor(("Visitor"))

node_songs -->|"renders"| node_songcard
node_store -->|"updates"| node_cart
node_checkout -.->|"submits order"| node_createorder
node_createorder -->|"creates and updates"| node_orders
node_createorder -->|"creates payment order"| node_razorpay
node_verify -->|"checks signature"| node_razorpay
node_verify -->|"marks paid"| node_orders
node_payloadconfig -->|"registers collections"| node_catalog
node_payloadconfig -->|"registers global"| node_homepageconfig
node_payloadconfig -->|"configures adapter"| node_database
node_admin -.->|"uses CMS"| node_payloadconfig
node_payloadapi -.->|"uses CMS"| node_payloadconfig
node_visitor -.->|"browses"| node_home
node_visitor -.->|"browses"| node_songs
node_visitor -.->|"browses"| node_videos
node_visitor -.->|"browses"| node_courses
node_visitor -.->|"shops"| node_store

click node_home "https://github.com/arjun271201/bvm-main/blob/main/src/app/(frontend)/page.tsx"
click node_songs "https://github.com/arjun271201/bvm-main/blob/main/src/app/(frontend)/songs/SongsClient.tsx"
click node_songcard "https://github.com/arjun271201/bvm-main/blob/main/src/app/(frontend)/songs/SongCard.tsx"
click node_videos "https://github.com/arjun271201/bvm-main/tree/main/src/app/(frontend)/videos"
click node_courses "https://github.com/arjun271201/bvm-main/blob/main/src/components/CoursesClient.tsx"
click node_store "https://github.com/arjun271201/bvm-main/blob/main/src/app/(frontend)/store/StoreClient.tsx"
click node_cart "https://github.com/arjun271201/bvm-main/blob/main/src/components/cart/CartContext.tsx"
click node_checkout "https://github.com/arjun271201/bvm-main/blob/main/src/app/(frontend)/checkout/page.tsx"
click node_createorder "https://github.com/arjun271201/bvm-main/blob/main/src/app/api/checkout/create-order/route.ts"
click node_verify "https://github.com/arjun271201/bvm-main/blob/main/src/app/api/checkout/verify/route.ts"
click node_orders "https://github.com/arjun271201/bvm-main/blob/main/src/collections/Orders.ts"
click node_catalog "https://github.com/arjun271201/bvm-main/tree/main/src/collections"
click node_homepageconfig "https://github.com/arjun271201/bvm-main/blob/main/src/globals/Homepage.ts"
click node_admin "https://github.com/arjun271201/bvm-main/blob/main/src/app/(payload)/admin/%5B%5B...segments%5D%5D/page.tsx"
click node_payloadconfig "https://github.com/arjun271201/bvm-main/blob/main/src/payload.config.ts"
click node_payloadapi "https://github.com/arjun271201/bvm-main/blob/main/src/app/(payload)/api/%5B...slug%5D/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_songs,node_songcard,node_videos,node_courses toneBlue
class node_store,node_cart,node_checkout,node_createorder,node_verify,node_razorpay toneAmber
class node_orders,node_catalog,node_homepageconfig toneMint
class node_admin,node_payloadconfig,node_payloadapi,node_database toneRose
class node_visitor toneIndigo
```

## Components

### Visitor experience

- [Homepage](https://github.com/arjun271201/bvm-main/blob/main/src/app/(frontend)/page.tsx): `src/app/(frontend)/page.tsx`
- [Song library](https://github.com/arjun271201/bvm-main/blob/main/src/app/(frontend)/songs/SongsClient.tsx): `src/app/(frontend)/songs/SongsClient.tsx`
- [Song player card](https://github.com/arjun271201/bvm-main/blob/main/src/app/(frontend)/songs/SongCard.tsx): `src/app/(frontend)/songs/SongCard.tsx`
- [Video browsing](https://github.com/arjun271201/bvm-main/tree/main/src/app/(frontend)/videos): `src/app/(frontend)/videos`
- [Course browsing](https://github.com/arjun271201/bvm-main/blob/main/src/components/CoursesClient.tsx): `src/components/CoursesClient.tsx`

### Commerce and payment

- [Product storefront](https://github.com/arjun271201/bvm-main/blob/main/src/app/(frontend)/store/StoreClient.tsx): `src/app/(frontend)/store/StoreClient.tsx`
- [Cart state](https://github.com/arjun271201/bvm-main/blob/main/src/components/cart/CartContext.tsx): `src/components/cart/CartContext.tsx`
- [Checkout page](https://github.com/arjun271201/bvm-main/blob/main/src/app/(frontend)/checkout/page.tsx): `src/app/(frontend)/checkout/page.tsx`
- [Order creation](https://github.com/arjun271201/bvm-main/blob/main/src/app/api/checkout/create-order/route.ts): `src/app/api/checkout/create-order/route.ts`
- [Payment verification](https://github.com/arjun271201/bvm-main/blob/main/src/app/api/checkout/verify/route.ts): `src/app/api/checkout/verify/route.ts`
- **Razorpay**

### Content management

- [Orders](https://github.com/arjun271201/bvm-main/blob/main/src/collections/Orders.ts): `src/collections/Orders.ts`
- [Content collections](https://github.com/arjun271201/bvm-main/tree/main/src/collections): `src/collections`
- [Homepage settings](https://github.com/arjun271201/bvm-main/blob/main/src/globals/Homepage.ts): `src/globals/Homepage.ts`

### CMS platform

- [Payload admin](https://github.com/arjun271201/bvm-main/blob/main/src/app/(payload)/admin/%5B%5B...segments%5D%5D/page.tsx): `src/app/(payload)/admin/[[...segments]]/page.tsx`
- [Payload configuration](https://github.com/arjun271201/bvm-main/blob/main/src/payload.config.ts): `src/payload.config.ts`
- [Payload API](https://github.com/arjun271201/bvm-main/blob/main/src/app/(payload)/api/%5B...slug%5D/route.ts): `src/app/(payload)/api/[...slug]/route.ts`
- **PostgreSQL**

### Other components

- **Visitor**

## Connections

- Song library → Song player card: renders (evidence: `src/app/(frontend)/songs/SongsClient.tsx`)
- Product storefront → Cart state: updates (evidence: `src/app/(frontend)/store/StoreClient.tsx`)
- Checkout page → Order creation: submits order
- Order creation → Orders: creates and updates (evidence: `src/app/api/checkout/create-order/route.ts`)
- Order creation → Razorpay: creates payment order (evidence: `src/app/api/checkout/create-order/route.ts`)
- Payment verification → Razorpay: checks signature (evidence: `src/app/api/checkout/verify/route.ts`)
- Payment verification → Orders: marks paid (evidence: `src/app/api/checkout/verify/route.ts`)
- Payload configuration → Content collections: registers collections (evidence: `src/payload.config.ts`)
- Payload configuration → Homepage settings: registers global (evidence: `src/payload.config.ts`)
- Payload configuration → PostgreSQL: configures adapter (evidence: `src/payload.config.ts`)
- Payload admin → Payload configuration: uses CMS
- Payload API → Payload configuration: uses CMS
- Visitor → Homepage: browses
- Visitor → Song library: browses
- Visitor → Video browsing: browses
- Visitor → Course browsing: browses
- Visitor → Product storefront: shops
