# arin004joshi/rocket.chat architecture

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

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

## Overview

Rocket.Chat is a secure team-communications platform. A principal workflow is a user composing and viewing conversations in the client, with real-time communication supported by the server; the sampled excerpts do not show the client/server message path, so that connection is marked unverified. Major documented branches include attribute-based access control, Apps-Engine integrations, federation, and voice/video. The graph also preserves the indexed search, presence, random, and media-preview modules; unsampled implementation links are omitted or marked unverified.

Main entry points: [`packages/apps/src/server/AppManager.ts`](https://github.com/arin004joshi/rocket.chat/blob/develop/packages/apps/src/server/AppManager.ts) (App manager), [`packages/apps/src/AppsEngine.ts`](https://github.com/arin004joshi/rocket.chat/blob/develop/packages/apps/src/AppsEngine.ts) (Apps-Engine API), [`apps/meteor/client/components/message/MessageContentBody.tsx`](https://github.com/arin004joshi/rocket.chat/blob/develop/apps/meteor/client/components/message/MessageContentBody.tsx) (Message interface), [`packages/ui-livekit/src/usePreviewVideoTrack.ts`](https://github.com/arin004joshi/rocket.chat/blob/develop/packages/ui-livekit/src/usePreviewVideoTrack.ts) (Video preview)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_collaboration["Conversation and collaboration"]
  node_message_ui["Message interface"]
  node_discussion_ui["Discussion creation"]
  node_video_preview["Video preview"]
  node_media_signaling["Media signaling"]
  node_ai_search["AI search<br/>[clientSearch.ts]"]
end

subgraph group_security["Security and identity"]
  node_abac["Attribute access control<br/>[engine.ts]"]
end

subgraph group_extensions["Apps and integrations"]
  node_apps_engine["Apps-Engine API<br/>[AppsEngine.ts]"]
  node_app_manager["App manager<br/>[AppManager.ts]"]
  node_app_runtime["App runtime"]
  node_app_storage[("App metadata storage")]
  node_marketplace["App marketplace"]
end

subgraph group_platform["Realtime platform"]
  node_federation["Server federation<br/>[S2SManager.ts]"]
  node_presence["Presence engine<br/>[presenceEngine.ts]"]
  node_ddp_client["DDP client<br/>[ClientStream.ts]"]
  node_ddp_server["DDP server<br/>[Server.ts]"]
end

subgraph group_shared["Shared client capabilities"]
  node_periods["Dashboard periods<br/>[periods.ts]"]
  node_period_storage["Period selection state"]
  node_random["Random generator<br/>[main.client.ts]"]
  node_media_queries["Media query hook<br/>[useMediaQueries.ts]"]
end

node_user(("Workspace user"))

node_user -->|"uses"| node_message_ui
node_message_ui -.->|"realtime transport"| node_ddp_client
node_ddp_client -.->|"communicates"| node_ddp_server
node_user -->|"creates discussions"| node_discussion_ui
node_user -->|"previews calls"| node_video_preview
node_video_preview -.->|"uses media signaling"| node_media_signaling
node_user -->|"access governed by"| node_abac
node_apps_engine -->|"exports"| node_app_manager
node_apps_engine -->|"exports"| node_app_storage
node_app_manager -.->|"runs apps"| node_app_runtime
node_app_manager -.->|"uses metadata"| node_app_storage
node_user -->|"discovers apps"| node_marketplace
node_user -.->|"searches conversations"| node_ai_search
node_user -->|"communicates across networks"| node_federation
node_user -.->|"uses presence"| node_presence
node_period_storage -->|"uses period definitions"| node_periods
node_user -.->|"client capability"| node_random
node_user -.->|"client capability"| node_media_queries

click node_message_ui "https://github.com/arin004joshi/rocket.chat/blob/develop/apps/meteor/client/components/message/MessageContentBody.tsx"
click node_discussion_ui "https://github.com/arin004joshi/rocket.chat/blob/develop/apps/meteor/client/components/CreateDiscussion/CreateDiscussion.tsx"
click node_video_preview "https://github.com/arin004joshi/rocket.chat/blob/develop/packages/ui-livekit/src/usePreviewVideoTrack.ts"
click node_media_signaling "https://github.com/arin004joshi/rocket.chat/blob/develop/packages/media-signaling/src/lib/NegotiationManager.ts"
click node_abac "https://github.com/arin004joshi/rocket.chat/blob/develop/ee/packages/abac/src/classification-banner/engine.ts"
click node_apps_engine "https://github.com/arin004joshi/rocket.chat/blob/develop/packages/apps/src/AppsEngine.ts"
click node_app_manager "https://github.com/arin004joshi/rocket.chat/blob/develop/packages/apps/src/server/AppManager.ts"
click node_app_runtime "https://github.com/arin004joshi/rocket.chat/blob/develop/packages/apps/src/server/runtime/AppsEngineRuntime.ts"
click node_app_storage "https://github.com/arin004joshi/rocket.chat/blob/develop/packages/apps/src/server/storage/AppMetadataStorage.ts"
click node_marketplace "https://github.com/arin004joshi/rocket.chat/blob/develop/apps/meteor/client/views/marketplace/hooks/useAppsCountQuery.ts"
click node_ai_search "https://github.com/arin004joshi/rocket.chat/blob/develop/packages/ai-search/src/clientSearch.ts"
click node_federation "https://github.com/arin004joshi/rocket.chat/blob/develop/ee/packages/xmpp-server/src/s2s/S2SManager.ts"
click node_presence "https://github.com/arin004joshi/rocket.chat/blob/develop/ee/packages/presence/src/lib/presenceEngine.ts"
click node_ddp_client "https://github.com/arin004joshi/rocket.chat/blob/develop/packages/ddp-client/src/ClientStream.ts"
click node_ddp_server "https://github.com/arin004joshi/rocket.chat/blob/develop/packages/ddp-server/src/Server.ts"
click node_periods "https://github.com/arin004joshi/rocket.chat/blob/develop/apps/meteor/client/components/dashboards/periods.ts"
click node_period_storage "https://github.com/arin004joshi/rocket.chat/blob/develop/apps/meteor/client/components/dashboards/usePeriodSelectorStorage.ts"
click node_random "https://github.com/arin004joshi/rocket.chat/blob/develop/packages/random/src/main.client.ts"
click node_media_queries "https://github.com/arin004joshi/rocket.chat/blob/develop/packages/fuselage-hooks/src/useMediaQueries.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_message_ui,node_discussion_ui,node_video_preview,node_media_signaling,node_ai_search,node_user toneBlue
class node_abac toneAmber
class node_apps_engine,node_app_manager,node_app_runtime,node_app_storage,node_marketplace toneMint
class node_federation,node_presence,node_ddp_client,node_ddp_server toneRose
class node_periods,node_period_storage,node_random,node_media_queries toneIndigo
```

## Components

### Conversation and collaboration

- [Message interface](https://github.com/arin004joshi/rocket.chat/blob/develop/apps/meteor/client/components/message/MessageContentBody.tsx): `apps/meteor/client/components/message/MessageContentBody.tsx`
- [Discussion creation](https://github.com/arin004joshi/rocket.chat/blob/develop/apps/meteor/client/components/CreateDiscussion/CreateDiscussion.tsx): `apps/meteor/client/components/CreateDiscussion/CreateDiscussion.tsx`
- [Video preview](https://github.com/arin004joshi/rocket.chat/blob/develop/packages/ui-livekit/src/usePreviewVideoTrack.ts): `packages/ui-livekit/src/usePreviewVideoTrack.ts`
- [Media signaling](https://github.com/arin004joshi/rocket.chat/blob/develop/packages/media-signaling/src/lib/NegotiationManager.ts): `packages/media-signaling/src/lib/NegotiationManager.ts`
- [AI search](https://github.com/arin004joshi/rocket.chat/blob/develop/packages/ai-search/src/clientSearch.ts): `packages/ai-search/src/clientSearch.ts`

### Security and identity

- [Attribute access control](https://github.com/arin004joshi/rocket.chat/blob/develop/ee/packages/abac/src/classification-banner/engine.ts): `ee/packages/abac/src/classification-banner/engine.ts`

### Apps and integrations

- [Apps-Engine API](https://github.com/arin004joshi/rocket.chat/blob/develop/packages/apps/src/AppsEngine.ts): `packages/apps/src/AppsEngine.ts`
- [App manager](https://github.com/arin004joshi/rocket.chat/blob/develop/packages/apps/src/server/AppManager.ts): `packages/apps/src/server/AppManager.ts`
- [App runtime](https://github.com/arin004joshi/rocket.chat/blob/develop/packages/apps/src/server/runtime/AppsEngineRuntime.ts): `packages/apps/src/server/runtime/AppsEngineRuntime.ts`
- [App metadata storage](https://github.com/arin004joshi/rocket.chat/blob/develop/packages/apps/src/server/storage/AppMetadataStorage.ts): `packages/apps/src/server/storage/AppMetadataStorage.ts`
- [App marketplace](https://github.com/arin004joshi/rocket.chat/blob/develop/apps/meteor/client/views/marketplace/hooks/useAppsCountQuery.ts): `apps/meteor/client/views/marketplace/hooks/useAppsCountQuery.ts`

### Realtime platform

- [Server federation](https://github.com/arin004joshi/rocket.chat/blob/develop/ee/packages/xmpp-server/src/s2s/S2SManager.ts): `ee/packages/xmpp-server/src/s2s/S2SManager.ts`
- [Presence engine](https://github.com/arin004joshi/rocket.chat/blob/develop/ee/packages/presence/src/lib/presenceEngine.ts): `ee/packages/presence/src/lib/presenceEngine.ts`
- [DDP client](https://github.com/arin004joshi/rocket.chat/blob/develop/packages/ddp-client/src/ClientStream.ts): `packages/ddp-client/src/ClientStream.ts`
- [DDP server](https://github.com/arin004joshi/rocket.chat/blob/develop/packages/ddp-server/src/Server.ts): `packages/ddp-server/src/Server.ts`

### Shared client capabilities

- [Dashboard periods](https://github.com/arin004joshi/rocket.chat/blob/develop/apps/meteor/client/components/dashboards/periods.ts): `apps/meteor/client/components/dashboards/periods.ts`
- [Period selection state](https://github.com/arin004joshi/rocket.chat/blob/develop/apps/meteor/client/components/dashboards/usePeriodSelectorStorage.ts): `apps/meteor/client/components/dashboards/usePeriodSelectorStorage.ts`
- [Random generator](https://github.com/arin004joshi/rocket.chat/blob/develop/packages/random/src/main.client.ts): `packages/random/src/main.client.ts`
- [Media query hook](https://github.com/arin004joshi/rocket.chat/blob/develop/packages/fuselage-hooks/src/useMediaQueries.ts): `packages/fuselage-hooks/src/useMediaQueries.ts`

### Other components

- **Workspace user**

## Connections

- Workspace user → Message interface: uses (evidence: `README.md`)
- Message interface → DDP client: realtime transport
- DDP client → DDP server: communicates
- Workspace user → Discussion creation: creates discussions (evidence: `README.md`)
- Workspace user → Video preview: previews calls (evidence: `README.md`)
- Video preview → Media signaling: uses media signaling
- Workspace user → Attribute access control: access governed by (evidence: `README.md`)
- Apps-Engine API → App manager: exports (evidence: `packages/apps/src/AppsEngine.ts`)
- Apps-Engine API → App metadata storage: exports (evidence: `packages/apps/src/AppsEngine.ts`)
- App manager → App runtime: runs apps
- App manager → App metadata storage: uses metadata
- Workspace user → App marketplace: discovers apps (evidence: `README.md`)
- Workspace user → AI search: searches conversations
- Workspace user → Server federation: communicates across networks (evidence: `README.md`)
- Workspace user → Presence engine: uses presence
- Period selection state → Dashboard periods: uses period definitions (evidence: `apps/meteor/client/components/dashboards/usePeriodSelectorStorage.ts`)
- Workspace user → Random generator: client capability
- Workspace user → Media query hook: client capability
