# gh237/chatwoot architecture

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

- Interactive diagram: https://gitdiagram.com/gh237/chatwoot
- Repository: https://github.com/gh237/chatwoot

## Overview

Chatwoot is an omnichannel customer-support platform with a web dashboard, customer-facing inbox APIs, help center, reporting, integrations, and Captain AI. The central workflow is a customer contacting support through a channel, an agent handling the resulting conversation in the inbox, and the team monitoring outcomes through reports. The tree and excerpts establish the route surface and several internal capabilities, but do not expose most controller-to-service calls; uncertain connections are therefore omitted or marked dashed.

Main entry points: [`config/routes.rb`](https://github.com/gh237/chatwoot/blob/develop/config/routes.rb) (HTTP routes), [`app/controllers/api/v1/accounts/conversations_controller.rb`](https://github.com/gh237/chatwoot/blob/develop/app/controllers/api/v1/accounts/conversations_controller.rb) (Conversations), [`app/controllers/api/v1/accounts/conversations/messages_controller.rb`](https://github.com/gh237/chatwoot/blob/develop/app/controllers/api/v1/accounts/conversations/messages_controller.rb) (Conversation messages), [`app/controllers/api/v2/accounts/reports_controller.rb`](https://github.com/gh237/chatwoot/blob/develop/app/controllers/api/v2/accounts/reports_controller.rb) (Reports and insights)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Entry points"]
  node_routes["HTTP routes<br/>[routes.rb]"]
  node_dashboard["Agent dashboard"]
  node_account_api["Account API<br/>[base_controller.rb]"]
  node_public_api["Public inbox API"]
end

subgraph group_support["Support operations"]
  node_conversations["Conversations"]
  node_messages["Conversation messages"]
  node_contacts["Contact management"]
  node_automation["Automation and assignment"]
  node_conversation_store[("Application records")]
end

subgraph group_intelligence["AI and search"]
  node_search["Search<br/>[search_service.rb]"]
  node_captain["Captain tasks"]
  node_translation["Query translation"]
end

subgraph group_insights["Help and insights"]
  node_help_center["Help center portal"]
  node_reports["Reports and insights"]
  node_live_reports["Live monitoring"]
  node_year_review["Year in review"]
end

subgraph group_connectors["Channels and integrations"]
  node_channel_webhooks["Channel webhooks"]
  node_integrations["External integrations<br/>[apps_controller.rb]"]
  node_realtime["Realtime updates<br/>[room_channel.rb]"]
end

node_agent(("Support agent"))
node_customer(("Customer"))

node_agent -.->|"uses dashboard"| node_routes
node_customer -.->|"opens inbox"| node_routes
node_routes -->|"routes root"| node_dashboard
node_routes -->|"routes API"| node_conversations
node_routes -->|"routes messages"| node_messages
node_routes -->|"routes public inbox"| node_public_api
node_customer -.->|"contacts support"| node_channel_webhooks
node_agent -.->|"handles conversations"| node_conversations
node_agent -.->|"manages contacts"| node_contacts
node_agent -.->|"configures workflows"| node_automation
node_agent -.->|"reviews performance"| node_reports
node_agent -.->|"monitors activity"| node_live_reports
node_customer -.->|"finds answers"| node_help_center
node_captain -.->|"supports translation"| node_translation
node_customer -.->|"searches content"| node_search
node_agent -.->|"uses integrations"| node_integrations
node_conversations -.->|"persists records"| node_conversation_store
node_messages -.->|"persists messages"| node_conversation_store
node_conversations -.->|"broadcasts updates"| node_realtime
node_reports -.->|"includes yearly view"| node_year_review

click node_routes "https://github.com/gh237/chatwoot/blob/develop/config/routes.rb"
click node_dashboard "https://github.com/gh237/chatwoot/blob/develop/app/controllers/dashboard_controller.rb"
click node_account_api "https://github.com/gh237/chatwoot/blob/develop/app/controllers/api/v1/accounts/base_controller.rb"
click node_public_api "https://github.com/gh237/chatwoot/blob/develop/app/controllers/public/api/v1/inboxes/conversations_controller.rb"
click node_conversations "https://github.com/gh237/chatwoot/blob/develop/app/controllers/api/v1/accounts/conversations_controller.rb"
click node_messages "https://github.com/gh237/chatwoot/blob/develop/app/controllers/api/v1/accounts/conversations/messages_controller.rb"
click node_contacts "https://github.com/gh237/chatwoot/blob/develop/app/controllers/api/v1/accounts/contacts_controller.rb"
click node_automation "https://github.com/gh237/chatwoot/blob/develop/app/controllers/api/v1/accounts/automation_rules_controller.rb"
click node_search "https://github.com/gh237/chatwoot/blob/develop/app/services/search_service.rb"
click node_captain "https://github.com/gh237/chatwoot/blob/develop/lib/captain/base_task_service.rb"
click node_translation "https://github.com/gh237/chatwoot/blob/develop/enterprise/app/services/captain/llm/translate_query_service.rb"
click node_help_center "https://github.com/gh237/chatwoot/blob/develop/app/controllers/public/api/v1/portals/articles_controller.rb"
click node_reports "https://github.com/gh237/chatwoot/blob/develop/app/controllers/api/v2/accounts/reports_controller.rb"
click node_live_reports "https://github.com/gh237/chatwoot/blob/develop/app/controllers/api/v2/accounts/live_reports_controller.rb"
click node_year_review "https://github.com/gh237/chatwoot/blob/develop/app/controllers/api/v2/accounts/year_in_reviews_controller.rb"
click node_channel_webhooks "https://github.com/gh237/chatwoot/blob/develop/app/controllers/webhooks/whatsapp_controller.rb"
click node_integrations "https://github.com/gh237/chatwoot/blob/develop/app/controllers/api/v1/accounts/integrations/apps_controller.rb"
click node_realtime "https://github.com/gh237/chatwoot/blob/develop/app/channels/room_channel.rb"
click node_conversation_store "https://github.com/gh237/chatwoot/tree/develop/app/models"

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_routes,node_dashboard,node_account_api,node_public_api toneBlue
class node_conversations,node_messages,node_contacts,node_automation,node_conversation_store toneAmber
class node_search,node_captain,node_translation toneMint
class node_help_center,node_reports,node_live_reports,node_year_review toneRose
class node_channel_webhooks,node_integrations,node_realtime,node_agent,node_customer toneIndigo
```

## Components

### Entry points

- [HTTP routes](https://github.com/gh237/chatwoot/blob/develop/config/routes.rb): `config/routes.rb`
- [Agent dashboard](https://github.com/gh237/chatwoot/blob/develop/app/controllers/dashboard_controller.rb): `app/controllers/dashboard_controller.rb`
- [Account API](https://github.com/gh237/chatwoot/blob/develop/app/controllers/api/v1/accounts/base_controller.rb): `app/controllers/api/v1/accounts/base_controller.rb`
- [Public inbox API](https://github.com/gh237/chatwoot/blob/develop/app/controllers/public/api/v1/inboxes/conversations_controller.rb): `app/controllers/public/api/v1/inboxes/conversations_controller.rb`

### Support operations

- [Conversations](https://github.com/gh237/chatwoot/blob/develop/app/controllers/api/v1/accounts/conversations_controller.rb): `app/controllers/api/v1/accounts/conversations_controller.rb`
- [Conversation messages](https://github.com/gh237/chatwoot/blob/develop/app/controllers/api/v1/accounts/conversations/messages_controller.rb): `app/controllers/api/v1/accounts/conversations/messages_controller.rb`
- [Contact management](https://github.com/gh237/chatwoot/blob/develop/app/controllers/api/v1/accounts/contacts_controller.rb): `app/controllers/api/v1/accounts/contacts_controller.rb`
- [Automation and assignment](https://github.com/gh237/chatwoot/blob/develop/app/controllers/api/v1/accounts/automation_rules_controller.rb): `app/controllers/api/v1/accounts/automation_rules_controller.rb`
- [Application records](https://github.com/gh237/chatwoot/tree/develop/app/models): `app/models`

### AI and search

- [Search](https://github.com/gh237/chatwoot/blob/develop/app/services/search_service.rb): `app/services/search_service.rb`
- [Captain tasks](https://github.com/gh237/chatwoot/blob/develop/lib/captain/base_task_service.rb): `lib/captain/base_task_service.rb`
- [Query translation](https://github.com/gh237/chatwoot/blob/develop/enterprise/app/services/captain/llm/translate_query_service.rb): `enterprise/app/services/captain/llm/translate_query_service.rb`

### Help and insights

- [Help center portal](https://github.com/gh237/chatwoot/blob/develop/app/controllers/public/api/v1/portals/articles_controller.rb): `app/controllers/public/api/v1/portals/articles_controller.rb`
- [Reports and insights](https://github.com/gh237/chatwoot/blob/develop/app/controllers/api/v2/accounts/reports_controller.rb): `app/controllers/api/v2/accounts/reports_controller.rb`
- [Live monitoring](https://github.com/gh237/chatwoot/blob/develop/app/controllers/api/v2/accounts/live_reports_controller.rb): `app/controllers/api/v2/accounts/live_reports_controller.rb`
- [Year in review](https://github.com/gh237/chatwoot/blob/develop/app/controllers/api/v2/accounts/year_in_reviews_controller.rb): `app/controllers/api/v2/accounts/year_in_reviews_controller.rb`

### Channels and integrations

- [Channel webhooks](https://github.com/gh237/chatwoot/blob/develop/app/controllers/webhooks/whatsapp_controller.rb): `app/controllers/webhooks/whatsapp_controller.rb`
- [External integrations](https://github.com/gh237/chatwoot/blob/develop/app/controllers/api/v1/accounts/integrations/apps_controller.rb): `app/controllers/api/v1/accounts/integrations/apps_controller.rb`
- [Realtime updates](https://github.com/gh237/chatwoot/blob/develop/app/channels/room_channel.rb): `app/channels/room_channel.rb`

### Other components

- **Support agent**
- **Customer**

## Connections

- Support agent → HTTP routes: uses dashboard (evidence: `config/routes.rb`)
- Customer → HTTP routes: opens inbox (evidence: `config/routes.rb`)
- HTTP routes → Agent dashboard: routes root (evidence: `config/routes.rb`)
- HTTP routes → Conversations: routes API (evidence: `config/routes.rb`)
- HTTP routes → Conversation messages: routes messages (evidence: `config/routes.rb`)
- HTTP routes → Public inbox API: routes public inbox (evidence: `config/routes.rb`)
- Customer → Channel webhooks: contacts support
- Support agent → Conversations: handles conversations
- Support agent → Contact management: manages contacts
- Support agent → Automation and assignment: configures workflows
- Support agent → Reports and insights: reviews performance
- Support agent → Live monitoring: monitors activity
- Customer → Help center portal: finds answers
- Captain tasks → Query translation: supports translation
- Customer → Search: searches content
- Support agent → External integrations: uses integrations
- Conversations → Application records: persists records
- Conversation messages → Application records: persists messages
- Conversations → Realtime updates: broadcasts updates
- Reports and insights → Year in review: includes yearly view
