# bakhtadzegivi/rocket.chat architecture

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

- Interactive diagram: https://gitdiagram.com/bakhtadzegivi/rocket.chat
- Repository: https://github.com/bakhtadzegivi/rocket.chat

## Overview

Rocket.Chat is a customizable communications platform for private real-time conversations, including colleague and customer communication. The repository tree shows server APIs, authentication and authorization, apps, federation, and omnichannel features; the excerpts provide concrete runtime flows for DDP messaging, the embedded Livechat widget, UIKit interactions, and VoIP setup. The graph focuses on those evidenced flows and represents other major product areas as subsystems without guessing their internal calls. Unsampled subsystems and links are limited by the available excerpts.

Main entry points: [`packages/livechat/src/components/App/App.js`](https://github.com/bakhtadzegivi/rocket.chat/blob/develop/packages/livechat/src/components/App/App.js) (Widget application), [`apps/meteor/client/providers/CallProvider/hooks/useVoipClient.ts`](https://github.com/bakhtadzegivi/rocket.chat/blob/develop/apps/meteor/client/providers/CallProvider/hooks/useVoipClient.ts) (VoIP client hook), [`ee/apps/ddp-streamer/src/Server.ts`](https://github.com/bakhtadzegivi/rocket.chat/blob/develop/ee/apps/ddp-streamer/src/Server.ts) (DDP server), [`apps/meteor/client/UIKit/hooks/useUIKitStateManager.tsx`](https://github.com/bakhtadzegivi/rocket.chat/blob/develop/apps/meteor/client/UIKit/hooks/useUIKitStateManager.tsx) (UIKit state hook)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_collab["Collaboration platform"]
  node_meteor["Meteor client<br/>[main.ts]"]
  node_message_actions["Message actions<br/>[ActionManager.js]"]
  node_uikit_state["UIKit state hook"]
  node_router_context["Router context<br/>[RouterContext.ts]"]
  node_query_hook["Query parameter hook"]
  node_session_context["Session context<br/>[SessionContext.ts]"]
end

subgraph group_transport["Realtime transport"]
  node_ddp_client["DDP WebSocket client<br/>[Client.ts]"]
  node_ddp_server["DDP server<br/>[Server.ts]"]
  node_meteor_service["Meteor method service<br/>[index.ts]"]
end

subgraph group_livechat["Customer Livechat"]
  node_livechat_app["Widget application<br/>[App.js]"]
  node_livechat_store[("Widget state store<br/>[index.js]")]
  node_livechat_connection["Widget connection<br/>[connection.js]"]
  node_livechat_hooks["Widget hooks<br/>[hooks.js]"]
  node_livechat_triggers["Widget triggers<br/>[triggers.js]"]
  node_livechat_api["Widget API<br/>[api.ts]"]
  node_livechat_api_core["Livechat API<br/>[api.ts]"]
end

subgraph group_voice["Voice calling"]
  node_voip_hook["VoIP client hook<br/>[useVoipClient.ts]"]
  node_simple_voip["VoIP user factory<br/>[SimpleVoipUser.ts]"]
  node_voip_user["VoIP user<br/>[VoIPUser.ts]"]
  node_voip_events["VoIP event types"]
  node_voip_queue["VoIP queue aggregation<br/>[QueueAggregator.ts]"]
  node_voip_stream["VoIP stream<br/>[Stream.ts]"]
end

subgraph group_platform["Platform services"]
  node_rest_api["REST API<br/>[api.js]"]
  node_auth["Authentication<br/>[index.ts]"]
  node_authorization["Authorization<br/>[index.js]"]
  node_apps_engine["Apps engine<br/>[orchestrator.js]"]
  node_app_storage[("App source storage")]
  node_federation["Federation"]
end

node_users(("People"))

node_users -->|"use conversations"| node_meteor
node_users -->|"use API"| node_rest_api
node_ddp_client -->|"dispatches calls"| node_ddp_server
node_ddp_server -->|"falls back to"| node_meteor_service
node_livechat_app -->|"updates state"| node_livechat_store
node_livechat_app -->|"initializes"| node_livechat_connection
node_livechat_app -->|"initializes"| node_livechat_hooks
node_livechat_app -->|"processes"| node_livechat_triggers
node_voip_hook -->|"creates client"| node_simple_voip
node_voip_hook -->|"uses client"| node_voip_user
node_uikit_state -->|"subscribes to"| node_message_actions
node_query_hook -->|"reads parameter"| node_router_context

click node_meteor "https://github.com/bakhtadzegivi/rocket.chat/blob/develop/apps/meteor/client/main.ts"
click node_message_actions "https://github.com/bakhtadzegivi/rocket.chat/blob/develop/apps/meteor/app/ui-message/client/ActionManager.js"
click node_uikit_state "https://github.com/bakhtadzegivi/rocket.chat/blob/develop/apps/meteor/client/UIKit/hooks/useUIKitStateManager.tsx"
click node_router_context "https://github.com/bakhtadzegivi/rocket.chat/blob/develop/packages/ui-contexts/src/RouterContext.ts"
click node_query_hook "https://github.com/bakhtadzegivi/rocket.chat/blob/develop/packages/ui-contexts/src/hooks/useQueryStringParameter.ts"
click node_rest_api "https://github.com/bakhtadzegivi/rocket.chat/blob/develop/apps/meteor/app/api/server/api.js"
click node_auth "https://github.com/bakhtadzegivi/rocket.chat/blob/develop/apps/meteor/app/authentication/server/index.ts"
click node_authorization "https://github.com/bakhtadzegivi/rocket.chat/blob/develop/apps/meteor/app/authorization/server/index.js"
click node_apps_engine "https://github.com/bakhtadzegivi/rocket.chat/blob/develop/apps/meteor/app/apps/server/orchestrator.js"
click node_app_storage "https://github.com/bakhtadzegivi/rocket.chat/blob/develop/apps/meteor/app/apps/server/storage/AppGridFSSourceStorage.ts"
click node_federation "https://github.com/bakhtadzegivi/rocket.chat/blob/develop/apps/meteor/app/federation-v2/server/application/RoomServiceReceiver.ts"
click node_ddp_client "https://github.com/bakhtadzegivi/rocket.chat/blob/develop/ee/apps/ddp-streamer/src/Client.ts"
click node_ddp_server "https://github.com/bakhtadzegivi/rocket.chat/blob/develop/ee/apps/ddp-streamer/src/Server.ts"
click node_meteor_service "https://github.com/bakhtadzegivi/rocket.chat/blob/develop/apps/meteor/server/sdk/index.ts"
click node_livechat_app "https://github.com/bakhtadzegivi/rocket.chat/blob/develop/packages/livechat/src/components/App/App.js"
click node_livechat_store "https://github.com/bakhtadzegivi/rocket.chat/blob/develop/packages/livechat/src/store/index.js"
click node_livechat_connection "https://github.com/bakhtadzegivi/rocket.chat/blob/develop/packages/livechat/src/lib/connection.js"
click node_livechat_hooks "https://github.com/bakhtadzegivi/rocket.chat/blob/develop/packages/livechat/src/lib/hooks.js"
click node_livechat_triggers "https://github.com/bakhtadzegivi/rocket.chat/blob/develop/packages/livechat/src/lib/triggers.js"
click node_livechat_api "https://github.com/bakhtadzegivi/rocket.chat/blob/develop/packages/livechat/src/api.ts"
click node_voip_hook "https://github.com/bakhtadzegivi/rocket.chat/blob/develop/apps/meteor/client/providers/CallProvider/hooks/useVoipClient.ts"
click node_simple_voip "https://github.com/bakhtadzegivi/rocket.chat/blob/develop/apps/meteor/client/lib/voip/SimpleVoipUser.ts"
click node_voip_user "https://github.com/bakhtadzegivi/rocket.chat/blob/develop/apps/meteor/client/lib/voip/VoIPUser.ts"
click node_voip_events "https://github.com/bakhtadzegivi/rocket.chat/blob/develop/packages/core-typings/src/voip/IVoipClientEvents.ts"
click node_session_context "https://github.com/bakhtadzegivi/rocket.chat/blob/develop/packages/ui-contexts/src/SessionContext.ts"
click node_livechat_api_core "https://github.com/bakhtadzegivi/rocket.chat/blob/develop/packages/livechat/src/api.ts"
click node_voip_queue "https://github.com/bakhtadzegivi/rocket.chat/blob/develop/apps/meteor/client/lib/voip/QueueAggregator.ts"
click node_voip_stream "https://github.com/bakhtadzegivi/rocket.chat/blob/develop/apps/meteor/client/lib/voip/Stream.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_meteor,node_message_actions,node_uikit_state,node_router_context,node_query_hook,node_session_context toneBlue
class node_ddp_client,node_ddp_server,node_meteor_service toneAmber
class node_livechat_app,node_livechat_store,node_livechat_connection,node_livechat_hooks,node_livechat_triggers,node_livechat_api,node_livechat_api_core toneMint
class node_voip_hook,node_simple_voip,node_voip_user,node_voip_events,node_voip_queue,node_voip_stream toneRose
class node_rest_api,node_auth,node_authorization,node_apps_engine,node_app_storage,node_federation,node_users toneIndigo
```

## Components

### Collaboration platform

- [Meteor client](https://github.com/bakhtadzegivi/rocket.chat/blob/develop/apps/meteor/client/main.ts): `apps/meteor/client/main.ts`
- [Message actions](https://github.com/bakhtadzegivi/rocket.chat/blob/develop/apps/meteor/app/ui-message/client/ActionManager.js): `apps/meteor/app/ui-message/client/ActionManager.js`
- [UIKit state hook](https://github.com/bakhtadzegivi/rocket.chat/blob/develop/apps/meteor/client/UIKit/hooks/useUIKitStateManager.tsx): `apps/meteor/client/UIKit/hooks/useUIKitStateManager.tsx`
- [Router context](https://github.com/bakhtadzegivi/rocket.chat/blob/develop/packages/ui-contexts/src/RouterContext.ts): `packages/ui-contexts/src/RouterContext.ts`
- [Query parameter hook](https://github.com/bakhtadzegivi/rocket.chat/blob/develop/packages/ui-contexts/src/hooks/useQueryStringParameter.ts): `packages/ui-contexts/src/hooks/useQueryStringParameter.ts`
- [Session context](https://github.com/bakhtadzegivi/rocket.chat/blob/develop/packages/ui-contexts/src/SessionContext.ts): `packages/ui-contexts/src/SessionContext.ts`

### Realtime transport

- [DDP WebSocket client](https://github.com/bakhtadzegivi/rocket.chat/blob/develop/ee/apps/ddp-streamer/src/Client.ts): `ee/apps/ddp-streamer/src/Client.ts`
- [DDP server](https://github.com/bakhtadzegivi/rocket.chat/blob/develop/ee/apps/ddp-streamer/src/Server.ts): `ee/apps/ddp-streamer/src/Server.ts`
- [Meteor method service](https://github.com/bakhtadzegivi/rocket.chat/blob/develop/apps/meteor/server/sdk/index.ts): `apps/meteor/server/sdk/index.ts`

### Customer Livechat

- [Widget application](https://github.com/bakhtadzegivi/rocket.chat/blob/develop/packages/livechat/src/components/App/App.js): `packages/livechat/src/components/App/App.js`
- [Widget state store](https://github.com/bakhtadzegivi/rocket.chat/blob/develop/packages/livechat/src/store/index.js): `packages/livechat/src/store/index.js`
- [Widget connection](https://github.com/bakhtadzegivi/rocket.chat/blob/develop/packages/livechat/src/lib/connection.js): `packages/livechat/src/lib/connection.js`
- [Widget hooks](https://github.com/bakhtadzegivi/rocket.chat/blob/develop/packages/livechat/src/lib/hooks.js): `packages/livechat/src/lib/hooks.js`
- [Widget triggers](https://github.com/bakhtadzegivi/rocket.chat/blob/develop/packages/livechat/src/lib/triggers.js): `packages/livechat/src/lib/triggers.js`
- [Widget API](https://github.com/bakhtadzegivi/rocket.chat/blob/develop/packages/livechat/src/api.ts): `packages/livechat/src/api.ts`
- [Livechat API](https://github.com/bakhtadzegivi/rocket.chat/blob/develop/packages/livechat/src/api.ts): `packages/livechat/src/api.ts`

### Voice calling

- [VoIP client hook](https://github.com/bakhtadzegivi/rocket.chat/blob/develop/apps/meteor/client/providers/CallProvider/hooks/useVoipClient.ts): `apps/meteor/client/providers/CallProvider/hooks/useVoipClient.ts`
- [VoIP user factory](https://github.com/bakhtadzegivi/rocket.chat/blob/develop/apps/meteor/client/lib/voip/SimpleVoipUser.ts): `apps/meteor/client/lib/voip/SimpleVoipUser.ts`
- [VoIP user](https://github.com/bakhtadzegivi/rocket.chat/blob/develop/apps/meteor/client/lib/voip/VoIPUser.ts): `apps/meteor/client/lib/voip/VoIPUser.ts`
- [VoIP event types](https://github.com/bakhtadzegivi/rocket.chat/blob/develop/packages/core-typings/src/voip/IVoipClientEvents.ts): `packages/core-typings/src/voip/IVoipClientEvents.ts`
- [VoIP queue aggregation](https://github.com/bakhtadzegivi/rocket.chat/blob/develop/apps/meteor/client/lib/voip/QueueAggregator.ts): `apps/meteor/client/lib/voip/QueueAggregator.ts`
- [VoIP stream](https://github.com/bakhtadzegivi/rocket.chat/blob/develop/apps/meteor/client/lib/voip/Stream.ts): `apps/meteor/client/lib/voip/Stream.ts`

### Platform services

- [REST API](https://github.com/bakhtadzegivi/rocket.chat/blob/develop/apps/meteor/app/api/server/api.js): `apps/meteor/app/api/server/api.js`
- [Authentication](https://github.com/bakhtadzegivi/rocket.chat/blob/develop/apps/meteor/app/authentication/server/index.ts): `apps/meteor/app/authentication/server/index.ts`
- [Authorization](https://github.com/bakhtadzegivi/rocket.chat/blob/develop/apps/meteor/app/authorization/server/index.js): `apps/meteor/app/authorization/server/index.js`
- [Apps engine](https://github.com/bakhtadzegivi/rocket.chat/blob/develop/apps/meteor/app/apps/server/orchestrator.js): `apps/meteor/app/apps/server/orchestrator.js`
- [App source storage](https://github.com/bakhtadzegivi/rocket.chat/blob/develop/apps/meteor/app/apps/server/storage/AppGridFSSourceStorage.ts): `apps/meteor/app/apps/server/storage/AppGridFSSourceStorage.ts`
- [Federation](https://github.com/bakhtadzegivi/rocket.chat/blob/develop/apps/meteor/app/federation-v2/server/application/RoomServiceReceiver.ts): `apps/meteor/app/federation-v2/server/application/RoomServiceReceiver.ts`

### Other components

- **People**

## Connections

- People → Meteor client: use conversations
- People → REST API: use API
- DDP WebSocket client → DDP server: dispatches calls (evidence: `ee/apps/ddp-streamer/src/Client.ts`)
- DDP server → Meteor method service: falls back to (evidence: `ee/apps/ddp-streamer/src/Server.ts`)
- Widget application → Widget state store: updates state (evidence: `packages/livechat/src/components/App/App.js`)
- Widget application → Widget connection: initializes (evidence: `packages/livechat/src/components/App/App.js`)
- Widget application → Widget hooks: initializes (evidence: `packages/livechat/src/components/App/App.js`)
- Widget application → Widget triggers: processes (evidence: `packages/livechat/src/components/App/App.js`)
- VoIP client hook → VoIP user factory: creates client (evidence: `apps/meteor/client/providers/CallProvider/hooks/useVoipClient.ts`)
- VoIP client hook → VoIP user: uses client (evidence: `apps/meteor/client/providers/CallProvider/hooks/useVoipClient.ts`)
- UIKit state hook → Message actions: subscribes to (evidence: `apps/meteor/client/UIKit/hooks/useUIKitStateManager.tsx`)
- Query parameter hook → Router context: reads parameter (evidence: `packages/ui-contexts/src/hooks/useQueryStringParameter.ts`)
