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

# About Midaz

> Explore Midaz architecture with its Onboarding and Transaction domains, plus core components like Organizations, Ledgers, Assets, Accounts, and Portfolios.

export const GMetadata = ({children}) => <Tooltip headline="Metadata" tip="Additional key-value information attached to entities like accounts or transactions — such as external IDs, reference numbers, or department codes." cta="See glossary" href="/en/glossary">
    {children}
  </Tooltip>;

export const GAccountType = ({children}) => <Tooltip headline="Account Type" tip="A classification defining the nature and purpose of an account — such as checking, savings, escrow, or settlement — enabling proper transaction routing." cta="See glossary" href="/en/glossary">
    {children}
  </Tooltip>;

export const GAuditTrail = ({children}) => <Tooltip headline="Audit trail" tip="A chronological, immutable record of every action and transaction in the system — essential for regulatory compliance and dispute resolution." cta="See glossary" href="/en/glossary">
    {children}
  </Tooltip>;

export const GOperation = ({children}) => <Tooltip headline="Operation" tip="The atomic unit of movement in the ledger — a single debit or credit. Every transaction is composed of one or more operations, providing precise traceability for compliance and reporting." cta="See glossary" href="/en/glossary">
    {children}
  </Tooltip>;

export const GOperationRoute = ({children}) => <Tooltip headline="Operation Route" tip="A reusable template that defines the rules for one leg of a financial transaction — specifying which accounts participate, in what direction, and under what accounting annotation." cta="See glossary" href="/en/glossary">
    {children}
  </Tooltip>;

export const GTransactionRoute = ({children}) => <Tooltip headline="Accounting Route" tip="A complete transaction blueprint composed of multiple Operation Routes — defining all the debits and credits involved in a transaction type, ensuring double-entry compliance every time. Exposed as transactionRoute in the API." cta="See glossary" href="/en/glossary">
    {children}
  </Tooltip>;

export const GSegment = ({children}) => <Tooltip headline="Segment" tip="A classification applied to accounts that share characteristics — like customer tiers (VIP, Student) or regional divisions — enabling differentiated rules and pricing." cta="See glossary" href="/en/glossary">
    {children}
  </Tooltip>;

export const GPortfolio = ({children}) => <Tooltip headline="Portfolio" tip="A grouping of accounts belonging to the same customer, business unit, or purpose — tying together checking, savings, and investment accounts for a unified view." cta="See glossary" href="/en/glossary">
    {children}
  </Tooltip>;

export const GAsset = ({children}) => <Tooltip headline="Asset" tip="A unit of value tracked in the ledger — traditional currencies (BRL, USD), digital currencies (BTC), or custom units like loyalty points. Every account is linked to exactly one asset." cta="See glossary" href="/en/glossary">
    {children}
  </Tooltip>;

export const GSourceAvailable = ({children}) => <Tooltip headline="Source-available" tip="A licensing model where the source code is publicly accessible for inspection, modification, and self-hosting, while certain commercial uses may require a license." cta="See glossary" href="/en/glossary">
    {children}
  </Tooltip>;

export const GDoubleEntry = ({children}) => <Tooltip headline="Double-entry accounting" tip="Every financial movement is recorded as at least two operations: a debit from one account and a credit to another, ensuring the system always balances." cta="See glossary" href="/en/glossary">
    {children}
  </Tooltip>;

export const GLedger = ({children}) => <Tooltip headline="Ledger" tip="The core financial book that records all transactions, balances, and operations for an organization — the single source of truth for a business unit's finances." cta="See glossary" href="/en/glossary">
    {children}
  </Tooltip>;

Midaz is a <GSourceAvailable>source-available</GSourceAvailable> core <GLedger>ledger</GLedger>. Financial institutions use it to build, operate, and scale their transactions on a modular foundation. You keep full control of your stack.

Midaz has two core domains: **Onboarding** and **Transaction**. Together they give you a complete framework to configure, execute, and govern financial flows at scale.

<Note>
  This domain-driven architecture ensures that configuration (Onboarding) and execution (Transaction) remain clearly separated yet fully integrated — enabling performance, traceability, and business agility.
