# falucas17/chatbot-support-platform architecture

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

- Interactive diagram: https://gitdiagram.com/falucas17/chatbot-support-platform
- Repository: https://github.com/falucas17/chatbot-support-platform

## Overview

EasyEvent Support Platform is a multi-tenant AI customer-support product with an embeddable chatbot, agent console, knowledge documents, and human escalation. A visitor sends a message to the Django API; the backend handles conversation work and can use either the EasyEvent or EasyCoop assistant engine. Agents review conversations and reply through the admin interface. The README also documents document/OCR, authentication, and Discord/email escalation capabilities. Some connections to unsampled integrations and subsystems are not shown because the available excerpts do not establish their runtime wiring.

Main entry points: [`chatbot/views.py`](https://github.com/falucas17/chatbot-support-platform/blob/main/chatbot/views.py) (Message handling), [`chatbot/urls.py`](https://github.com/falucas17/chatbot-support-platform/blob/main/chatbot/urls.py) (API routes), [`admin/src/App.jsx`](https://github.com/falucas17/chatbot-support-platform/blob/main/admin/src/App.jsx) (Admin application), [`chatbot/ai_engine.py`](https://github.com/falucas17/chatbot-support-platform/blob/main/chatbot/ai_engine.py) (EasyEvent AI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_chat["Chat and AI"]
  node_widget["Chat widget<br/>[simple-widget.js]"]
  node_api_routes["API routes<br/>[urls.py]"]
  node_message_api["Message handling<br/>[views.py]"]
  node_event_ai["EasyEvent AI<br/>[ai_engine.py]"]
  node_coop_ai["EasyCoop AI"]
  node_response["Bot response<br/>[views.py]"]
end

subgraph group_data["Support data"]
  node_support_data[("Conversations and knowledge<br/>[models.py]")]
  node_serializers["API serializers<br/>[serializers.py]"]
  node_document_ops["Document management<br/>[views.py]"]
end

subgraph group_agent["Agent console"]
  node_admin_app["Admin application<br/>[App.jsx]"]
  node_conversation_list["Conversation list"]
  node_conversation_detail["Conversation detail"]
  node_admin_api["Admin API client<br/>[api.js]"]
  node_django_admin["Admin conversation handlers<br/>[views.py]"]
end

subgraph group_integrations["Integrations and access"]
  node_auth["User and admin access<br/>[views.py]"]
  node_discord["Discord escalation"]
  node_email["Email escalation"]
  node_laravel["EasyEvent Laravel"]
  node_grok["Grok xAI"]
end

node_visitor(("Chat visitor"))

node_visitor -.->|"sends message"| node_widget
node_widget -.->|"submits chat"| node_api_routes
node_api_routes -->|"routes requests"| node_message_api
node_message_api -->|"invokes assistant"| node_event_ai
node_message_api -->|"invokes assistant"| node_coop_ai
node_message_api -->|"reads and writes"| node_support_data
node_message_api -->|"validates input"| node_serializers
node_message_api -->|"returns reply"| node_response
node_event_ai -.->|"queries model"| node_grok
node_event_ai -->|"fetches user context"| node_laravel
node_coop_ai -->|"fetches user context"| node_laravel
node_api_routes -->|"routes document requests"| node_document_ops
node_admin_app -->|"loads conversations"| node_admin_api
node_admin_app -->|"renders list"| node_conversation_list
node_admin_app -->|"renders detail"| node_conversation_detail
node_conversation_detail -->|"loads and replies"| node_admin_api
node_admin_api -.->|"calls conversation API"| node_django_admin
node_django_admin -->|"reads and updates"| node_support_data
node_message_api -->|"notifies escalation"| node_discord
node_message_api -.->|"sends escalation"| node_email
node_api_routes -->|"routes access flows"| node_auth
node_conversation_detail -->|"marks resolved"| node_laravel

click node_widget "https://github.com/falucas17/chatbot-support-platform/blob/main/chatbot/static/simple-widget.js"
click node_api_routes "https://github.com/falucas17/chatbot-support-platform/blob/main/chatbot/urls.py"
click node_message_api "https://github.com/falucas17/chatbot-support-platform/blob/main/chatbot/views.py"
click node_event_ai "https://github.com/falucas17/chatbot-support-platform/blob/main/chatbot/ai_engine.py"
click node_coop_ai "https://github.com/falucas17/chatbot-support-platform/blob/main/chatbot/ai_engine_easycoop.py"
click node_response "https://github.com/falucas17/chatbot-support-platform/blob/main/chatbot/views.py"
click node_support_data "https://github.com/falucas17/chatbot-support-platform/blob/main/chatbot/models.py"
click node_serializers "https://github.com/falucas17/chatbot-support-platform/blob/main/chatbot/serializers.py"
click node_document_ops "https://github.com/falucas17/chatbot-support-platform/blob/main/chatbot/views.py"
click node_admin_app "https://github.com/falucas17/chatbot-support-platform/blob/main/admin/src/App.jsx"
click node_conversation_list "https://github.com/falucas17/chatbot-support-platform/blob/main/admin/src/components/ConversationList.jsx"
click node_conversation_detail "https://github.com/falucas17/chatbot-support-platform/blob/main/admin/src/components/ConversationDetail.jsx"
click node_admin_api "https://github.com/falucas17/chatbot-support-platform/blob/main/admin/src/api.js"
click node_django_admin "https://github.com/falucas17/chatbot-support-platform/blob/main/chatbot/views.py"
click node_auth "https://github.com/falucas17/chatbot-support-platform/blob/main/chatbot/views.py"

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_widget,node_api_routes,node_message_api,node_event_ai,node_coop_ai,node_response toneBlue
class node_support_data,node_serializers,node_document_ops toneAmber
class node_admin_app,node_conversation_list,node_conversation_detail,node_admin_api,node_django_admin toneMint
class node_auth,node_discord,node_email,node_laravel,node_grok toneRose
class node_visitor toneIndigo
```

## Components

### Chat and AI

- [Chat widget](https://github.com/falucas17/chatbot-support-platform/blob/main/chatbot/static/simple-widget.js): `chatbot/static/simple-widget.js`
- [API routes](https://github.com/falucas17/chatbot-support-platform/blob/main/chatbot/urls.py): `chatbot/urls.py`
- [Message handling](https://github.com/falucas17/chatbot-support-platform/blob/main/chatbot/views.py): `chatbot/views.py`
- [EasyEvent AI](https://github.com/falucas17/chatbot-support-platform/blob/main/chatbot/ai_engine.py): `chatbot/ai_engine.py`
- [EasyCoop AI](https://github.com/falucas17/chatbot-support-platform/blob/main/chatbot/ai_engine_easycoop.py): `chatbot/ai_engine_easycoop.py`
- [Bot response](https://github.com/falucas17/chatbot-support-platform/blob/main/chatbot/views.py): `chatbot/views.py`

### Support data

- [Conversations and knowledge](https://github.com/falucas17/chatbot-support-platform/blob/main/chatbot/models.py): `chatbot/models.py`
- [API serializers](https://github.com/falucas17/chatbot-support-platform/blob/main/chatbot/serializers.py): `chatbot/serializers.py`
- [Document management](https://github.com/falucas17/chatbot-support-platform/blob/main/chatbot/views.py): `chatbot/views.py`

### Agent console

- [Admin application](https://github.com/falucas17/chatbot-support-platform/blob/main/admin/src/App.jsx): `admin/src/App.jsx`
- [Conversation list](https://github.com/falucas17/chatbot-support-platform/blob/main/admin/src/components/ConversationList.jsx): `admin/src/components/ConversationList.jsx`
- [Conversation detail](https://github.com/falucas17/chatbot-support-platform/blob/main/admin/src/components/ConversationDetail.jsx): `admin/src/components/ConversationDetail.jsx`
- [Admin API client](https://github.com/falucas17/chatbot-support-platform/blob/main/admin/src/api.js): `admin/src/api.js`
- [Admin conversation handlers](https://github.com/falucas17/chatbot-support-platform/blob/main/chatbot/views.py): `chatbot/views.py`

### Integrations and access

- [User and admin access](https://github.com/falucas17/chatbot-support-platform/blob/main/chatbot/views.py): `chatbot/views.py`
- **Discord escalation**
- **Email escalation**
- **EasyEvent Laravel**
- **Grok xAI**

### Other components

- **Chat visitor**

## Connections

- Chat visitor → Chat widget: sends message (evidence: `README.md`)
- Chat widget → API routes: submits chat
- API routes → Message handling: routes requests (evidence: `chatbot/urls.py`)
- Message handling → EasyEvent AI: invokes assistant (evidence: `chatbot/views.py`)
- Message handling → EasyCoop AI: invokes assistant (evidence: `chatbot/views.py`)
- Message handling → Conversations and knowledge: reads and writes (evidence: `chatbot/views.py`)
- Message handling → API serializers: validates input (evidence: `chatbot/views.py`)
- Message handling → Bot response: returns reply (evidence: `chatbot/views.py`)
- EasyEvent AI → Grok xAI: queries model
- EasyEvent AI → EasyEvent Laravel: fetches user context (evidence: `chatbot/ai_engine.py`)
- EasyCoop AI → EasyEvent Laravel: fetches user context (evidence: `chatbot/ai_engine_easycoop.py`)
- API routes → Document management: routes document requests (evidence: `chatbot/urls.py`)
- Admin application → Admin API client: loads conversations (evidence: `admin/src/App.jsx`)
- Admin application → Conversation list: renders list (evidence: `admin/src/App.jsx`)
- Admin application → Conversation detail: renders detail (evidence: `admin/src/App.jsx`)
- Conversation detail → Admin API client: loads and replies (evidence: `admin/src/components/ConversationDetail.jsx`)
- Admin API client → Admin conversation handlers: calls conversation API
- Admin conversation handlers → Conversations and knowledge: reads and updates (evidence: `chatbot/views.py`)
- Message handling → Discord escalation: notifies escalation (evidence: `chatbot/views.py`)
- Message handling → Email escalation: sends escalation
- API routes → User and admin access: routes access flows (evidence: `chatbot/urls.py`)
- Conversation detail → EasyEvent Laravel: marks resolved (evidence: `admin/src/components/ConversationDetail.jsx`)
