# silicap/d0b0-chat architecture

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

- Interactive diagram: https://gitdiagram.com/silicap/d0b0-chat
- Repository: https://github.com/silicap/d0b0-chat

## Overview

FluffyChat is a Flutter Matrix instant-messaging client. Users sign in, find or join conversations, and exchange messages and media; the app also supports calls, notifications, moderation, spaces, encryption, and encrypted backup. The tree shows dedicated UI areas and platform notification handlers, while the README documents the broader capabilities. Since the sampled source is mostly desktop launch and plugin-registration code, runtime links between Dart subsystems are not verified here; documented links are cited to the README.

Main entry points: [`lib/pages/chat/chat.dart`](https://github.com/silicap/d0b0-chat/blob/main/lib/pages/chat/chat.dart) (Conversation UI), [`lib/utils/push_helper.dart`](https://github.com/silicap/d0b0-chat/blob/main/lib/utils/push_helper.dart) (Push notifications), [`lib/utils/client_manager.dart`](https://github.com/silicap/d0b0-chat/blob/main/lib/utils/client_manager.dart) (Client management), [`lib/main.dart`](https://github.com/silicap/d0b0-chat/blob/main/lib/main.dart) (App entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application and UI"]
  node_entry["App entry<br/>[main.dart]"]
  node_app_shell["App shell"]
  node_chat_list["Chat navigation<br/>[chat_list.dart]"]
  node_settings["User settings<br/>[settings.dart]"]
  node_client_manager["Client management"]
end

subgraph group_messaging["Messaging and discovery"]
  node_chat["Conversation UI<br/>[chat.dart]"]
  node_chat_events["Message rendering"]
  node_chat_search["Chat search"]
  node_groups["Group moderation"]
  node_spaces["Spaces<br/>[space_view.dart]"]
  node_calls["Voice and video calls"]
end

subgraph group_security["Identity and protection"]
  node_login["Sign-in flow"]
  node_encryption["End-to-end encryption"]
  node_verification["Key verification"]
  node_backup["Encrypted backup"]
  node_encrypted_store[("Encrypted local store<br/>[builder.dart]")]
end

subgraph group_platform["Platform services"]
  node_push["Push notifications<br/>[push_helper.dart]"]
  node_android_push["Android push handler<br/>[FcmPushService.kt]"]
  node_ios_push["iOS notification service"]
end

node_user(("User"))
node_matrix{{"Matrix homeserver"}}

node_user -->|"opens app"| node_entry
node_entry -.->|"starts UI"| node_app_shell
node_user -->|"signs in"| node_login
node_login -.->|"authenticates with"| node_matrix
node_user -->|"chooses chats"| node_chat_list
node_user -->|"sends messages"| node_chat
node_chat -->|"exchanges messages"| node_matrix
node_chat -.->|"renders content"| node_chat_events
node_user -->|"discovers chats"| node_chat_search
node_chat_search -.->|"searches groups"| node_matrix
node_user -->|"moderates groups"| node_groups
node_groups -.->|"updates permissions"| node_matrix
node_user -->|"uses spaces"| node_spaces
node_user -->|"starts calls"| node_calls
node_calls -->|"uses Matrix RTC"| node_matrix
node_user -->|"secures chats"| node_encryption
node_user -->|"verifies devices"| node_verification
node_user -->|"backs up chats"| node_backup
node_user -.->|"configures app"| node_settings
node_matrix -.->|"delivers notifications"| node_push
node_push -.->|"routes push"| node_android_push
node_push -.->|"routes push"| node_ios_push
node_client_manager -.->|"manages sessions"| node_matrix
node_client_manager -.->|"uses storage"| node_encrypted_store

click node_entry "https://github.com/silicap/d0b0-chat/blob/main/lib/main.dart"
click node_app_shell "https://github.com/silicap/d0b0-chat/blob/main/lib/widgets/fluffy_chat_app.dart"
click node_chat_list "https://github.com/silicap/d0b0-chat/blob/main/lib/pages/chat_list/chat_list.dart"
click node_login "https://github.com/silicap/d0b0-chat/blob/main/lib/pages/sign_in/view_model/sign_in_view_model.dart"
click node_chat "https://github.com/silicap/d0b0-chat/blob/main/lib/pages/chat/chat.dart"
click node_chat_events "https://github.com/silicap/d0b0-chat/blob/main/lib/pages/chat/events/message_content.dart"
click node_chat_search "https://github.com/silicap/d0b0-chat/blob/main/lib/pages/chat_search/chat_search_page.dart"
click node_groups "https://github.com/silicap/d0b0-chat/blob/main/lib/pages/chat_permissions_settings/chat_permissions_settings.dart"
click node_spaces "https://github.com/silicap/d0b0-chat/blob/main/lib/pages/chat_list/space_view.dart"
click node_calls "https://github.com/silicap/d0b0-chat/blob/main/lib/pages/call/call_view_model.dart"
click node_encryption "https://github.com/silicap/d0b0-chat/blob/main/lib/pages/chat_encryption_settings/chat_encryption_settings.dart"
click node_verification "https://github.com/silicap/d0b0-chat/blob/main/lib/pages/key_verification/key_verification_dialog.dart"
click node_backup "https://github.com/silicap/d0b0-chat/blob/main/lib/pages/bootstrap/bootstrap_page.dart"
click node_settings "https://github.com/silicap/d0b0-chat/blob/main/lib/pages/settings/settings.dart"
click node_push "https://github.com/silicap/d0b0-chat/blob/main/lib/utils/push_helper.dart"
click node_android_push "https://github.com/silicap/d0b0-chat/blob/main/android/app/src/main/kotlin/chat/fluffy/fluffychat/FcmPushService.kt"
click node_ios_push "https://github.com/silicap/d0b0-chat/blob/main/ios/Notification%20Service%20Extension/NotificationService.swift"
click node_client_manager "https://github.com/silicap/d0b0-chat/blob/main/lib/utils/client_manager.dart"
click node_encrypted_store "https://github.com/silicap/d0b0-chat/blob/main/lib/utils/matrix_sdk_extensions/flutter_matrix_dart_sdk_database/builder.dart"

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_entry,node_app_shell,node_chat_list,node_settings,node_client_manager,node_user toneBlue
class node_chat,node_chat_events,node_chat_search,node_groups,node_spaces,node_calls toneAmber
class node_login,node_encryption,node_verification,node_backup,node_encrypted_store,node_matrix toneMint
class node_push,node_android_push,node_ios_push toneRose
```

## Components

### Application and UI

- [App entry](https://github.com/silicap/d0b0-chat/blob/main/lib/main.dart): `lib/main.dart`
- [App shell](https://github.com/silicap/d0b0-chat/blob/main/lib/widgets/fluffy_chat_app.dart): `lib/widgets/fluffy_chat_app.dart`
- [Chat navigation](https://github.com/silicap/d0b0-chat/blob/main/lib/pages/chat_list/chat_list.dart): `lib/pages/chat_list/chat_list.dart`
- [User settings](https://github.com/silicap/d0b0-chat/blob/main/lib/pages/settings/settings.dart): `lib/pages/settings/settings.dart`
- [Client management](https://github.com/silicap/d0b0-chat/blob/main/lib/utils/client_manager.dart): `lib/utils/client_manager.dart`

### Messaging and discovery

- [Conversation UI](https://github.com/silicap/d0b0-chat/blob/main/lib/pages/chat/chat.dart): `lib/pages/chat/chat.dart`
- [Message rendering](https://github.com/silicap/d0b0-chat/blob/main/lib/pages/chat/events/message_content.dart): `lib/pages/chat/events/message_content.dart`
- [Chat search](https://github.com/silicap/d0b0-chat/blob/main/lib/pages/chat_search/chat_search_page.dart): `lib/pages/chat_search/chat_search_page.dart`
- [Group moderation](https://github.com/silicap/d0b0-chat/blob/main/lib/pages/chat_permissions_settings/chat_permissions_settings.dart): `lib/pages/chat_permissions_settings/chat_permissions_settings.dart`
- [Spaces](https://github.com/silicap/d0b0-chat/blob/main/lib/pages/chat_list/space_view.dart): `lib/pages/chat_list/space_view.dart`
- [Voice and video calls](https://github.com/silicap/d0b0-chat/blob/main/lib/pages/call/call_view_model.dart): `lib/pages/call/call_view_model.dart`

### Identity and protection

- [Sign-in flow](https://github.com/silicap/d0b0-chat/blob/main/lib/pages/sign_in/view_model/sign_in_view_model.dart): `lib/pages/sign_in/view_model/sign_in_view_model.dart`
- [End-to-end encryption](https://github.com/silicap/d0b0-chat/blob/main/lib/pages/chat_encryption_settings/chat_encryption_settings.dart): `lib/pages/chat_encryption_settings/chat_encryption_settings.dart`
- [Key verification](https://github.com/silicap/d0b0-chat/blob/main/lib/pages/key_verification/key_verification_dialog.dart): `lib/pages/key_verification/key_verification_dialog.dart`
- [Encrypted backup](https://github.com/silicap/d0b0-chat/blob/main/lib/pages/bootstrap/bootstrap_page.dart): `lib/pages/bootstrap/bootstrap_page.dart`
- [Encrypted local store](https://github.com/silicap/d0b0-chat/blob/main/lib/utils/matrix_sdk_extensions/flutter_matrix_dart_sdk_database/builder.dart): `lib/utils/matrix_sdk_extensions/flutter_matrix_dart_sdk_database/builder.dart`

### Platform services

- [Push notifications](https://github.com/silicap/d0b0-chat/blob/main/lib/utils/push_helper.dart): `lib/utils/push_helper.dart`
- [Android push handler](https://github.com/silicap/d0b0-chat/blob/main/android/app/src/main/kotlin/chat/fluffy/fluffychat/FcmPushService.kt): `android/app/src/main/kotlin/chat/fluffy/fluffychat/FcmPushService.kt`
- [iOS notification service](https://github.com/silicap/d0b0-chat/blob/main/ios/Notification%20Service%20Extension/NotificationService.swift): `ios/Notification Service Extension/NotificationService.swift`

### Other components

- **User**
- **Matrix homeserver**

## Connections

- User → App entry: opens app (evidence: `README.md`)
- App entry → App shell: starts UI
- User → Sign-in flow: signs in (evidence: `README.md`)
- Sign-in flow → Matrix homeserver: authenticates with
- User → Chat navigation: chooses chats (evidence: `README.md`)
- User → Conversation UI: sends messages (evidence: `README.md`)
- Conversation UI → Matrix homeserver: exchanges messages (evidence: `README.md`)
- Conversation UI → Message rendering: renders content
- User → Chat search: discovers chats (evidence: `README.md`)
- Chat search → Matrix homeserver: searches groups
- User → Group moderation: moderates groups (evidence: `README.md`)
- Group moderation → Matrix homeserver: updates permissions
- User → Spaces: uses spaces (evidence: `README.md`)
- User → Voice and video calls: starts calls (evidence: `README.md`)
- Voice and video calls → Matrix homeserver: uses Matrix RTC (evidence: `README.md`)
- User → End-to-end encryption: secures chats (evidence: `README.md`)
- User → Key verification: verifies devices (evidence: `README.md`)
- User → Encrypted backup: backs up chats (evidence: `README.md`)
- User → User settings: configures app
- Matrix homeserver → Push notifications: delivers notifications
- Push notifications → Android push handler: routes push
- Push notifications → iOS notification service: routes push
- Client management → Matrix homeserver: manages sessions
- Client management → Encrypted local store: uses storage
