> ## Documentation Index
> Fetch the complete documentation index at: https://www.offlineprotocol.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Architecture

> Explore the layered architecture of Offline Protocol — infrastructure, application, and user layers.

Offline Protocol’s system is structured into **three layers**, ensuring flexibility, scalability, and interoperability.

## 1. Infrastructure Layer

* **Offline Network:** Core peer-to-peer layer using WiFi-Direct and Bluetooth Mesh.
* **DORS (Dynamic Offline Relay Switch):** Smart routing engine selecting the optimal path across nodes.
* **Relay & Hub Devices:** Endpoints can also serve as relays to extend the network.

<img src="https://mintcdn.com/offlineprotocol/mOsIVS7YHl59BE2m/images/Core.svg?fit=max&auto=format&n=mOsIVS7YHl59BE2m&q=85&s=8b76d94b11f396b13dd10b7cbbd9fa2e" alt="Core Architecture" width="2722" height="1474" data-path="images/Core.svg" />

## 2. Application Layer

* **Offline ID:** Universal usernames serving as portable, protocol-wide identities.
* **Fernweh:** Fully offline, E2E encrypted communication platform built on Offline Protocol.
* **Service Hooks:** APIs for identity, discovery, and data exchange.

## 3. User Layer

* **Device Integration:** Devices auto-resolve via Offline ID.
* **Local Data Persistence:** Information is cached locally until sync.
* **Online Uplinks (optional):** Nodes with internet access act as bridges, enabling cross-network communication.