</Note>

## Domains and APIs

***

### Onboarding domain

In the **Onboarding Domain**, institutions structure their financial operations. They configure the essential entities of their ledger. This domain sets the rules, accounts, and relationships that govern how the ledger records and interprets transactions.

#### Components of the Onboarding Domain

* **Organizations**: A business entity that runs on Midaz — such as a bank, fintech, or subsidiary. Each organization holds its own ledgers, configurations, and access controls. One platform then supports multi-entity operations.

* **Ledgers**: The core financial book of an organization. <GLedger>Ledgers</GLedger> track every balance, transaction, and operation. They protect the integrity of all financial data. Think of a ledger as the single source of truth for a business unit's finances.

* **<GAsset>Assets</GAsset>**: The units of value that the ledger tracks — such as BRL, USD, BTC, or loyalty points. With this flexibility, institutions manage traditional currencies, digital assets, and custom reward programs in the same system.

* **<GAccountType>Account Types</GAccountType>**: Classifications that define the nature and purpose of accounts — for example, checking, savings, escrow, or settlement. These types route transactions correctly. They apply business rules consistently across account categories.

* **Accounts**: The fundamental units of value storage — where money, or any asset, actually lives. Each account always links to an Asset. You can group accounts into segments or portfolios to reflect your business structure.

* **<GPortfolio>Portfolios</GPortfolio>**: A group of accounts that belong to the same customer, business unit, or purpose. For example, one client may hold checking, savings, and investment accounts in different currencies. A portfolio ties them together for a unified view.

* **<GSegment>Segments</GSegment>**: Groups of accounts that share traits, such as customer tiers or regional divisions — for example, VIP or Student. Segments help you enforce different rules, prices, or benefits across your customer base.

<Tip>
  The Onboarding Domain configures how your financial world is structured, ensuring consistency before any transaction takes place.
</Tip>

### Transaction Domain

After you configure the Onboarding Domain, the **Transaction Domain** takes over. It powers the real-time execution, movement, and reconciliation of funds.

#### Components of the Transaction Domain

* **Balances**: The current balance of any account, including its available, on-hold, and reserved amounts. This real-time snapshot supports validations, pre-transaction checks, and customer-facing displays.

* **<GOperationRoute>Operation Routes</GOperationRoute>**: Reusable templates that define the rules for each leg of a financial transaction. A route specifies which accounts participate, in what direction (source or destination), and under what accounting annotation. Every transaction type then follows consistent business rules.

* **<GOperation>Operations</GOperation>**: The atomic unit of movement in the ledger — a single debit or credit. The ledger breaks every financial movement into operations. This gives a complete <GAuditTrail>audit trail</GAuditTrail> and precise traceability for compliance and reporting.

* **<GTransactionRoute>Accounting Routes</GTransactionRoute>**: Complete transaction blueprints that combine multiple Operation Routes. For example, a Pix Transfer route defines all the debits and credits involved. It enforces <GDoubleEntry>double-entry</GDoubleEntry> compliance every time you run that transaction type. The API exposes this as the `transactionRoute` resource.

* **Transactions**: The actual movement of value between accounts. A transaction can involve multiple **Operations**, such as fees, taxes, or splits. This supports complex financial flows, like marketplace payouts or multi-party settlements, in a single atomic event.

<Tip>
  The Transaction Domain ensures that every movement is processed accurately, transparently, and in compliance with business and accounting rules configured upstream.
</Tip>

## In short

***

Midaz is a domain-driven ledger platform for reliability, flexibility, and governance.

| Domain          | Purpose                                                      | Key APIs                                                                                     |
| :-------------- | :----------------------------------------------------------- | :------------------------------------------------------------------------------------------- |
| **Onboarding**  | Structure and configuration of the financial ecosystem.      | Organizations, Ledgers, Assets, Account Types, Accounts, Portfolios, Segments                |
| **Transaction** | Execution, movement, and accounting of financial operations. | Balances, Accounting Routes (`transactionRoute`), Transactions, Operation Routes, Operations |

With this architecture, financial institutions structure their data with precision and operate at scale. You keep full control and transparency over your financial ecosystem.
