# madhav-does/nexxon architecture

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

- Interactive diagram: https://gitdiagram.com/madhav-does/nexxon
- Repository: https://github.com/madhav-does/nexxon

## Overview

NEXXON is a Next.js marketplace and customer-support application centered on browsing products and starting buyer–seller chats, with a separate messaging center and support-agent dashboard. Shared client providers expose chat state and persistent chat/support UI across pages. The README documents secure server-side token minting and credential setup routes; those routes are represented, though their implementation details beyond the sampled token and config-status handlers were not inspected. Several page and chat components are only partially excerpted, so edges are limited to imports, calls, and documented relationships shown in the evidence.

Main entry points: [`src/context/ChatContext.tsx`](https://github.com/madhav-does/nexxon/blob/main/src/context/ChatContext.tsx) (Chat state and engine), [`src/components/ClientProviders.tsx`](https://github.com/madhav-does/nexxon/blob/main/src/components/ClientProviders.tsx) (Shared client shell), [`src/data/mockData.ts`](https://github.com/madhav-does/nexxon/blob/main/src/data/mockData.ts) (Demo catalog data), [`src/app/messages/page.tsx`](https://github.com/madhav-does/nexxon/blob/main/src/app/messages/page.tsx) (Messaging center)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_market["Marketplace"]
  node_catalog["Browse catalog<br/>[page.tsx]"]
  node_market_data["Demo catalog data<br/>[mockData.ts]"]
  node_role_nav["Role switcher<br/>[Navbar.tsx]"]
end

subgraph group_conversation["Messaging"]
  node_messages["Messaging center<br/>[page.tsx]"]
  node_chat_drawer["Inquiry drawer<br/>[ChatDrawer.tsx]"]
  node_official_ui["Official ChatUI"]
end

subgraph group_support["Customer Support"]
  node_support_dashboard["Agent dispatch<br/>[page.tsx]"]
  node_support_widget["Help widget<br/>[SupportWidget.tsx]"]
end

subgraph group_runtime["Chat Runtime"]
  node_client_shell["Shared client shell"]
  node_chat_state["Chat state and engine<br/>[ChatContext.tsx]"]
end

subgraph group_credentials["Credentials"]
  node_config_modal["Credential assistant"]
  node_config_status["Config status API<br/>[route.ts]"]
  node_save_credentials["Save credentials API<br/>[route.ts]"]
  node_token_api["Token minting API<br/>[route.ts]"]
end

node_shopper(("Marketplace user"))
node_agent(("Support agent"))
node_nexconn{{"Nexconn chat services"}}
node_nexconn_api{{"Nexconn token service"}}

node_shopper -->|"browses"| node_catalog
node_catalog -->|"reads listings"| node_market_data
node_catalog -->|"starts inquiry"| node_chat_state
node_role_nav -->|"switches identity"| node_chat_state
node_shopper -->|"opens conversations"| node_messages
node_messages -->|"uses chat state"| node_chat_state
node_messages -->|"looks up users"| node_market_data
node_messages -->|"loads UI option"| node_official_ui
node_chat_drawer -->|"uses chat state"| node_chat_state
node_chat_drawer -->|"looks up users"| node_market_data
node_agent -->|"handles inquiries"| node_support_dashboard
node_support_dashboard -->|"uses chat state"| node_chat_state
node_support_dashboard -->|"reads demo records"| node_market_data
node_shopper -->|"requests help"| node_support_widget
node_support_widget -->|"uses chat state"| node_chat_state
node_client_shell -->|"provides context"| node_chat_state
node_client_shell -->|"renders"| node_role_nav
node_client_shell -->|"renders"| node_chat_drawer
node_client_shell -->|"renders"| node_support_widget
node_client_shell -->|"renders"| node_config_modal
node_chat_state -->|"resolves users"| node_market_data
node_chat_state -->|"initializes engine"| node_nexconn
node_official_ui -->|"initializes ChatUI"| node_nexconn
node_config_modal -.->|"checks setup"| node_config_status
node_config_modal -.->|"updates setup"| node_save_credentials
node_token_api -->|"requests user token"| node_nexconn_api
node_shopper -.->|"authenticates chat"| node_token_api

click node_catalog "https://github.com/madhav-does/nexxon/blob/main/src/app/page.tsx"
click node_market_data "https://github.com/madhav-does/nexxon/blob/main/src/data/mockData.ts"
click node_role_nav "https://github.com/madhav-does/nexxon/blob/main/src/components/Navbar.tsx"
click node_messages "https://github.com/madhav-does/nexxon/blob/main/src/app/messages/page.tsx"
click node_chat_drawer "https://github.com/madhav-does/nexxon/blob/main/src/components/chat/ChatDrawer.tsx"
click node_official_ui "https://github.com/madhav-does/nexxon/blob/main/src/components/chat/NexconnChatUIProvider.tsx"
click node_support_dashboard "https://github.com/madhav-does/nexxon/blob/main/src/app/support-dashboard/page.tsx"
click node_support_widget "https://github.com/madhav-does/nexxon/blob/main/src/components/chat/SupportWidget.tsx"
click node_client_shell "https://github.com/madhav-does/nexxon/blob/main/src/components/ClientProviders.tsx"
click node_chat_state "https://github.com/madhav-does/nexxon/blob/main/src/context/ChatContext.tsx"
click node_config_modal "https://github.com/madhav-does/nexxon/blob/main/src/components/CredentialsModal.tsx"
click node_config_status "https://github.com/madhav-does/nexxon/blob/main/src/app/api/nexconn/config-status/route.ts"
click node_save_credentials "https://github.com/madhav-does/nexxon/blob/main/src/app/api/nexconn/save-credentials/route.ts"
click node_token_api "https://github.com/madhav-does/nexxon/blob/main/src/app/api/nexconn/token/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_catalog,node_market_data,node_role_nav,node_shopper toneBlue
class node_messages,node_chat_drawer,node_official_ui toneAmber
class node_support_dashboard,node_support_widget toneMint
class node_client_shell,node_chat_state toneRose
class node_config_modal,node_config_status,node_save_credentials,node_token_api,node_agent,node_nexconn,node_nexconn_api toneIndigo
```

## Components

### Marketplace

- [Browse catalog](https://github.com/madhav-does/nexxon/blob/main/src/app/page.tsx): `src/app/page.tsx`
- [Demo catalog data](https://github.com/madhav-does/nexxon/blob/main/src/data/mockData.ts): `src/data/mockData.ts`
- [Role switcher](https://github.com/madhav-does/nexxon/blob/main/src/components/Navbar.tsx): `src/components/Navbar.tsx`

### Messaging

- [Messaging center](https://github.com/madhav-does/nexxon/blob/main/src/app/messages/page.tsx): `src/app/messages/page.tsx`
- [Inquiry drawer](https://github.com/madhav-does/nexxon/blob/main/src/components/chat/ChatDrawer.tsx): `src/components/chat/ChatDrawer.tsx`
- [Official ChatUI](https://github.com/madhav-does/nexxon/blob/main/src/components/chat/NexconnChatUIProvider.tsx): `src/components/chat/NexconnChatUIProvider.tsx`

### Customer Support

- [Agent dispatch](https://github.com/madhav-does/nexxon/blob/main/src/app/support-dashboard/page.tsx): `src/app/support-dashboard/page.tsx`
- [Help widget](https://github.com/madhav-does/nexxon/blob/main/src/components/chat/SupportWidget.tsx): `src/components/chat/SupportWidget.tsx`

### Chat Runtime

- [Shared client shell](https://github.com/madhav-does/nexxon/blob/main/src/components/ClientProviders.tsx): `src/components/ClientProviders.tsx`
- [Chat state and engine](https://github.com/madhav-does/nexxon/blob/main/src/context/ChatContext.tsx): `src/context/ChatContext.tsx`

### Credentials

- [Credential assistant](https://github.com/madhav-does/nexxon/blob/main/src/components/CredentialsModal.tsx): `src/components/CredentialsModal.tsx`
- [Config status API](https://github.com/madhav-does/nexxon/blob/main/src/app/api/nexconn/config-status/route.ts): `src/app/api/nexconn/config-status/route.ts`
- [Save credentials API](https://github.com/madhav-does/nexxon/blob/main/src/app/api/nexconn/save-credentials/route.ts): `src/app/api/nexconn/save-credentials/route.ts`
- [Token minting API](https://github.com/madhav-does/nexxon/blob/main/src/app/api/nexconn/token/route.ts): `src/app/api/nexconn/token/route.ts`

### Other components

- **Marketplace user**
- **Support agent**
- **Nexconn chat services**
- **Nexconn token service**

## Connections

- Marketplace user → Browse catalog: browses (evidence: `README.md`)
- Browse catalog → Demo catalog data: reads listings (evidence: `src/app/page.tsx`)
- Browse catalog → Chat state and engine: starts inquiry (evidence: `src/app/page.tsx`)
- Role switcher → Chat state and engine: switches identity (evidence: `src/components/Navbar.tsx`)
- Marketplace user → Messaging center: opens conversations (evidence: `README.md`)
- Messaging center → Chat state and engine: uses chat state (evidence: `src/app/messages/page.tsx`)
- Messaging center → Demo catalog data: looks up users (evidence: `src/app/messages/page.tsx`)
- Messaging center → Official ChatUI: loads UI option (evidence: `src/app/messages/page.tsx`)
- Inquiry drawer → Chat state and engine: uses chat state (evidence: `src/components/chat/ChatDrawer.tsx`)
- Inquiry drawer → Demo catalog data: looks up users (evidence: `src/components/chat/ChatDrawer.tsx`)
- Support agent → Agent dispatch: handles inquiries (evidence: `README.md`)
- Agent dispatch → Chat state and engine: uses chat state (evidence: `src/app/support-dashboard/page.tsx`)
- Agent dispatch → Demo catalog data: reads demo records (evidence: `src/app/support-dashboard/page.tsx`)
- Marketplace user → Help widget: requests help (evidence: `README.md`)
- Help widget → Chat state and engine: uses chat state (evidence: `src/components/chat/SupportWidget.tsx`)
- Shared client shell → Chat state and engine: provides context (evidence: `src/components/ClientProviders.tsx`)
- Shared client shell → Role switcher: renders (evidence: `src/components/ClientProviders.tsx`)
- Shared client shell → Inquiry drawer: renders (evidence: `src/components/ClientProviders.tsx`)
- Shared client shell → Help widget: renders (evidence: `src/components/ClientProviders.tsx`)
- Shared client shell → Credential assistant: renders (evidence: `src/components/ClientProviders.tsx`)
- Chat state and engine → Demo catalog data: resolves users (evidence: `src/context/ChatContext.tsx`)
- Chat state and engine → Nexconn chat services: initializes engine (evidence: `src/context/ChatContext.tsx`)
- Official ChatUI → Nexconn chat services: initializes ChatUI (evidence: `src/components/chat/NexconnChatUIProvider.tsx`)
- Credential assistant → Config status API: checks setup
- Credential assistant → Save credentials API: updates setup
- Token minting API → Nexconn token service: requests user token (evidence: `README.md`)
- Marketplace user → Token minting API: authenticates chat
