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

# Architecture overview

> The account, coordination, and execution layers behind MyStacks.

MyStacks separates portfolio decisions from asset ownership.
The backend coordinates the work.
Each user's smart account holds their assets and governs delegated execution.

## System map

<img src="https://mintcdn.com/mystacks/fflLUc1SJOn3iX3z/assets/system-architecture.svg?fit=max&auto=format&n=fflLUc1SJOn3iX3z&q=85&s=be40e18eb5fa72a39c39eda1960f34c7" alt="MyStacks architecture. Manager portfolio decisions and user requests reach the backend. Liquidity routing supplies swap quotes. KMS signs session requests for the MyStacks execution layer. Each user's smart account holds the assets and enforces delegated permissions. The owner retains authorisation, revocation, and withdrawal control." width="960" height="940" data-path="assets/system-architecture.svg" />

The arrows describe responsibilities and transaction flow.

## Account layer

Each user's portfolio sits in a **user-owned smart account**.
The account keeps ownership separate from permission to trade.
**Delegated permissions** allow MyStacks to carry out authorised portfolio operations.

Read [smart accounts and ownership](/architecture/smart-accounts) for the user and manager boundary.

## Coordination layer

MyStacks connects subscriptions and portfolio decisions to transaction execution.
The backend coordinates these operations for each user's smart account.

## Execution layer

**Liquidity routing** connects portfolio trades to supported swap aggregators.
The **MyStacks execution layer** coordinates the resulting account calls.
The selected path supports sponsored transactions.

**KMS**, a key management service, protects the session signing key and signs execution requests.
This signing capability is separate from the user's ownership key.

Read [execution and rebalancing](/architecture/execution) for the flow from quote to confirmation.
