# Core Architecture - Dao OS Documentation
The official documentation for the Dao OS, your Cyber-Life Operating System.

## Keyboard shortcuts

Press `←` or `→` to navigate between chapters

Press `S` or `/` to search in the book

Press `?` to show this help

Press `Esc` to hide this help

# Core Architecture

The architecture of Dao OS is designed to function like a living, collaborative digital organism. It is guided by our core principles of sovereignty, experience, and resilience. This document outlines the fundamental components and their interplay, including our unique application model.

## The Core Duality: Avatars & The Meta Unit

At its heart, Dao OS operates on a simple yet powerful duality, analogous to a body and a soul:

- Avatars (`化身`): The "bodies." They are the tangible presence of your Dao OS on your various devices.
- The Meta Unit (`元`): The "soul." It is the universal, core logic embedded within each Avatar, giving it life and intelligence.

## Avatar Types: The Forms of Presence

Avatars come in two fundamental types, representing the system's external form and its internal foundation.

- `Facet Avatar` (`器化身`): This type of Avatar possesses a user interface (UI). It is the "facet" of the Dao OS gem—the polished surface through which a user interacts with and perceives their digital world. Each Facet Avatar (a phone app, a desktop program) refracts the light of the central Meta Unit in its own unique way, embodying the principle of "the Dao manifesting in myriad forms."

- `Core Avatar` (`核化身`): This is a headless, non-UI Avatar that runs in the background. It is the foundational "core" of the system, providing essential services, computational power, and data persistence. It is the engine that supports all the visible facets.

A user's Dao is composed of a network of their Facet and Core Avatars.

## The Dao OS Application Model

An application in Dao OS is not a monolithic program but a decentralized, decoupled entity.

### 1. The Backend Soul: The Fluid & Pinnable Service

The application's core logic is a WASM module that runs sandboxed within the Meta Unit. Its deployment follows a hybrid model of Fluid Replication with Service Pinning, allowing for both resilience and user control.

### 2. The Frontend Skin: The On-Demand Web Shell

The application's UI is primarily a Web Application. Its lifecycle follows a "Register Once, Load On-Demand" model, running inside the official "Dao Web Avatar" (which is itself a Facet Avatar). This means a user installs an app once to their Dao, and can then instantly access it on any device.

### 3. The Data Layer: The Personal Feature Store

The data for all applications is stored securely in the user's Second Brain and acts as a Personal Feature Store for the AI.

## Architectural Summary

- Avatars: Act as native hosts for the Meta Unit. `Facet Avatars` render UIs, while `Core Avatars` provide robust backend support.
- Meta Unit: The sovereign core that runs sandboxed application logic (WASM), manages all data and state, and orchestrates tasks across the user's private P2P network.