> For the complete documentation index, see [llms.txt](https://allblue-docs.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://allblue-docs.gitbook.io/docs/en/allblue-v2/architecture.md).

# Architecture

AllBlue V2 is primarily composed of the Factory, Router, and Pair contracts.

```
User / Application
        │
        ▼
      Router
        │
        ▼
       Pair
        ▲
        │
      Factory
```

### Factory

The Factory is responsible for creating and looking up official V2 Pairs.

### Router

The Router is the primary user-facing entry point for providing liquidity, removing liquidity, and executing Swaps.

### Pair

Each Pair holds the liquidity for two tokens, issues LP Tokens, and processes liquidity changes and Swaps.
