# How the Modules Fit Together

Source: https://docs.formance.com/v4.0/getting-started/modules-fit-together

Stack: v4.0

In Stack v4.0, three parts of the platform work together, and each one has a distinct job.

- **Ledger is your source of truth.** It records what your business believes to be true about every balance and movement of money, in double-entry form. When there is a disagreement about "how much do we have," the Ledger holds your answer.
- **Numscript expresses how money should move.** A Numscript program states the intent of a transaction (where funds come from, where they go, and how they split), and Ledger records it as one balanced transaction.
- **Connectivity brings the outside world in.** Its connectors read activity from external providers, such as payment processors, banks, exchanges, and cloud billing, and record it in Ledger as accounts, transactions, and metadata.

A typical money flow touches all three. A customer pays through a provider, and that provider's connector records the payment in Ledger under the provider's own accounts. Your application then runs a Numscript program that records what the payment means to your business, for example splitting it between a seller and your platform fee.

A Stack v4.0 installs the Ledger module by default. Other modules, including Connectivity, are not installed by default.

## Ledger

Ledger 3.0 keeps the double-entry accounting model: transactions made of postings or written in Numscript, reversals, metadata, unique references, and idempotent writes. Every ledger in a cluster shares one ordering of writes, so a single gRPC command can apply changes to several ledgers atomically. See the [Ledger overview](https://docs.formance.com/v4.0/modules/ledger/get-started/overview).

## Numscript

Numscript is the language for describing a money movement as intent rather than as a list of postings. You write the rule once, such as a percentage split or a fee taken from a specific account, and Ledger resolves it into postings when it records the transaction. Ledger 3.0 can also store Numscript programs per ledger and run them by reference. See [Write Transactions with Numscript](https://docs.formance.com/v4.0/modules/ledger/transactions/numscript).

## Connectivity

Each connector is specific to one provider. It keeps that provider's own identities, timing, and finality rather than reducing every provider to one generic model, and it records only the objects and lifecycle stages it declares in its coverage. Every connector page lists what it supports and what it leaves out.

A connector can also record the balances a provider reports, next to the balances Ledger derives from postings. Comparing the two is a control you run on your side: when they differ, the connector keeps both values as evidence and does not adjust your Ledger to match. See [Two views of a balance](https://docs.formance.com/v4.0/modules/connectivity/what-it-models#two-views-of-a-balance).

Connectivity is part of the Enterprise Edition. See [Connectivity](https://docs.formance.com/v4.0/modules/connectivity) and the [Connector Catalog](https://docs.formance.com/v4.0/modules/connectivity/connectors).

## Modules outside Stack v4.0

Payments, Wallets, Flows (Orchestration), Reconciliation, and Webhooks are not part of the Stack v4.0 composition. They remain documented for [Stack v3.2](https://docs.formance.com/getting-started/modules-fit-together). See the [Stack v4.0 changelog](https://docs.formance.com/v4.0/changelog/v4.0) for the full composition.
