# theteamzoradevs-gif/vertara-global architecture

> Architecture diagram of the GitHub repository theteamzoradevs-gif/vertara-global, 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/theteamzoradevs-gif/vertara-global
- Repository: https://github.com/theteamzoradevs-gif/vertara-global

## Overview

GCC Advisor is an inquiry-driven marketing site for a GCC advisory firm, with a rule-based chat assistant and an authenticated admin CMS. The main visitor journey is exploring advisory services and engagement models, then contacting the firm through an enquiry form or chat; chat enquiries can be associated with chat sessions. The CMS manages content and leads. Sampled source confirms content fallback and lead/session persistence; several route and CMS details are represented only at the README capability level.

Main entry points: [`src/app/api/leads/route.ts`](https://github.com/theteamzoradevs-gif/vertara-global/blob/main/src/app/api/leads/route.ts) (Lead API), [`src/app/(marketing)/page.tsx`](https://github.com/theteamzoradevs-gif/vertara-global/blob/main/src/app/(marketing)/page.tsx) (Marketing pages), [`src/components/chat/ChatAssistant.tsx`](https://github.com/theteamzoradevs-gif/vertara-global/blob/main/src/components/chat/ChatAssistant.tsx) (Chat assistant), [`src/lib/content/index.ts`](https://github.com/theteamzoradevs-gif/vertara-global/blob/main/src/lib/content/index.ts) (Content access)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_public["Marketing experience"]
  node_marketing["Marketing pages<br/>[page.tsx]"]
  node_services["Service pages<br/>[page.tsx]"]
  node_engagement["Engagement models<br/>[page.tsx]"]
  node_industries["Industry pages"]
  node_insights["Insights and cases"]
end

subgraph group_inquiry["Inquiry and chat"]
  node_contact["Contact enquiry<br/>[ContactForm.tsx]"]
  node_trustpop["Trust-pop enquiry<br/>[TrustPop.tsx]"]
  node_chatui["Chat assistant<br/>[ChatAssistant.tsx]"]
  node_chatroute["Chat session API<br/>[route.ts]"]
  node_chatask["Rule-based answers<br/>[route.ts]"]
  node_leadroute["Lead API<br/>[route.ts]"]
end

subgraph group_cms["Admin CMS"]
  node_admin["Admin workspace<br/>[page.tsx]"]
  node_adminlogin["Admin authentication<br/>[auth.ts]"]
  node_cmsactions["CMS actions"]
end

subgraph group_content["Content and persistence"]
  node_contentapi["Content access<br/>[index.ts]"]
  node_seeds["Seed content<br/>[seed-content.ts]"]
  node_database[("MongoDB<br/>[db.ts]")]
  node_contentmodels[("Content models<br/>[Service.ts]")]
  node_leadsmodel[("Lead records<br/>[Lead.ts]")]
  node_sessionsmodel[("Chat sessions<br/>[ChatSession.ts]")]
end

node_visitor(("Prospective client"))

node_visitor -->|"explores"| node_marketing
node_marketing -->|"opens services"| node_services
node_marketing -->|"compares models"| node_engagement
node_marketing -->|"explores sectors"| node_industries
node_marketing -->|"reads cases"| node_insights
node_visitor -->|"submits enquiry"| node_contact
node_visitor -->|"starts enquiry"| node_trustpop
node_visitor -->|"asks questions"| node_chatui
node_chatui -->|"tracks session"| node_chatroute
node_chatui -->|"requests answers"| node_chatask
node_contact -->|"submits lead"| node_leadroute
node_trustpop -->|"submits lead"| node_leadroute
node_chatui -->|"captures lead"| node_leadroute
node_leadroute -->|"creates lead"| node_leadsmodel
node_leadroute -->|"links session"| node_sessionsmodel
node_chatroute -->|"stores session"| node_sessionsmodel
node_adminlogin -->|"connects to"| node_database
node_admin -->|"requires login"| node_adminlogin
node_admin -->|"manages content"| node_cmsactions
node_admin -->|"reviews leads"| node_leadroute
node_cmsactions -->|"updates content"| node_contentmodels
node_contentapi -->|"connects to"| node_database
node_contentapi -->|"falls back to"| node_seeds
node_contentapi -->|"reads content"| node_contentmodels
node_leadroute -->|"connects to"| node_database
node_marketing -.->|"loads site content"| node_contentapi

click node_marketing "https://github.com/theteamzoradevs-gif/vertara-global/blob/main/src/app/(marketing)/page.tsx"
click node_services "https://github.com/theteamzoradevs-gif/vertara-global/blob/main/src/app/(marketing)/services/%5Bslug%5D/page.tsx"
click node_engagement "https://github.com/theteamzoradevs-gif/vertara-global/blob/main/src/app/(marketing)/engagement-models/page.tsx"
click node_industries "https://github.com/theteamzoradevs-gif/vertara-global/tree/main/src/app/(marketing)/industries"
click node_insights "https://github.com/theteamzoradevs-gif/vertara-global/tree/main/src/app/(marketing)/insights"
click node_contact "https://github.com/theteamzoradevs-gif/vertara-global/blob/main/src/components/leads/ContactForm.tsx"
click node_trustpop "https://github.com/theteamzoradevs-gif/vertara-global/blob/main/src/components/leads/TrustPop.tsx"
click node_chatui "https://github.com/theteamzoradevs-gif/vertara-global/blob/main/src/components/chat/ChatAssistant.tsx"
click node_chatroute "https://github.com/theteamzoradevs-gif/vertara-global/blob/main/src/app/api/chat/route.ts"
click node_chatask "https://github.com/theteamzoradevs-gif/vertara-global/blob/main/src/app/api/chat/ask/route.ts"
click node_leadroute "https://github.com/theteamzoradevs-gif/vertara-global/blob/main/src/app/api/leads/route.ts"
click node_admin "https://github.com/theteamzoradevs-gif/vertara-global/blob/main/src/app/admin/page.tsx"
click node_adminlogin "https://github.com/theteamzoradevs-gif/vertara-global/blob/main/src/lib/auth.ts"
click node_cmsactions "https://github.com/theteamzoradevs-gif/vertara-global/tree/main/src/app/admin"
click node_contentapi "https://github.com/theteamzoradevs-gif/vertara-global/blob/main/src/lib/content/index.ts"
click node_seeds "https://github.com/theteamzoradevs-gif/vertara-global/blob/main/src/data/seed-content.ts"
click node_database "https://github.com/theteamzoradevs-gif/vertara-global/blob/main/src/lib/db.ts"
click node_contentmodels "https://github.com/theteamzoradevs-gif/vertara-global/blob/main/src/models/Service.ts"
click node_leadsmodel "https://github.com/theteamzoradevs-gif/vertara-global/blob/main/src/models/Lead.ts"
click node_sessionsmodel "https://github.com/theteamzoradevs-gif/vertara-global/blob/main/src/models/ChatSession.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_marketing,node_services,node_engagement,node_industries,node_insights,node_visitor toneBlue
class node_contact,node_trustpop,node_chatui,node_chatroute,node_chatask,node_leadroute toneAmber
class node_admin,node_adminlogin,node_cmsactions toneMint
class node_contentapi,node_seeds,node_database,node_contentmodels,node_leadsmodel,node_sessionsmodel toneRose
```

## Components

### Marketing experience

- [Marketing pages](https://github.com/theteamzoradevs-gif/vertara-global/blob/main/src/app/(marketing)/page.tsx): `src/app/(marketing)/page.tsx`
- [Service pages](https://github.com/theteamzoradevs-gif/vertara-global/blob/main/src/app/(marketing)/services/%5Bslug%5D/page.tsx): `src/app/(marketing)/services/[slug]/page.tsx`
- [Engagement models](https://github.com/theteamzoradevs-gif/vertara-global/blob/main/src/app/(marketing)/engagement-models/page.tsx): `src/app/(marketing)/engagement-models/page.tsx`
- [Industry pages](https://github.com/theteamzoradevs-gif/vertara-global/tree/main/src/app/(marketing)/industries): `src/app/(marketing)/industries`
- [Insights and cases](https://github.com/theteamzoradevs-gif/vertara-global/tree/main/src/app/(marketing)/insights): `src/app/(marketing)/insights`

### Inquiry and chat

- [Contact enquiry](https://github.com/theteamzoradevs-gif/vertara-global/blob/main/src/components/leads/ContactForm.tsx): `src/components/leads/ContactForm.tsx`
- [Trust-pop enquiry](https://github.com/theteamzoradevs-gif/vertara-global/blob/main/src/components/leads/TrustPop.tsx): `src/components/leads/TrustPop.tsx`
- [Chat assistant](https://github.com/theteamzoradevs-gif/vertara-global/blob/main/src/components/chat/ChatAssistant.tsx): `src/components/chat/ChatAssistant.tsx`
- [Chat session API](https://github.com/theteamzoradevs-gif/vertara-global/blob/main/src/app/api/chat/route.ts): `src/app/api/chat/route.ts`
- [Rule-based answers](https://github.com/theteamzoradevs-gif/vertara-global/blob/main/src/app/api/chat/ask/route.ts): `src/app/api/chat/ask/route.ts`
- [Lead API](https://github.com/theteamzoradevs-gif/vertara-global/blob/main/src/app/api/leads/route.ts): `src/app/api/leads/route.ts`

### Admin CMS

- [Admin workspace](https://github.com/theteamzoradevs-gif/vertara-global/blob/main/src/app/admin/page.tsx): `src/app/admin/page.tsx`
- [Admin authentication](https://github.com/theteamzoradevs-gif/vertara-global/blob/main/src/lib/auth.ts): `src/lib/auth.ts`
- [CMS actions](https://github.com/theteamzoradevs-gif/vertara-global/tree/main/src/app/admin): `src/app/admin`

### Content and persistence

- [Content access](https://github.com/theteamzoradevs-gif/vertara-global/blob/main/src/lib/content/index.ts): `src/lib/content/index.ts`
- [Seed content](https://github.com/theteamzoradevs-gif/vertara-global/blob/main/src/data/seed-content.ts): `src/data/seed-content.ts`
- [MongoDB](https://github.com/theteamzoradevs-gif/vertara-global/blob/main/src/lib/db.ts): `src/lib/db.ts`
- [Content models](https://github.com/theteamzoradevs-gif/vertara-global/blob/main/src/models/Service.ts): `src/models/Service.ts`
- [Lead records](https://github.com/theteamzoradevs-gif/vertara-global/blob/main/src/models/Lead.ts): `src/models/Lead.ts`
- [Chat sessions](https://github.com/theteamzoradevs-gif/vertara-global/blob/main/src/models/ChatSession.ts): `src/models/ChatSession.ts`

### Other components

- **Prospective client**

## Connections

- Prospective client → Marketing pages: explores
- Marketing pages → Service pages: opens services
- Marketing pages → Engagement models: compares models
- Marketing pages → Industry pages: explores sectors
- Marketing pages → Insights and cases: reads cases
- Prospective client → Contact enquiry: submits enquiry
- Prospective client → Trust-pop enquiry: starts enquiry
- Prospective client → Chat assistant: asks questions
- Chat assistant → Chat session API: tracks session
- Chat assistant → Rule-based answers: requests answers (evidence: `src/app/api/chat/ask/route.ts`)
- Contact enquiry → Lead API: submits lead
- Trust-pop enquiry → Lead API: submits lead
- Chat assistant → Lead API: captures lead
- Lead API → Lead records: creates lead (evidence: `src/app/api/leads/route.ts`)
- Lead API → Chat sessions: links session (evidence: `src/app/api/leads/route.ts`)
- Chat session API → Chat sessions: stores session (evidence: `src/app/api/chat/route.ts`)
- Admin authentication → MongoDB: connects to (evidence: `src/lib/auth.ts`)
- Admin workspace → Admin authentication: requires login
- Admin workspace → CMS actions: manages content
- Admin workspace → Lead API: reviews leads
- CMS actions → Content models: updates content
- Content access → MongoDB: connects to (evidence: `src/lib/content/index.ts`)
- Content access → Seed content: falls back to (evidence: `src/lib/content/index.ts`)
- Content access → Content models: reads content (evidence: `src/lib/content/index.ts`)
- Lead API → MongoDB: connects to (evidence: `src/app/api/leads/route.ts`)
- Marketing pages → Content access: loads site content (evidence: `src/app/(marketing)/page.tsx`)
