# kumarianjali10/ai-customer-support architecture

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

- Interactive diagram: https://gitdiagram.com/kumarianjali10/ai-customer-support
- Repository: https://github.com/kumarianjali10/ai-customer-support

## Overview

This is a Next.js educational customer-support chatbot. The documented user journey starts at a landing page, continues through the HomePage entry, and users can chat through the chat page, which posts message history to a server API and streams its response. The README documents Cloudflare-backed intelligent responses and basic hard-coded replies; the handler implementation was not excerpted, so its internal processing cannot be confirmed. Authentication and multilingual support are described as bonus plans, not demonstrated runtime capabilities.

Main entry points: [`app/chat/page.tsx`](https://github.com/kumarianjali10/ai-customer-support/blob/main/app/chat/page.tsx) (Chat Page), [`utils/cn.ts`](https://github.com/kumarianjali10/ai-customer-support/blob/main/utils/cn.ts) (Class Utilities), [`app/LandingPage/page.tsx`](https://github.com/kumarianjali10/ai-customer-support/blob/main/app/LandingPage/page.tsx) (Landing Page), [`app/HomePage/page.tsx`](https://github.com/kumarianjali10/ai-customer-support/blob/main/app/HomePage/page.tsx) (Home Page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_pages["Pages and Navigation"]
  node_home["Home Route<br/>[page.tsx]"]
  node_landing["Landing Page<br/>[page.tsx]"]
  node_home_page["Home Page<br/>[page.tsx]"]
  node_navbar["Navigation Bar<br/>[Navbar.tsx]"]
end

subgraph group_chat["Chat Workflow"]
  node_chat_page["Chat Page<br/>[page.tsx]"]
  node_chat_input["Animated Input"]
  node_message_view["Message View<br/>[page.tsx]"]
end

subgraph group_backend["Response Backend"]
  node_chat_api["Chat API<br/>[route.ts]"]
end

subgraph group_visuals["Visual Components"]
  node_hero["Hero Section<br/>[HeroSection.tsx]"]
  node_gemini_effect["Animated Hero Effect"]
  node_sparkles["Particle Effect<br/>[sparkles.tsx]"]
  node_avatars["Chat Avatars<br/>[avatar.tsx]"]
  node_scroll_area["Scroll Area<br/>[scroll-area.tsx]"]
  node_class_utils["Class Utilities<br/>[cn.ts]"]
end

node_visitor(("Visitor"))
node_cloudflare["Cloudflare API"]

node_visitor -->|"opens"| node_home
node_home -->|"renders"| node_landing
node_landing -->|"renders"| node_sparkles
node_landing -->|"links to"| node_home_page
node_home_page -->|"renders"| node_navbar
node_home_page -->|"renders"| node_hero
node_visitor -->|"uses"| node_chat_page
node_chat_page -->|"renders"| node_chat_input
node_chat_page -->|"updates"| node_message_view
node_chat_page -->|"posts messages"| node_chat_api
node_chat_api -->|"generates replies"| node_cloudflare
node_chat_page -->|"renders"| node_avatars
node_chat_page -->|"renders"| node_scroll_area
node_hero -->|"renders"| node_gemini_effect
node_sparkles -->|"uses"| node_class_utils
node_gemini_effect -->|"uses"| node_class_utils
node_chat_input -->|"uses"| node_class_utils
node_avatars -->|"uses"| node_class_utils
node_scroll_area -->|"uses"| node_class_utils

click node_home "https://github.com/kumarianjali10/ai-customer-support/blob/main/app/page.tsx"
click node_landing "https://github.com/kumarianjali10/ai-customer-support/blob/main/app/LandingPage/page.tsx"
click node_home_page "https://github.com/kumarianjali10/ai-customer-support/blob/main/app/HomePage/page.tsx"
click node_navbar "https://github.com/kumarianjali10/ai-customer-support/blob/main/components/Navbar.tsx"
click node_chat_page "https://github.com/kumarianjali10/ai-customer-support/blob/main/app/chat/page.tsx"
click node_chat_input "https://github.com/kumarianjali10/ai-customer-support/blob/main/components/ui/placeholders-and-vanish-input.tsx"
click node_message_view "https://github.com/kumarianjali10/ai-customer-support/blob/main/app/chat/page.tsx"
click node_chat_api "https://github.com/kumarianjali10/ai-customer-support/blob/main/app/api/chat/route.ts"
click node_hero "https://github.com/kumarianjali10/ai-customer-support/blob/main/components/HeroSection.tsx"
click node_gemini_effect "https://github.com/kumarianjali10/ai-customer-support/blob/main/components/ui/google-gemini-effect.tsx"
click node_sparkles "https://github.com/kumarianjali10/ai-customer-support/blob/main/components/ui/sparkles.tsx"
click node_avatars "https://github.com/kumarianjali10/ai-customer-support/blob/main/components/ui/avatar.tsx"
click node_scroll_area "https://github.com/kumarianjali10/ai-customer-support/blob/main/components/ui/scroll-area.tsx"
click node_class_utils "https://github.com/kumarianjali10/ai-customer-support/blob/main/utils/cn.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_landing,node_home_page,node_navbar toneBlue
class node_chat_page,node_chat_input,node_message_view toneAmber
class node_chat_api,node_cloudflare toneMint
class node_hero,node_gemini_effect,node_sparkles,node_avatars,node_scroll_area,node_class_utils toneRose
class node_visitor toneIndigo
```

## Components

### Pages and Navigation

- [Home Route](https://github.com/kumarianjali10/ai-customer-support/blob/main/app/page.tsx): `app/page.tsx`
- [Landing Page](https://github.com/kumarianjali10/ai-customer-support/blob/main/app/LandingPage/page.tsx): `app/LandingPage/page.tsx`
- [Home Page](https://github.com/kumarianjali10/ai-customer-support/blob/main/app/HomePage/page.tsx): `app/HomePage/page.tsx`
- [Navigation Bar](https://github.com/kumarianjali10/ai-customer-support/blob/main/components/Navbar.tsx): `components/Navbar.tsx`

### Chat Workflow

- [Chat Page](https://github.com/kumarianjali10/ai-customer-support/blob/main/app/chat/page.tsx): `app/chat/page.tsx`
- [Animated Input](https://github.com/kumarianjali10/ai-customer-support/blob/main/components/ui/placeholders-and-vanish-input.tsx): `components/ui/placeholders-and-vanish-input.tsx`
- [Message View](https://github.com/kumarianjali10/ai-customer-support/blob/main/app/chat/page.tsx): `app/chat/page.tsx`

### Response Backend

- [Chat API](https://github.com/kumarianjali10/ai-customer-support/blob/main/app/api/chat/route.ts): `app/api/chat/route.ts`

### Visual Components

- [Hero Section](https://github.com/kumarianjali10/ai-customer-support/blob/main/components/HeroSection.tsx): `components/HeroSection.tsx`
- [Animated Hero Effect](https://github.com/kumarianjali10/ai-customer-support/blob/main/components/ui/google-gemini-effect.tsx): `components/ui/google-gemini-effect.tsx`
- [Particle Effect](https://github.com/kumarianjali10/ai-customer-support/blob/main/components/ui/sparkles.tsx): `components/ui/sparkles.tsx`
- [Chat Avatars](https://github.com/kumarianjali10/ai-customer-support/blob/main/components/ui/avatar.tsx): `components/ui/avatar.tsx`
- [Scroll Area](https://github.com/kumarianjali10/ai-customer-support/blob/main/components/ui/scroll-area.tsx): `components/ui/scroll-area.tsx`
- [Class Utilities](https://github.com/kumarianjali10/ai-customer-support/blob/main/utils/cn.ts): `utils/cn.ts`

### Other components

- **Visitor**
- **Cloudflare API**

## Connections

- Visitor → Home Route: opens (evidence: `README.md`)
- Home Route → Landing Page: renders (evidence: `app/page.tsx`)
- Landing Page → Particle Effect: renders (evidence: `app/LandingPage/page.tsx`)
- Landing Page → Home Page: links to (evidence: `app/LandingPage/page.tsx`)
- Home Page → Navigation Bar: renders (evidence: `app/HomePage/page.tsx`)
- Home Page → Hero Section: renders (evidence: `app/HomePage/page.tsx`)
- Visitor → Chat Page: uses (evidence: `README.md`)
- Chat Page → Animated Input: renders (evidence: `app/chat/page.tsx`)
- Chat Page → Message View: updates (evidence: `app/chat/page.tsx`)
- Chat Page → Chat API: posts messages (evidence: `app/chat/page.tsx`)
- Chat API → Cloudflare API: generates replies (evidence: `README.md`)
- Chat Page → Chat Avatars: renders (evidence: `app/chat/page.tsx`)
- Chat Page → Scroll Area: renders (evidence: `app/chat/page.tsx`)
- Hero Section → Animated Hero Effect: renders (evidence: `components/HeroSection.tsx`)
- Particle Effect → Class Utilities: uses (evidence: `components/ui/sparkles.tsx`)
- Animated Hero Effect → Class Utilities: uses (evidence: `components/ui/google-gemini-effect.tsx`)
- Animated Input → Class Utilities: uses (evidence: `components/ui/placeholders-and-vanish-input.tsx`)
- Chat Avatars → Class Utilities: uses (evidence: `components/ui/avatar.tsx`)
- Scroll Area → Class Utilities: uses (evidence: `components/ui/scroll-area.tsx`)
