# zextras/carbonio-mails-ui architecture

> Architecture diagram of the GitHub repository zextras/carbonio-mails-ui, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/zextras/carbonio-mails-ui
- Repository: https://github.com/zextras/carbonio-mails-ui

## Overview

Carbonio Mails UI is a React mail client. Users browse and search mail, open message or conversation previews, and compose, reply to, or forward messages. The sampled message-retrieval path fetches SOAP data, normalizes it, and updates the email store; composing is coordinated through an editor controller and editor state. The README identifies the product but does not document subsystem wiring, so unsampled capabilities and relationships are shown cautiously; unverified links are dashed.

Main entry points: [`src/store/emails/store.ts`](https://github.com/zextras/carbonio-mails-ui/blob/main/src/store/emails/store.ts) (Email state store), [`src/views/app/detail-panel/edit/edit-view-controller.tsx`](https://github.com/zextras/carbonio-mails-ui/blob/main/src/views/app/detail-panel/edit/edit-view-controller.tsx) (Editor controller), [`src/views/app/detail-panel/edit/editor/edit-view.tsx`](https://github.com/zextras/carbonio-mails-ui/blob/main/src/views/app/detail-panel/edit/editor/edit-view.tsx) (Rich-text editor), [`src/store/emails/actions/get-message.ts`](https://github.com/zextras/carbonio-mails-ui/blob/main/src/store/emails/actions/get-message.ts) (Message retrieval)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Mail experience"]
  node_app["Mail application<br/>[app.tsx]"]
  node_preview["Message preview"]
  node_navigation["Preview navigation"]
  node_search["Mail search<br/>[search-soap-api.ts]"]
  node_shared["Shared-folder replies<br/>[index.tsx]"]
end

subgraph group_composition["Composition"]
  node_edit_controller["Editor controller"]
  node_editor_view["Rich-text editor<br/>[edit-view.tsx]"]
  node_legacy_editor["Legacy editor<br/>[edit-view.tsx]"]
  node_editor_factory["Editor generation"]
  node_send_handlers["Send handling"]
  node_attachments["Attachment helpers<br/>[attachments.ts]"]
end

subgraph group_state["Mail state"]
  node_email_store[("Email state store<br/>[store.ts]")]
  node_message_action["Message retrieval<br/>[get-message.ts]"]
  node_normalizer["Message normalization"]
  node_editor_store[("Editor state")]
end

subgraph group_services["Mail services"]
  node_soap_api["Mail SOAP API"]
end

node_user(("Mail user"))
node_mail_service{{"Carbonio mail service"}}

node_user -.->|"uses"| node_app
node_app -.->|"shows"| node_preview
node_app -.->|"opens editor"| node_edit_controller
node_user -.->|"searches"| node_search
node_user -.->|"answers invite"| node_shared
node_edit_controller -->|"creates or resumes"| node_editor_factory
node_edit_controller -->|"selects editor"| node_editor_view
node_edit_controller -->|"selects editor"| node_legacy_editor
node_editor_view -->|"uses handlers"| node_send_handlers
node_editor_view -.->|"uses helpers"| node_attachments
node_editor_view -->|"reads editor state"| node_editor_store
node_legacy_editor -.->|"reads editor state"| node_editor_store
node_editor_factory -->|"uses helpers"| node_attachments
node_send_handlers -.->|"sends mail"| node_mail_service
node_preview -.->|"loads message"| node_message_action
node_navigation -->|"reads items"| node_email_store
node_navigation -->|"marks read"| node_email_store
node_message_action -->|"requests message"| node_soap_api
node_soap_api -->|"fetches message"| node_mail_service
node_message_action -->|"normalizes response"| node_normalizer
node_message_action -->|"updates messages"| node_email_store
node_email_store -->|"composes slices"| node_email_store

click node_app "https://github.com/zextras/carbonio-mails-ui/blob/main/src/app.tsx"
click node_preview "https://github.com/zextras/carbonio-mails-ui/blob/main/src/views/app/detail-panel/message-preview-panel.tsx"
click node_navigation "https://github.com/zextras/carbonio-mails-ui/blob/main/src/hooks/use-preview-header-navigation.ts"
click node_search "https://github.com/zextras/carbonio-mails-ui/blob/main/src/api/search-soap-api.ts"
click node_shared "https://github.com/zextras/carbonio-mails-ui/blob/main/src/integrations/shared-invite-reply/index.tsx"
click node_edit_controller "https://github.com/zextras/carbonio-mails-ui/blob/main/src/views/app/detail-panel/edit/edit-view-controller.tsx"
click node_editor_view "https://github.com/zextras/carbonio-mails-ui/blob/main/src/views/app/detail-panel/edit/editor/edit-view.tsx"
click node_legacy_editor "https://github.com/zextras/carbonio-mails-ui/blob/main/src/views/app/detail-panel/edit/legacyEditor/edit-view.tsx"
click node_editor_factory "https://github.com/zextras/carbonio-mails-ui/blob/main/src/store/editor/editor-generators.ts"
click node_send_handlers "https://github.com/zextras/carbonio-mails-ui/blob/main/src/views/app/detail-panel/edit/editor/edit-utils-hooks/use-send-handlers.ts"
click node_attachments "https://github.com/zextras/carbonio-mails-ui/blob/main/src/helpers/attachments.ts"
click node_email_store "https://github.com/zextras/carbonio-mails-ui/blob/main/src/store/emails/store.ts"
click node_message_action "https://github.com/zextras/carbonio-mails-ui/blob/main/src/store/emails/actions/get-message.ts"
click node_normalizer "https://github.com/zextras/carbonio-mails-ui/blob/main/src/normalizations/normalize-message.ts"
click node_editor_store "https://github.com/zextras/carbonio-mails-ui/blob/main/src/store/editor/editor-generators.ts"
click node_soap_api "https://github.com/zextras/carbonio-mails-ui/blob/main/src/api/get-msg-soap-api.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_app,node_preview,node_navigation,node_search,node_shared,node_user toneBlue
class node_edit_controller,node_editor_view,node_legacy_editor,node_editor_factory,node_send_handlers,node_attachments toneAmber
class node_email_store,node_message_action,node_normalizer,node_editor_store toneMint
class node_soap_api toneRose
class node_mail_service toneIndigo
```

## Components

### Mail experience

- [Mail application](https://github.com/zextras/carbonio-mails-ui/blob/main/src/app.tsx): `src/app.tsx`
- [Message preview](https://github.com/zextras/carbonio-mails-ui/blob/main/src/views/app/detail-panel/message-preview-panel.tsx): `src/views/app/detail-panel/message-preview-panel.tsx`
- [Preview navigation](https://github.com/zextras/carbonio-mails-ui/blob/main/src/hooks/use-preview-header-navigation.ts): `src/hooks/use-preview-header-navigation.ts`
- [Mail search](https://github.com/zextras/carbonio-mails-ui/blob/main/src/api/search-soap-api.ts): `src/api/search-soap-api.ts`
- [Shared-folder replies](https://github.com/zextras/carbonio-mails-ui/blob/main/src/integrations/shared-invite-reply/index.tsx): `src/integrations/shared-invite-reply/index.tsx`

### Composition

- [Editor controller](https://github.com/zextras/carbonio-mails-ui/blob/main/src/views/app/detail-panel/edit/edit-view-controller.tsx): `src/views/app/detail-panel/edit/edit-view-controller.tsx`
- [Rich-text editor](https://github.com/zextras/carbonio-mails-ui/blob/main/src/views/app/detail-panel/edit/editor/edit-view.tsx): `src/views/app/detail-panel/edit/editor/edit-view.tsx`
- [Legacy editor](https://github.com/zextras/carbonio-mails-ui/blob/main/src/views/app/detail-panel/edit/legacyEditor/edit-view.tsx): `src/views/app/detail-panel/edit/legacyEditor/edit-view.tsx`
- [Editor generation](https://github.com/zextras/carbonio-mails-ui/blob/main/src/store/editor/editor-generators.ts): `src/store/editor/editor-generators.ts`
- [Send handling](https://github.com/zextras/carbonio-mails-ui/blob/main/src/views/app/detail-panel/edit/editor/edit-utils-hooks/use-send-handlers.ts): `src/views/app/detail-panel/edit/editor/edit-utils-hooks/use-send-handlers.ts`
- [Attachment helpers](https://github.com/zextras/carbonio-mails-ui/blob/main/src/helpers/attachments.ts): `src/helpers/attachments.ts`

### Mail state

- [Email state store](https://github.com/zextras/carbonio-mails-ui/blob/main/src/store/emails/store.ts): `src/store/emails/store.ts`
- [Message retrieval](https://github.com/zextras/carbonio-mails-ui/blob/main/src/store/emails/actions/get-message.ts): `src/store/emails/actions/get-message.ts`
- [Message normalization](https://github.com/zextras/carbonio-mails-ui/blob/main/src/normalizations/normalize-message.ts): `src/normalizations/normalize-message.ts`
- [Editor state](https://github.com/zextras/carbonio-mails-ui/blob/main/src/store/editor/editor-generators.ts): `src/store/editor/editor-generators.ts`

### Mail services

- [Mail SOAP API](https://github.com/zextras/carbonio-mails-ui/blob/main/src/api/get-msg-soap-api.ts): `src/api/get-msg-soap-api.ts`

### Other components

- **Mail user**
- **Carbonio mail service**

## Connections

- Mail user → Mail application: uses
- Mail application → Message preview: shows
- Mail application → Editor controller: opens editor
- Mail user → Mail search: searches
- Mail user → Shared-folder replies: answers invite
- Editor controller → Editor generation: creates or resumes (evidence: `src/views/app/detail-panel/edit/edit-view-controller.tsx`)
- Editor controller → Rich-text editor: selects editor (evidence: `src/views/app/detail-panel/edit/edit-view-controller.tsx`)
- Editor controller → Legacy editor: selects editor (evidence: `src/views/app/detail-panel/edit/edit-view-controller.tsx`)
- Rich-text editor → Send handling: uses handlers (evidence: `src/views/app/detail-panel/edit/editor/edit-view.tsx`)
- Rich-text editor → Attachment helpers: uses helpers
- Rich-text editor → Editor state: reads editor state (evidence: `src/views/app/detail-panel/edit/editor/edit-view.tsx`)
- Legacy editor → Editor state: reads editor state
- Editor generation → Attachment helpers: uses helpers (evidence: `src/store/editor/editor-generators.ts`)
- Send handling → Carbonio mail service: sends mail
- Message preview → Message retrieval: loads message
- Preview navigation → Email state store: reads items (evidence: `src/hooks/use-preview-header-navigation.ts`)
- Preview navigation → Email state store: marks read (evidence: `src/hooks/use-preview-header-navigation.ts`)
- Message retrieval → Mail SOAP API: requests message (evidence: `src/store/emails/actions/get-message.ts`)
- Mail SOAP API → Carbonio mail service: fetches message (evidence: `src/api/get-msg-soap-api.ts`)
- Message retrieval → Message normalization: normalizes response (evidence: `src/store/emails/actions/get-message.ts`)
- Message retrieval → Email state store: updates messages (evidence: `src/store/emails/actions/get-message.ts`)
- Email state store → Email state store: composes slices (evidence: `src/store/emails/store.ts`)
