# hrodriguez78/chatwoot architecture

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

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

## Overview

Chatwoot is a self-hosted customer-support platform. A customer or agent reaches it through website chat or the support desk; conversations are centralized in inboxes for agent handling, automation, or AI assistance. The application also provides contact and campaign management, reporting, integrations, and a public help center. The graph combines documented capabilities with the sampled Rails routes and database schema. Most feature implementation files were not sampled, so feature-level internal calls are not asserted.

Main entry points: [`app/models`](https://github.com/hrodriguez78/chatwoot/tree/main/app/models) (Conversation inbox), [`config/routes.rb`](https://github.com/hrodriguez78/chatwoot/blob/main/config/routes.rb) (Rails routes), [`config/application.rb`](https://github.com/hrodriguez78/chatwoot/blob/main/config/application.rb) (Rails application), [`app/javascript`](https://github.com/hrodriguez78/chatwoot/tree/main/app/javascript) (Agent dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Application entry"]
  node_rails_routes["Rails routes<br/>[routes.rb]"]
  node_dashboard["Agent dashboard"]
  node_web_widget["Web chat widget"]
  node_api_controllers["API controllers"]
end

subgraph group_support["Support workflow"]
  node_conversations["Conversation inbox"]
  node_channel_integrations["Messaging channels"]
  node_contact_management["Contact management"]
  node_automation["Assignment and automation"]
  node_captain["Captain AI"]
end

subgraph group_engagement["Customer engagement"]
  node_help_center["Help center portal"]
  node_campaigns["Campaigns"]
  node_integrations["External integrations"]
end

subgraph group_insights["Automation and insights"]
  node_reports["Reports and insights"]
  node_background_jobs["Background jobs"]
end

subgraph group_foundation["Platform foundation"]
  node_database[("Application database<br/>[schema.rb]")]
  node_rails_app["Rails application<br/>[application.rb]"]
  node_boot["Application boot<br/>[boot.rb]"]
end

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

node_customer -->|"starts chat"| node_web_widget
node_agent -->|"handles support"| node_dashboard
node_web_widget -.->|"sends requests"| node_rails_routes
node_dashboard -.->|"uses API"| node_rails_routes
node_rails_routes -->|"routes requests"| node_api_controllers
node_rails_routes -->|"routes portal"| node_help_center
node_rails_routes -->|"routes reports"| node_reports
node_api_controllers -.->|"serves conversations"| node_conversations
node_channel_integrations -->|"centralizes messages"| node_conversations
node_conversations -->|"uses contact profiles"| node_contact_management
node_conversations -->|"supports routing"| node_automation
node_conversations -->|"enables AI assistance"| node_captain
node_customer -->|"reads articles"| node_help_center
node_campaigns -->|"engages proactively"| node_customer
node_integrations -->|"extends support"| node_conversations
node_reports -->|"analyzes activity"| node_conversations
node_background_jobs -.->|"supports workflows"| node_automation
node_conversations -.->|"persists records"| node_database
node_rails_app -->|"requires boot"| node_boot
node_rails_app -.->|"hosts routes"| node_rails_routes

click node_rails_routes "https://github.com/hrodriguez78/chatwoot/blob/main/config/routes.rb"
click node_dashboard "https://github.com/hrodriguez78/chatwoot/tree/main/app/javascript"
click node_api_controllers "https://github.com/hrodriguez78/chatwoot/tree/main/app/controllers"
click node_conversations "https://github.com/hrodriguez78/chatwoot/tree/main/app/models"
click node_channel_integrations "https://github.com/hrodriguez78/chatwoot/tree/main/app/channels"
click node_contact_management "https://github.com/hrodriguez78/chatwoot/tree/main/app/models"
click node_automation "https://github.com/hrodriguez78/chatwoot/tree/main/app/services"
click node_captain "https://github.com/hrodriguez78/chatwoot/tree/main/app/services"
click node_help_center "https://github.com/hrodriguez78/chatwoot/tree/main/app/controllers"
click node_campaigns "https://github.com/hrodriguez78/chatwoot/tree/main/app/models"
click node_integrations "https://github.com/hrodriguez78/chatwoot/tree/main/app/services"
click node_reports "https://github.com/hrodriguez78/chatwoot/tree/main/app/dashboards"
click node_background_jobs "https://github.com/hrodriguez78/chatwoot/tree/main/app/jobs"
click node_database "https://github.com/hrodriguez78/chatwoot/blob/main/db/schema.rb"
click node_rails_app "https://github.com/hrodriguez78/chatwoot/blob/main/config/application.rb"
click node_boot "https://github.com/hrodriguez78/chatwoot/blob/main/config/boot.rb"

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_rails_routes,node_dashboard,node_web_widget,node_api_controllers toneBlue
class node_conversations,node_channel_integrations,node_contact_management,node_automation,node_captain toneAmber
class node_help_center,node_campaigns,node_integrations toneMint
class node_reports,node_background_jobs toneRose
class node_database,node_rails_app,node_boot,node_customer,node_agent toneIndigo
```

## Components

### Application entry

- [Rails routes](https://github.com/hrodriguez78/chatwoot/blob/main/config/routes.rb): `config/routes.rb`
- [Agent dashboard](https://github.com/hrodriguez78/chatwoot/tree/main/app/javascript): `app/javascript`
- **Web chat widget**
- [API controllers](https://github.com/hrodriguez78/chatwoot/tree/main/app/controllers): `app/controllers`

### Support workflow

- [Conversation inbox](https://github.com/hrodriguez78/chatwoot/tree/main/app/models): `app/models`
- [Messaging channels](https://github.com/hrodriguez78/chatwoot/tree/main/app/channels): `app/channels`
- [Contact management](https://github.com/hrodriguez78/chatwoot/tree/main/app/models): `app/models`
- [Assignment and automation](https://github.com/hrodriguez78/chatwoot/tree/main/app/services): `app/services`
- [Captain AI](https://github.com/hrodriguez78/chatwoot/tree/main/app/services): `app/services`

### Customer engagement

- [Help center portal](https://github.com/hrodriguez78/chatwoot/tree/main/app/controllers): `app/controllers`
- [Campaigns](https://github.com/hrodriguez78/chatwoot/tree/main/app/models): `app/models`
- [External integrations](https://github.com/hrodriguez78/chatwoot/tree/main/app/services): `app/services`

### Automation and insights

- [Reports and insights](https://github.com/hrodriguez78/chatwoot/tree/main/app/dashboards): `app/dashboards`
- [Background jobs](https://github.com/hrodriguez78/chatwoot/tree/main/app/jobs): `app/jobs`

### Platform foundation

- [Application database](https://github.com/hrodriguez78/chatwoot/blob/main/db/schema.rb): `db/schema.rb`
- [Rails application](https://github.com/hrodriguez78/chatwoot/blob/main/config/application.rb): `config/application.rb`
- [Application boot](https://github.com/hrodriguez78/chatwoot/blob/main/config/boot.rb): `config/boot.rb`

### Other components

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

## Connections

- Customer → Web chat widget: starts chat
- Support agent → Agent dashboard: handles support
- Web chat widget → Rails routes: sends requests
- Agent dashboard → Rails routes: uses API
- Rails routes → API controllers: routes requests (evidence: `config/routes.rb`)
- Rails routes → Help center portal: routes portal (evidence: `config/routes.rb`)
- Rails routes → Reports and insights: routes reports (evidence: `config/routes.rb`)
- API controllers → Conversation inbox: serves conversations
- Messaging channels → Conversation inbox: centralizes messages
- Conversation inbox → Contact management: uses contact profiles
- Conversation inbox → Assignment and automation: supports routing
- Conversation inbox → Captain AI: enables AI assistance
- Customer → Help center portal: reads articles
- Campaigns → Customer: engages proactively
- External integrations → Conversation inbox: extends support
- Reports and insights → Conversation inbox: analyzes activity
- Background jobs → Assignment and automation: supports workflows
- Conversation inbox → Application database: persists records
- Rails application → Application boot: requires boot (evidence: `config/application.rb`)
- Rails application → Rails routes: hosts routes
