# vsgh-india/vsgh-website architecture

> Architecture diagram of the GitHub repository vsgh-india/vsgh-website, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/vsgh-india/vsgh-website
- Repository: https://github.com/vsgh-india/vsgh-website

## Overview

VSGH is a Next.js corporate website presenting company, materials, technology, applications, research, sustainability, insights, careers, and contact information. A visitor enters through routed pages; page data is resolved from local content with a Sanity content path available, then rendered through domain views and shared presentation components. The repository also includes preview and revalidation endpoints, plus indexing and SEO behavior. Sanity is described in the README as not yet wired to a VSGH project, so its runtime connection is shown as unverified. Some domain implementations are represented by their exact content or route paths because their source was not sampled.

Main entry points: [`src/app`](https://github.com/vsgh-india/vsgh-website/tree/main/src/app) (Domain pages), [`src/content/resolve.ts`](https://github.com/vsgh-india/vsgh-website/blob/main/src/content/resolve.ts) (Content resolver), [`src/app/page.tsx`](https://github.com/vsgh-india/vsgh-website/blob/main/src/app/page.tsx) (Home page), [`src/app/insights`](https://github.com/vsgh-india/vsgh-website/tree/main/src/app/insights) (Insights pages)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Website experience"]
  node_home["Home page<br/>[page.tsx]"]
  node_domainroutes["Domain pages"]
  node_insightsroute["Insights pages"]
  node_contactroute["Contact page<br/>[page.tsx]"]
  node_layout["Site layout<br/>[layout.tsx]"]
  node_homecomponents["Home sections"]
end

subgraph group_content["Content and rendering"]
  node_capabilityview["Capability view"]
  node_aboutview["About view"]
  node_articleview["Article view"]
  node_pagebuilder["Page builder<br/>[page-builder.tsx]"]
  node_contentdata["Domain content"]
  node_resolver["Content resolver<br/>[resolve.ts]"]
end

subgraph group_cms["CMS and preview"]
  node_sanityfetch["Sanity fetch<br/>[fetch.ts]"]
  node_sanityschema["Sanity schemas"]
  node_preview["Preview session<br/>[preview-session.ts]"]
  node_previewapi["Preview endpoints<br/>[route.ts]"]
  node_revalidateapi["Revalidation endpoint<br/>[route.ts]"]
  node_revalidation["Revalidation logic<br/>[revalidate.ts]"]
end

subgraph group_platform["Web platform"]
  node_seo["SEO metadata<br/>[seo.ts]"]
  node_indexing["Indexing policy<br/>[indexing.ts]"]
  node_security["Security controls"]
end

node_visitor(("Visitor"))
node_sanity[("Sanity CMS")]

node_visitor -->|"opens"| node_home
node_visitor -.->|"opens"| node_domainroutes
node_visitor -.->|"opens"| node_insightsroute
node_visitor -->|"opens"| node_contactroute
node_home -->|"renders"| node_homecomponents
node_domainroutes -->|"uses fallbacks"| node_contentdata
node_domainroutes -->|"routes through"| node_capabilityview
node_domainroutes -->|"routes through"| node_aboutview
node_domainroutes -->|"resolves content"| node_resolver
node_insightsroute -->|"resolves articles"| node_resolver
node_insightsroute -->|"renders"| node_articleview
node_contactroute -->|"resolves content"| node_resolver
node_resolver -->|"uses fallback content"| node_contentdata
node_resolver -.->|"may fetch"| node_sanityfetch
node_sanityfetch -.->|"queries"| node_sanity
node_sanityschema -.->|"defines content for"| node_sanity
node_capabilityview -->|"renders blocks"| node_pagebuilder
node_domainroutes -->|"checks session"| node_preview
node_previewapi -->|"sets preview mode"| node_preview
node_revalidateapi -->|"invokes"| node_revalidation
node_revalidation -->|"checks security policy"| node_security
node_home -->|"sets metadata"| node_seo
node_seo -->|"gets robots metadata"| node_indexing
node_contactroute -->|"sets metadata"| node_seo

click node_home "https://github.com/vsgh-india/vsgh-website/blob/main/src/app/page.tsx"
click node_domainroutes "https://github.com/vsgh-india/vsgh-website/tree/main/src/app"
click node_insightsroute "https://github.com/vsgh-india/vsgh-website/tree/main/src/app/insights"
click node_contactroute "https://github.com/vsgh-india/vsgh-website/blob/main/src/app/contact/page.tsx"
click node_layout "https://github.com/vsgh-india/vsgh-website/blob/main/src/app/layout.tsx"
click node_homecomponents "https://github.com/vsgh-india/vsgh-website/tree/main/src/components/home"
click node_capabilityview "https://github.com/vsgh-india/vsgh-website/blob/main/src/components/domain/capability-page-view.tsx"
click node_aboutview "https://github.com/vsgh-india/vsgh-website/blob/main/src/components/about/about-page-view.tsx"
click node_articleview "https://github.com/vsgh-india/vsgh-website/blob/main/src/components/domain/insight-article-view.tsx"
click node_pagebuilder "https://github.com/vsgh-india/vsgh-website/blob/main/src/components/cms/page-builder.tsx"
click node_contentdata "https://github.com/vsgh-india/vsgh-website/tree/main/src/content"
click node_resolver "https://github.com/vsgh-india/vsgh-website/blob/main/src/content/resolve.ts"
click node_sanityfetch "https://github.com/vsgh-india/vsgh-website/blob/main/src/sanity/fetch.ts"
click node_sanityschema "https://github.com/vsgh-india/vsgh-website/tree/main/src/sanity/schema"
click node_preview "https://github.com/vsgh-india/vsgh-website/blob/main/src/sanity/preview-session.ts"
click node_previewapi "https://github.com/vsgh-india/vsgh-website/blob/main/src/app/api/draft/route.ts"
click node_revalidateapi "https://github.com/vsgh-india/vsgh-website/blob/main/src/app/api/revalidate/route.ts"
click node_revalidation "https://github.com/vsgh-india/vsgh-website/blob/main/src/sanity/revalidate.ts"
click node_seo "https://github.com/vsgh-india/vsgh-website/blob/main/src/lib/seo.ts"
click node_indexing "https://github.com/vsgh-india/vsgh-website/blob/main/src/lib/indexing.ts"
click node_security "https://github.com/vsgh-india/vsgh-website/blob/main/src/lib/security-headers.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_domainroutes,node_insightsroute,node_contactroute,node_layout,node_homecomponents toneBlue
class node_capabilityview,node_aboutview,node_articleview,node_pagebuilder,node_contentdata,node_resolver,node_sanity toneAmber
class node_sanityfetch,node_sanityschema,node_preview,node_previewapi,node_revalidateapi,node_revalidation toneMint
class node_seo,node_indexing,node_security toneRose
class node_visitor toneIndigo
```

## Components

### Website experience

- [Home page](https://github.com/vsgh-india/vsgh-website/blob/main/src/app/page.tsx): `src/app/page.tsx`
- [Domain pages](https://github.com/vsgh-india/vsgh-website/tree/main/src/app): `src/app`
- [Insights pages](https://github.com/vsgh-india/vsgh-website/tree/main/src/app/insights): `src/app/insights`
- [Contact page](https://github.com/vsgh-india/vsgh-website/blob/main/src/app/contact/page.tsx): `src/app/contact/page.tsx`
- [Site layout](https://github.com/vsgh-india/vsgh-website/blob/main/src/app/layout.tsx): `src/app/layout.tsx`
- [Home sections](https://github.com/vsgh-india/vsgh-website/tree/main/src/components/home): `src/components/home`

### Content and rendering

- [Capability view](https://github.com/vsgh-india/vsgh-website/blob/main/src/components/domain/capability-page-view.tsx): `src/components/domain/capability-page-view.tsx`
- [About view](https://github.com/vsgh-india/vsgh-website/blob/main/src/components/about/about-page-view.tsx): `src/components/about/about-page-view.tsx`
- [Article view](https://github.com/vsgh-india/vsgh-website/blob/main/src/components/domain/insight-article-view.tsx): `src/components/domain/insight-article-view.tsx`
- [Page builder](https://github.com/vsgh-india/vsgh-website/blob/main/src/components/cms/page-builder.tsx): `src/components/cms/page-builder.tsx`
- [Domain content](https://github.com/vsgh-india/vsgh-website/tree/main/src/content): `src/content`
- [Content resolver](https://github.com/vsgh-india/vsgh-website/blob/main/src/content/resolve.ts): `src/content/resolve.ts`

### CMS and preview

- [Sanity fetch](https://github.com/vsgh-india/vsgh-website/blob/main/src/sanity/fetch.ts): `src/sanity/fetch.ts`
- [Sanity schemas](https://github.com/vsgh-india/vsgh-website/tree/main/src/sanity/schema): `src/sanity/schema`
- [Preview session](https://github.com/vsgh-india/vsgh-website/blob/main/src/sanity/preview-session.ts): `src/sanity/preview-session.ts`
- [Preview endpoints](https://github.com/vsgh-india/vsgh-website/blob/main/src/app/api/draft/route.ts): `src/app/api/draft/route.ts`
- [Revalidation endpoint](https://github.com/vsgh-india/vsgh-website/blob/main/src/app/api/revalidate/route.ts): `src/app/api/revalidate/route.ts`
- [Revalidation logic](https://github.com/vsgh-india/vsgh-website/blob/main/src/sanity/revalidate.ts): `src/sanity/revalidate.ts`

### Web platform

- [SEO metadata](https://github.com/vsgh-india/vsgh-website/blob/main/src/lib/seo.ts): `src/lib/seo.ts`
- [Indexing policy](https://github.com/vsgh-india/vsgh-website/blob/main/src/lib/indexing.ts): `src/lib/indexing.ts`
- [Security controls](https://github.com/vsgh-india/vsgh-website/blob/main/src/lib/security-headers.ts): `src/lib/security-headers.ts`

### Other components

- **Visitor**
- **Sanity CMS**

## Connections

- Visitor → Home page: opens (evidence: `src/app/page.tsx`)
- Visitor → Domain pages: opens
- Visitor → Insights pages: opens
- Visitor → Contact page: opens (evidence: `src/app/contact/page.tsx`)
- Home page → Home sections: renders (evidence: `src/app/page.tsx`)
- Domain pages → Domain content: uses fallbacks (evidence: `src/app/applications/advanced-industrial/page.tsx`)
- Domain pages → Capability view: routes through
- Domain pages → About view: routes through
- Domain pages → Content resolver: resolves content (evidence: `src/app/contact/page.tsx`)
- Insights pages → Content resolver: resolves articles (evidence: `src/app/insights/[slug]/page.tsx`)
- Insights pages → Article view: renders (evidence: `src/app/insights/[slug]/page.tsx`)
- Contact page → Content resolver: resolves content (evidence: `src/app/contact/page.tsx`)
- Content resolver → Domain content: uses fallback content (evidence: `src/content/resolve.ts`)
- Content resolver → Sanity fetch: may fetch (evidence: `src/content/resolve.ts`)
- Sanity fetch → Sanity CMS: queries (evidence: `README.md`)
- Sanity schemas → Sanity CMS: defines content for (evidence: `README.md`)
- Capability view → Page builder: renders blocks (evidence: `src/components/domain/capability-page-view.tsx`)
- Domain pages → Preview session: checks session (evidence: `src/app/contact/page.tsx`)
- Preview endpoints → Preview session: sets preview mode (evidence: `src/app/api/draft/route.ts`)
- Revalidation endpoint → Revalidation logic: invokes (evidence: `src/app/api/revalidate/route.ts`)
- Revalidation logic → Security controls: checks security policy (evidence: `src/sanity/revalidate.ts`)
- Home page → SEO metadata: sets metadata (evidence: `src/app/page.tsx`)
- SEO metadata → Indexing policy: gets robots metadata (evidence: `src/lib/seo.ts`)
- Contact page → SEO metadata: sets metadata (evidence: `src/app/contact/page.tsx`)
