# project-chip/connectedhomeip architecture

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

- Interactive diagram: https://gitdiagram.com/project-chip/connectedhomeip
- Repository: https://github.com/project-chip/connectedhomeip

## Overview

Matter is an IP-based application-layer connectivity standard and SDK for interoperable smart-home devices. A principal interaction is a controller or application communicating with a Matter device: the SDK manages secure sessions and protocol interactions, and device cluster implementations expose application behavior. The tree also shows BLE transport, persistent credentials and state, and Python testing and IDL tooling. The supplied excerpts are partial, so links between major runtime layers are included only where the README or excerpts support them; other important capabilities are shown without guessed call chains.

Main entry points: [`src/lib/core/CHIPPersistentStorageDelegate.h`](https://github.com/project-chip/connectedhomeip/blob/master/src/lib/core/CHIPPersistentStorageDelegate.h) (Persistent storage), [`src/app/InteractionModelEngine.cpp`](https://github.com/project-chip/connectedhomeip/blob/master/src/app/InteractionModelEngine.cpp) (Interaction model), [`src/transport/SessionManager.cpp`](https://github.com/project-chip/connectedhomeip/blob/master/src/transport/SessionManager.cpp) (Secure sessions), [`src/crypto/PersistentStorageOperationalKeystore.cpp`](https://github.com/project-chip/connectedhomeip/blob/master/src/crypto/PersistentStorageOperationalKeystore.cpp) (Operational keystore)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_protocol["Protocol runtime"]
  node_interaction["Interaction model"]
  node_session["Secure sessions<br/>[SessionManager.cpp]"]
end

subgraph group_device["Device behavior"]
  node_clusters["Cluster behavior"]
  node_access["Access control<br/>[AccessControl.cpp]"]
  node_reporting["Attribute reporting<br/>[Engine.cpp]"]
  node_attributes["Attribute storage"]
end

subgraph group_security["Security and state"]
  node_operational_keys["Operational keystore"]
  node_persistent_storage[("Persistent storage")]
  node_example_storage[("File-backed storage")]
end

subgraph group_interfaces["Controllers and tools"]
  node_python_storage["Python storage adapter"]
  node_idl["Matter IDL"]
  node_yaml_tests["YAML test runner<br/>[runner.py]"]
  node_test_framework["Python test framework<br/>[runner.py]"]
end

subgraph group_platform["Platform transports"]
  node_ble["BLE transfer<br/>[BtpEngine.cpp]"]
  node_ip_networks(("IP networks"))
end

node_app_user(("App or controller"))
node_matter_device(("Matter device"))

node_app_user -->|"communicates with"| node_matter_device
node_app_user -->|"uses Matter SDK"| node_interaction
node_interaction -->|"exchanges interactions"| node_matter_device
node_session -->|"secures communication"| node_matter_device
node_matter_device -.->|"implements capabilities"| node_clusters
node_matter_device -->|"communicates over"| node_ip_networks
node_ble -.->|"transfers fragments"| node_matter_device
node_operational_keys -->|"stores key data"| node_persistent_storage
node_example_storage -.->|"implements delegate"| node_persistent_storage
node_python_storage -->|"implements delegate"| node_persistent_storage
node_interaction -->|"uses resumption storage"| node_persistent_storage

click node_interaction "https://github.com/project-chip/connectedhomeip/blob/master/src/app/InteractionModelEngine.cpp"
click node_session "https://github.com/project-chip/connectedhomeip/blob/master/src/transport/SessionManager.cpp"
click node_ble "https://github.com/project-chip/connectedhomeip/blob/master/src/ble/BtpEngine.cpp"
click node_clusters "https://github.com/project-chip/connectedhomeip/tree/master/src/app/clusters"
click node_access "https://github.com/project-chip/connectedhomeip/blob/master/src/access/AccessControl.cpp"
click node_reporting "https://github.com/project-chip/connectedhomeip/blob/master/src/app/reporting/Engine.cpp"
click node_attributes "https://github.com/project-chip/connectedhomeip/blob/master/src/app/util/attribute-storage.cpp"
click node_operational_keys "https://github.com/project-chip/connectedhomeip/blob/master/src/crypto/PersistentStorageOperationalKeystore.cpp"
click node_persistent_storage "https://github.com/project-chip/connectedhomeip/blob/master/src/lib/core/CHIPPersistentStorageDelegate.h"
click node_example_storage "https://github.com/project-chip/connectedhomeip/blob/master/src/controller/ExamplePersistentStorage.cpp"
click node_python_storage "https://github.com/project-chip/connectedhomeip/blob/master/src/controller/python/ChipDeviceController-StorageDelegate.cpp"
click node_idl "https://github.com/project-chip/connectedhomeip/blob/master/scripts/py_matter_idl/matter/idl/matter_idl_parser.py"
click node_yaml_tests "https://github.com/project-chip/connectedhomeip/blob/master/scripts/py_matter_yamltests/matter/yamltests/runner.py"
click node_test_framework "https://github.com/project-chip/connectedhomeip/blob/master/src/python_testing/matter_testing_infrastructure/matter/testing/runner.py"

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_interaction,node_session toneBlue
class node_clusters,node_access,node_reporting,node_attributes toneAmber
class node_operational_keys,node_persistent_storage,node_example_storage toneMint
class node_python_storage,node_idl,node_yaml_tests,node_test_framework toneRose
class node_ble,node_ip_networks,node_app_user,node_matter_device toneIndigo
```

## Components

### Protocol runtime

- [Interaction model](https://github.com/project-chip/connectedhomeip/blob/master/src/app/InteractionModelEngine.cpp): `src/app/InteractionModelEngine.cpp`
- [Secure sessions](https://github.com/project-chip/connectedhomeip/blob/master/src/transport/SessionManager.cpp): `src/transport/SessionManager.cpp`

### Device behavior

- [Cluster behavior](https://github.com/project-chip/connectedhomeip/tree/master/src/app/clusters): `src/app/clusters`
- [Access control](https://github.com/project-chip/connectedhomeip/blob/master/src/access/AccessControl.cpp): `src/access/AccessControl.cpp`
- [Attribute reporting](https://github.com/project-chip/connectedhomeip/blob/master/src/app/reporting/Engine.cpp): `src/app/reporting/Engine.cpp`
- [Attribute storage](https://github.com/project-chip/connectedhomeip/blob/master/src/app/util/attribute-storage.cpp): `src/app/util/attribute-storage.cpp`

### Security and state

- [Operational keystore](https://github.com/project-chip/connectedhomeip/blob/master/src/crypto/PersistentStorageOperationalKeystore.cpp): `src/crypto/PersistentStorageOperationalKeystore.cpp`
- [Persistent storage](https://github.com/project-chip/connectedhomeip/blob/master/src/lib/core/CHIPPersistentStorageDelegate.h): `src/lib/core/CHIPPersistentStorageDelegate.h`
- [File-backed storage](https://github.com/project-chip/connectedhomeip/blob/master/src/controller/ExamplePersistentStorage.cpp): `src/controller/ExamplePersistentStorage.cpp`

### Controllers and tools

- [Python storage adapter](https://github.com/project-chip/connectedhomeip/blob/master/src/controller/python/ChipDeviceController-StorageDelegate.cpp): `src/controller/python/ChipDeviceController-StorageDelegate.cpp`
- [Matter IDL](https://github.com/project-chip/connectedhomeip/blob/master/scripts/py_matter_idl/matter/idl/matter_idl_parser.py): `scripts/py_matter_idl/matter/idl/matter_idl_parser.py`
- [YAML test runner](https://github.com/project-chip/connectedhomeip/blob/master/scripts/py_matter_yamltests/matter/yamltests/runner.py): `scripts/py_matter_yamltests/matter/yamltests/runner.py`
- [Python test framework](https://github.com/project-chip/connectedhomeip/blob/master/src/python_testing/matter_testing_infrastructure/matter/testing/runner.py): `src/python_testing/matter_testing_infrastructure/matter/testing/runner.py`

### Platform transports

- [BLE transfer](https://github.com/project-chip/connectedhomeip/blob/master/src/ble/BtpEngine.cpp): `src/ble/BtpEngine.cpp`
- **IP networks**

### Other components

- **App or controller**
- **Matter device**

## Connections

- App or controller → Matter device: communicates with (evidence: `README.md`)
- App or controller → Interaction model: uses Matter SDK (evidence: `README.md`)
- Interaction model → Matter device: exchanges interactions (evidence: `README.md`)
- Secure sessions → Matter device: secures communication (evidence: `README.md`)
- Matter device → Cluster behavior: implements capabilities
- Matter device → IP networks: communicates over (evidence: `README.md`)
- BLE transfer → Matter device: transfers fragments
- Operational keystore → Persistent storage: stores key data (evidence: `src/crypto/PersistentStorageOperationalKeystore.cpp`)
- File-backed storage → Persistent storage: implements delegate
- Python storage adapter → Persistent storage: implements delegate
- Interaction model → Persistent storage: uses resumption storage (evidence: `src/app/InteractionModelEngine.cpp`)
