> For the complete documentation index, see [llms.txt](https://wiki.4thtech.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wiki.4thtech.io/protocols/occ-v1/architecture.md).

# Architecture

OCC v1 is four layers connected by the SDK: protocol contracts, a blockchain, encryption and storage.

{% hint style="warning" %}
**Status: Production-ready, stable.** OCC v1 is the 4thTech protocol for on-chain mail, chat and file transfer on any EVM chain. It is supported; no new features are planned. For agent-to-agent exchange, see OCC v2 ([AgentLink](https://wiki.4thtech.io/products/agentlink.md)).
{% endhint %}

OCC v1 is designed to be light and modular. With encryption on, only the sender and the receiver can read the content. The [4thTech SDK](https://wiki.4thtech.io/developers/sdk.md) connects four layers.

| Layer      | What it does                                                     | Read more                                                                    |
| ---------- | ---------------------------------------------------------------- | ---------------------------------------------------------------------------- |
| Protocol   | The smart contracts that record mail, chat, public keys and fees | [Protocol contracts](https://wiki.4thtech.io/protocols/occ-v1/contracts.md)  |
| Blockchain | The network that runs the contracts and keeps the records        | [Blockchain layer](https://wiki.4thtech.io/protocols/occ-v1/blockchain.md)   |
| Encryption | Keeps content readable only by sender and receiver               | [Encryption options](https://wiki.4thtech.io/protocols/occ-v1/encryption.md) |
| Storage    | Holds encrypted content that is too large for the chain          | [Storage](https://wiki.4thtech.io/protocols/occ-v1/storage.md)               |

```mermaid
flowchart TB
    App["Your app (for example BlockMail & BlockChat)"]
    SDK["4thTech SDK"]
    App --> SDK
    SDK --> Contracts["OCC v1 contracts"]
    SDK --> Enc["Encryption"]
    SDK --> Store["Storage"]
    Contracts --> Chain["Blockchain network"]
    Store --> Remote["Remote storage (decentralised or cloud)"]
    Enc --> Keys["Keys held by the user"]
    SDK --> Local["User local storage"]
```

*Figure: An app talks to the SDK, which uses the contracts on a blockchain, an encryption handler, remote storage and the user's local storage.*

## Original schematic

![Infrastructural layer schematic](https://raw.githubusercontent.com/4thtech/static-assets/main/image/infrastructural-layer-schematic-4thtech-v4.svg)

*Figure: The original 4thTech infrastructural layer schematic.*
