# aspee12/gov-tech-chatbot architecture

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

- Interactive diagram: https://gitdiagram.com/aspee12/gov-tech-chatbot
- Repository: https://github.com/aspee12/gov-tech-chatbot

## Overview

This is a Next.js portal for selecting among five Bhutan government-agency chatbots. The user opens the home page, chooses an agency, and reaches its dedicated chatbot page. The source shows NLCS loading the Flowise embed script and configuring a hosted chatbot; the README and home-page copy describe the portal as Flowise-based, but the other chatbot implementations’ integration details are not shown here.

Main entry points: [`src/components/common/CommonHome.tsx`](https://github.com/aspee12/gov-tech-chatbot/blob/release-prod/src/components/common/CommonHome.tsx) (Chatbot Home), [`src/components/sections/NLCSChatbot.tsx`](https://github.com/aspee12/gov-tech-chatbot/blob/release-prod/src/components/sections/NLCSChatbot.tsx) (NLCS Chatbot), [`src/app/page.tsx`](https://github.com/aspee12/gov-tech-chatbot/blob/release-prod/src/app/page.tsx) (Home Route), [`src/app/govtech/page.tsx`](https://github.com/aspee12/gov-tech-chatbot/blob/release-prod/src/app/govtech/page.tsx) (GovTech Route)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_portal["Portal and Routing"]
  node_home["Chatbot Home<br/>[CommonHome.tsx]"]
  node_home_route["Home Route<br/>[page.tsx]"]
  node_govtech_route["GovTech Route<br/>[page.tsx]"]
  node_moal_route["MoAL Route<br/>[page.tsx]"]
  node_moh_route["MoH Route<br/>[page.tsx]"]
  node_moit_route["MoIT Route<br/>[page.tsx]"]
  node_nlcs_route["NLCS Route<br/>[page.tsx]"]
end

subgraph group_experiences["Agency Experiences"]
  node_govtech["GovTech Chatbot<br/>[GovTechChatbot.tsx]"]
  node_moal["MoAL Chatbot<br/>[MoALChatbot.tsx]"]
  node_moh["MoH Chatbot<br/>[MOHChatbot.tsx]"]
  node_moit["MoIT Chatbot<br/>[MoITChatbot.tsx]"]
  node_nlcs["NLCS Chatbot<br/>[NLCSChatbot.tsx]"]
end

subgraph group_shared["Shared Chatbot Data"]
  node_catalog["Chatbot Catalog<br/>[shared.ts]"]
  node_chatbot_types["Chatbot Types<br/>[chatbot.ts]"]
end

node_visitor(("Portal Visitor"))
node_flowise_embed["Flowise Embed CDN"]
node_flowise_service["Hosted Chatbot Service"]

node_visitor -->|"opens"| node_home_route
node_home_route -->|"renders"| node_home
node_home -->|"lists choices"| node_catalog
node_home -->|"navigates to"| node_govtech_route
node_home -->|"navigates to"| node_moal_route
node_home -->|"navigates to"| node_moh_route
node_home -->|"navigates to"| node_moit_route
node_home -->|"navigates to"| node_nlcs_route
node_govtech_route -->|"renders"| node_govtech
node_moal_route -->|"renders"| node_moal
node_moh_route -->|"renders"| node_moh
node_moit_route -->|"renders"| node_moit
node_nlcs_route -->|"renders"| node_nlcs
node_nlcs -->|"loads script"| node_flowise_embed
node_nlcs -->|"configures host"| node_flowise_service

click node_home "https://github.com/aspee12/gov-tech-chatbot/blob/release-prod/src/components/common/CommonHome.tsx"
click node_home_route "https://github.com/aspee12/gov-tech-chatbot/blob/release-prod/src/app/page.tsx"
click node_catalog "https://github.com/aspee12/gov-tech-chatbot/blob/release-prod/src/constants/shared.ts"
click node_govtech_route "https://github.com/aspee12/gov-tech-chatbot/blob/release-prod/src/app/govtech/page.tsx"
click node_govtech "https://github.com/aspee12/gov-tech-chatbot/blob/release-prod/src/components/sections/GovTechChatbot.tsx"
click node_moal_route "https://github.com/aspee12/gov-tech-chatbot/blob/release-prod/src/app/moal/page.tsx"
click node_moal "https://github.com/aspee12/gov-tech-chatbot/blob/release-prod/src/components/sections/MoALChatbot.tsx"
click node_moh_route "https://github.com/aspee12/gov-tech-chatbot/blob/release-prod/src/app/moh/page.tsx"
click node_moh "https://github.com/aspee12/gov-tech-chatbot/blob/release-prod/src/components/sections/MOHChatbot.tsx"
click node_moit_route "https://github.com/aspee12/gov-tech-chatbot/blob/release-prod/src/app/moit/page.tsx"
click node_moit "https://github.com/aspee12/gov-tech-chatbot/blob/release-prod/src/components/sections/MoITChatbot.tsx"
click node_nlcs_route "https://github.com/aspee12/gov-tech-chatbot/blob/release-prod/src/app/nlcs/page.tsx"
click node_nlcs "https://github.com/aspee12/gov-tech-chatbot/blob/release-prod/src/components/sections/NLCSChatbot.tsx"
click node_chatbot_types "https://github.com/aspee12/gov-tech-chatbot/blob/release-prod/src/types/chatbot.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_home_route,node_govtech_route,node_moal_route,node_moh_route,node_moit_route,node_nlcs_route toneBlue
class node_govtech,node_moal,node_moh,node_moit,node_nlcs toneAmber
class node_catalog,node_chatbot_types toneMint
class node_visitor,node_flowise_embed,node_flowise_service toneIndigo
```

## Components

### Portal and Routing

- [Chatbot Home](https://github.com/aspee12/gov-tech-chatbot/blob/release-prod/src/components/common/CommonHome.tsx): `src/components/common/CommonHome.tsx`
- [Home Route](https://github.com/aspee12/gov-tech-chatbot/blob/release-prod/src/app/page.tsx): `src/app/page.tsx`
- [GovTech Route](https://github.com/aspee12/gov-tech-chatbot/blob/release-prod/src/app/govtech/page.tsx): `src/app/govtech/page.tsx`
- [MoAL Route](https://github.com/aspee12/gov-tech-chatbot/blob/release-prod/src/app/moal/page.tsx): `src/app/moal/page.tsx`
- [MoH Route](https://github.com/aspee12/gov-tech-chatbot/blob/release-prod/src/app/moh/page.tsx): `src/app/moh/page.tsx`
- [MoIT Route](https://github.com/aspee12/gov-tech-chatbot/blob/release-prod/src/app/moit/page.tsx): `src/app/moit/page.tsx`
- [NLCS Route](https://github.com/aspee12/gov-tech-chatbot/blob/release-prod/src/app/nlcs/page.tsx): `src/app/nlcs/page.tsx`

### Agency Experiences

- [GovTech Chatbot](https://github.com/aspee12/gov-tech-chatbot/blob/release-prod/src/components/sections/GovTechChatbot.tsx): `src/components/sections/GovTechChatbot.tsx`
- [MoAL Chatbot](https://github.com/aspee12/gov-tech-chatbot/blob/release-prod/src/components/sections/MoALChatbot.tsx): `src/components/sections/MoALChatbot.tsx`
- [MoH Chatbot](https://github.com/aspee12/gov-tech-chatbot/blob/release-prod/src/components/sections/MOHChatbot.tsx): `src/components/sections/MOHChatbot.tsx`
- [MoIT Chatbot](https://github.com/aspee12/gov-tech-chatbot/blob/release-prod/src/components/sections/MoITChatbot.tsx): `src/components/sections/MoITChatbot.tsx`
- [NLCS Chatbot](https://github.com/aspee12/gov-tech-chatbot/blob/release-prod/src/components/sections/NLCSChatbot.tsx): `src/components/sections/NLCSChatbot.tsx`

### Shared Chatbot Data

- [Chatbot Catalog](https://github.com/aspee12/gov-tech-chatbot/blob/release-prod/src/constants/shared.ts): `src/constants/shared.ts`
- [Chatbot Types](https://github.com/aspee12/gov-tech-chatbot/blob/release-prod/src/types/chatbot.ts): `src/types/chatbot.ts`

### Other components

- **Portal Visitor**
- **Flowise Embed CDN**
- **Hosted Chatbot Service**

## Connections

- Portal Visitor → Home Route: opens (evidence: `src/app/page.tsx`)
- Home Route → Chatbot Home: renders (evidence: `src/app/page.tsx`)
- Chatbot Home → Chatbot Catalog: lists choices (evidence: `src/components/common/CommonHome.tsx`)
- Chatbot Home → GovTech Route: navigates to (evidence: `src/components/common/CommonHome.tsx`)
- Chatbot Home → MoAL Route: navigates to (evidence: `src/components/common/CommonHome.tsx`)
- Chatbot Home → MoH Route: navigates to (evidence: `src/components/common/CommonHome.tsx`)
- Chatbot Home → MoIT Route: navigates to (evidence: `src/components/common/CommonHome.tsx`)
- Chatbot Home → NLCS Route: navigates to (evidence: `src/components/common/CommonHome.tsx`)
- GovTech Route → GovTech Chatbot: renders (evidence: `src/app/govtech/page.tsx`)
- MoAL Route → MoAL Chatbot: renders (evidence: `src/app/moal/page.tsx`)
- MoH Route → MoH Chatbot: renders (evidence: `src/app/moh/page.tsx`)
- MoIT Route → MoIT Chatbot: renders (evidence: `src/app/moit/page.tsx`)
- NLCS Route → NLCS Chatbot: renders (evidence: `src/app/nlcs/page.tsx`)
- NLCS Chatbot → Flowise Embed CDN: loads script (evidence: `src/components/sections/NLCSChatbot.tsx`)
- NLCS Chatbot → Hosted Chatbot Service: configures host (evidence: `src/components/sections/NLCSChatbot.tsx`)
