> For the complete documentation index, see [llms.txt](https://docs.reveel.id/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.reveel.id/getting-started/readme.md). Agents can also search and read this documentation through its [MCP server](https://docs.reveel.id/~gitbook/mcp).

# Technical Architecture

## Overview

Reveel PayID is designed as a **modular protocol layer** that enables cross-chain stablecoin transfers through a unified, human-readable identity: `yourname(id)`.

This page provides a detailed look at how Reveel’s core systems interact to deliver seamless payments — today and in the near future.

## Modular & Composable by Design

At the heart of PayID lies a **modular architecture** designed for flexibility, scalability, and composability. Rather than a linear pipeline, Reveel is built as a **hub-and-spoke system** where each core service operates as an independent, interoperable module — all coordinated through the Reveel protocol core.

### 1. External Integrations Layer

This is the entry point for interactions with Reveel PayID. Apps, wallets, AI agents, or platforms can integrate using REST APIs.

**APIs:**

* `POST /user/create` → Register a platform user
* `GET /user/list`, `GET /user/:id` → Retrieve user data

***

### 2. PayID Resolver

The resolver converts a PayID like `alice(id)` into actionable metadata, such as:

* Registered user
* Linked wallet addresses across chains
* Custom routing rules
* Associated identities (ENS, Lens, MocaID, email)

📌**APIs:**

* `POST /payid/claim` → Claim a new PayID
* `GET /payid/search` → Look up a user by PayID
* `GET /payid/check-price` → Check on-chain PayID price before claiming

***

### 3. Routes Engine

This component parses user-defined logic and determines how incoming funds should be routed. Each route is programmable and can be based on:

* Sender (e.g., route if Bob sends)
* Source Chain
* Source Token

Each route returns:

* Destination wallet address
* Destination chain
* Preferred token

📌**APIs:**

* `POST /routes/create`
* `PUT /routes/edit-route`
* `GET /routes/get-routes`
* `DELETE /routes/delete-route`

***

### 4. Reveel Liquidity Orchestration Layer (RLOL)

**Current Status:**\
RLOL is under active development. It will power routing decisions at a higher precision and future bridge/swap execution strategies.

&#x20;**Responsibilities:**

* Parse target route and prepare transaction context
* Allow routing through supported tokens and chains
* Liquidity Aggregator Engine (LAE) for querying bridges like Connext, Hop, etc.
* Dynamic route optimization (fees, slippage, latency)
* Swap support
* Retry/fallback logic

This layer will supports the full lifecycle of a transaction, even if external liquidity execution is abstracted for now.

***

### 5. Transaction Execution Layer

After a route is resolved, the transaction is initiated and handled through the following APIs:

📌 **Cureent** **APIs:**

* `POST /transact/init-transaction` → Triggers a transaction to the target wallet as defined in the resolved route
* `POST /transact/txn-webhook` → Used by external systems to push transaction status back to Reveel
* `GET /transact/get-activity` → Retrieve transaction metadata and history for a PayID

This system may expand to include bridge routing and swap intelligence, but currently supports clean execution flows based on PayID logic.
