# uniswap/interface architecture

> Architecture diagram of the GitHub repository uniswap/interface, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-05). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/uniswap/interface
- Repository: https://github.com/uniswap/interface

## Overview

This repository contains three front-end interfaces: the Uniswap web app, mobile wallet, and browser wallet extension. The extension tree shows a principal dapp workflow: a website submits Ethereum provider requests through the content script, the background coordinates requests, and the wallet UI presents approval and signing flows. The graph also retains README-level coverage of the web and mobile products and major extension capabilities. Source excerpts are limited, so undocumented internal connections are omitted rather than inferred.

Main entry points: [`apps/extension/src/app/core/PopupApp.tsx`](https://github.com/uniswap/interface/blob/main/apps/extension/src/app/core/PopupApp.tsx) (Popup and sidebar), [`apps/extension/src/contentScript/WindowEthereumProxy.ts`](https://github.com/uniswap/interface/blob/main/apps/extension/src/contentScript/WindowEthereumProxy.ts) (Ethereum provider), [`apps/extension/src/contentScript/methodHandlers`](https://github.com/uniswap/interface/tree/main/apps/extension/src/contentScript/methodHandlers) (Method handlers), [`apps/extension/src/background/messagePassing/messageChannels.ts`](https://github.com/uniswap/interface/blob/main/apps/extension/src/background/messagePassing/messageChannels.ts) (Extension messaging)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_extension["Wallet Extension"]
  node_provider["Ethereum provider"]
  node_handlers["Method handlers"]
  node_bridge["Extension messaging<br/>[messageChannels.ts]"]
  node_background["Background coordinator"]
  node_request_ui["Request approval UI"]
  node_request_queue["Request queue"]
  node_signing["Transaction signing"]
  node_wallet_ui["Popup and sidebar<br/>[PopupApp.tsx]"]
  node_onboarding["Wallet onboarding"]
  node_accounts["Account management"]
  node_home["Portfolio and activity<br/>[HomeScreen.tsx]"]
  node_send_swap["Send and swap<br/>[SendFlow.tsx]"]
  node_settings["Wallet settings<br/>[SettingsScreen.tsx]"]
  node_unitags["Unitag profiles"]
  node_extension_store[("Extension state<br/>[store.ts]")]
  node_notifications["Notifications"]
end

subgraph group_web["Web App"]
  node_auction["Auction bidding"]
  node_portfolio_routes["Portfolio routing"]
end

subgraph group_mobile["Mobile Wallet"]
  node_mobile_app["Mobile wallet app"]
  node_cloud_backup[("Cloud backup service")]
  node_cloud_keys[("Native key storage<br/>[RNEthersRS.swift]")]
end

subgraph group_shared["Shared Services"]
  node_trade_options["Trade quote queries"]
  node_indicative["Indicative quote queries"]
  node_query_client["Query client"]
  node_shared_query[("Shared query cache")]
  node_session_storage[("Session storage")]
  node_session_provider["Session storage provider"]
  node_persist_query["Tab query persistence"]
end

node_dapp(("Dapp website"))

node_dapp -.->|"requests access"| node_provider
node_provider -.->|"dispatches methods"| node_handlers
node_handlers -.->|"sends requests"| node_bridge
node_bridge -.->|"routes messages"| node_background
node_background -.->|"coordinates requests"| node_request_queue
node_request_queue -.->|"renders requests"| node_request_ui
node_request_ui -.->|"prepares signing"| node_signing
node_wallet_ui -.->|"supports setup"| node_onboarding
node_wallet_ui -.->|"shows wallet"| node_home
node_home -.->|"offers transactions"| node_send_swap
node_wallet_ui -.->|"manages accounts"| node_accounts
node_wallet_ui -.->|"provides settings"| node_settings
node_wallet_ui -.->|"supports Unitags"| node_unitags
node_wallet_ui -.->|"displays notices"| node_notifications
node_wallet_ui -.->|"uses state"| node_extension_store
node_auction -.-> node_portfolio_routes
node_trade_options -.->|"uses query cache"| node_query_client
node_indicative -.->|"uses query cache"| node_query_client
node_session_provider -->|"creates storage"| node_session_storage
node_persist_query -.->|"persists cache entry"| node_shared_query
node_mobile_app -.->|"manages backups"| node_cloud_backup
node_cloud_backup -->|"retrieves mnemonic"| node_cloud_keys

click node_provider "https://github.com/uniswap/interface/blob/main/apps/extension/src/contentScript/WindowEthereumProxy.ts"
click node_handlers "https://github.com/uniswap/interface/tree/main/apps/extension/src/contentScript/methodHandlers"
click node_bridge "https://github.com/uniswap/interface/blob/main/apps/extension/src/background/messagePassing/messageChannels.ts"
click node_background "https://github.com/uniswap/interface/blob/main/apps/extension/src/background/backgroundDappRequests.ts"
click node_request_ui "https://github.com/uniswap/interface/blob/main/apps/extension/src/app/features/dappRequests/DappRequestContent.tsx"
click node_request_queue "https://github.com/uniswap/interface/blob/main/apps/extension/src/app/features/dappRequests/DappRequestQueue.tsx"
click node_signing "https://github.com/uniswap/interface/blob/main/apps/extension/src/app/features/dappRequests/hooks/usePrepareAndSignDappTransaction.ts"
click node_wallet_ui "https://github.com/uniswap/interface/blob/main/apps/extension/src/app/core/PopupApp.tsx"
click node_onboarding "https://github.com/uniswap/interface/blob/main/apps/extension/src/app/features/onboarding/OnboardingScreen.tsx"
click node_accounts "https://github.com/uniswap/interface/blob/main/apps/extension/src/app/features/accounts/AccountSwitcherScreen.tsx"
click node_home "https://github.com/uniswap/interface/blob/main/apps/extension/src/app/features/home/HomeScreen.tsx"
click node_send_swap "https://github.com/uniswap/interface/blob/main/apps/extension/src/app/features/send/SendFlow.tsx"
click node_settings "https://github.com/uniswap/interface/blob/main/apps/extension/src/app/features/settings/SettingsScreen.tsx"
click node_unitags "https://github.com/uniswap/interface/blob/main/apps/extension/src/app/features/unitags/UnitagCreateUsernameScreen.tsx"
click node_extension_store "https://github.com/uniswap/interface/blob/main/apps/extension/src/store/store.ts"
click node_notifications "https://github.com/uniswap/interface/blob/main/apps/extension/src/notification-service/ExtensionNotificationService.tsx"
click node_auction "https://github.com/uniswap/interface/blob/main/apps/web/src/features/Toucan/Auction/hooks/useBidFormController.ts"
click node_portfolio_routes "https://github.com/uniswap/interface/blob/main/apps/web/src/pages/Portfolio/Header/hooks/usePortfolioRoutes.ts"
click node_trade_options "https://github.com/uniswap/interface/blob/main/packages/uniswap/src/features/transactions/swap/hooks/useTrade/useTradeServiceQueryOptions.ts"
click node_indicative "https://github.com/uniswap/interface/blob/main/packages/uniswap/src/features/transactions/swap/hooks/useTrade/useIndicativeTradeServiceQueryOptions.ts"
click node_query_client "https://github.com/uniswap/interface/blob/main/packages/react-query/src/createQueryClient.ts"
click node_shared_query "https://github.com/uniswap/interface/blob/main/packages/api/src/clients/base/SharedQueryClient.ts"
click node_session_storage "https://github.com/uniswap/interface/blob/main/packages/sessions/src/session-storage/createSessionStorage.ts"
click node_session_provider "https://github.com/uniswap/interface/blob/main/packages/api/src/provideSessionStorage.ts"
click node_persist_query "https://github.com/uniswap/interface/blob/main/packages/utilities/src/reactQuery/useSessionStoragePersistedQuery.ts"
click node_mobile_app "https://github.com/uniswap/interface/blob/main/apps/mobile/src/features/CloudBackup/RNCloudStorageBackupsManager.ts"
click node_cloud_backup "https://github.com/uniswap/interface/blob/main/apps/mobile/ios/Uniswap/RNCloudBackupsManager/RNCloudStorageBackupsManager.swift"
click node_cloud_keys "https://github.com/uniswap/interface/blob/main/apps/mobile/ios/Uniswap/RNEthersRs/RNEthersRS.swift"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_provider,node_handlers,node_bridge,node_background,node_request_ui,node_request_queue,node_signing,node_wallet_ui,node_onboarding,node_accounts,node_home,node_send_swap,node_settings,node_unitags,node_extension_store,node_notifications toneBlue
class node_auction,node_portfolio_routes toneAmber
class node_mobile_app,node_cloud_backup,node_cloud_keys toneMint
class node_trade_options,node_indicative,node_query_client,node_shared_query,node_session_storage,node_session_provider,node_persist_query toneRose
class node_dapp toneIndigo
```

## Components

### Wallet Extension

- [Ethereum provider](https://github.com/uniswap/interface/blob/main/apps/extension/src/contentScript/WindowEthereumProxy.ts): `apps/extension/src/contentScript/WindowEthereumProxy.ts`
- [Method handlers](https://github.com/uniswap/interface/tree/main/apps/extension/src/contentScript/methodHandlers): `apps/extension/src/contentScript/methodHandlers`
- [Extension messaging](https://github.com/uniswap/interface/blob/main/apps/extension/src/background/messagePassing/messageChannels.ts): `apps/extension/src/background/messagePassing/messageChannels.ts`
- [Background coordinator](https://github.com/uniswap/interface/blob/main/apps/extension/src/background/backgroundDappRequests.ts): `apps/extension/src/background/backgroundDappRequests.ts`
- [Request approval UI](https://github.com/uniswap/interface/blob/main/apps/extension/src/app/features/dappRequests/DappRequestContent.tsx): `apps/extension/src/app/features/dappRequests/DappRequestContent.tsx`
- [Request queue](https://github.com/uniswap/interface/blob/main/apps/extension/src/app/features/dappRequests/DappRequestQueue.tsx): `apps/extension/src/app/features/dappRequests/DappRequestQueue.tsx`
- [Transaction signing](https://github.com/uniswap/interface/blob/main/apps/extension/src/app/features/dappRequests/hooks/usePrepareAndSignDappTransaction.ts): `apps/extension/src/app/features/dappRequests/hooks/usePrepareAndSignDappTransaction.ts`
- [Popup and sidebar](https://github.com/uniswap/interface/blob/main/apps/extension/src/app/core/PopupApp.tsx): `apps/extension/src/app/core/PopupApp.tsx`
- [Wallet onboarding](https://github.com/uniswap/interface/blob/main/apps/extension/src/app/features/onboarding/OnboardingScreen.tsx): `apps/extension/src/app/features/onboarding/OnboardingScreen.tsx`
- [Account management](https://github.com/uniswap/interface/blob/main/apps/extension/src/app/features/accounts/AccountSwitcherScreen.tsx): `apps/extension/src/app/features/accounts/AccountSwitcherScreen.tsx`
- [Portfolio and activity](https://github.com/uniswap/interface/blob/main/apps/extension/src/app/features/home/HomeScreen.tsx): `apps/extension/src/app/features/home/HomeScreen.tsx`
- [Send and swap](https://github.com/uniswap/interface/blob/main/apps/extension/src/app/features/send/SendFlow.tsx): `apps/extension/src/app/features/send/SendFlow.tsx`
- [Wallet settings](https://github.com/uniswap/interface/blob/main/apps/extension/src/app/features/settings/SettingsScreen.tsx): `apps/extension/src/app/features/settings/SettingsScreen.tsx`
- [Unitag profiles](https://github.com/uniswap/interface/blob/main/apps/extension/src/app/features/unitags/UnitagCreateUsernameScreen.tsx): `apps/extension/src/app/features/unitags/UnitagCreateUsernameScreen.tsx`
- [Extension state](https://github.com/uniswap/interface/blob/main/apps/extension/src/store/store.ts): `apps/extension/src/store/store.ts`
- [Notifications](https://github.com/uniswap/interface/blob/main/apps/extension/src/notification-service/ExtensionNotificationService.tsx): `apps/extension/src/notification-service/ExtensionNotificationService.tsx`

### Web App

- [Auction bidding](https://github.com/uniswap/interface/blob/main/apps/web/src/features/Toucan/Auction/hooks/useBidFormController.ts): `apps/web/src/features/Toucan/Auction/hooks/useBidFormController.ts`
- [Portfolio routing](https://github.com/uniswap/interface/blob/main/apps/web/src/pages/Portfolio/Header/hooks/usePortfolioRoutes.ts): `apps/web/src/pages/Portfolio/Header/hooks/usePortfolioRoutes.ts`

### Mobile Wallet

- [Mobile wallet app](https://github.com/uniswap/interface/blob/main/apps/mobile/src/features/CloudBackup/RNCloudStorageBackupsManager.ts): `apps/mobile/src/features/CloudBackup/RNCloudStorageBackupsManager.ts`
- [Cloud backup service](https://github.com/uniswap/interface/blob/main/apps/mobile/ios/Uniswap/RNCloudBackupsManager/RNCloudStorageBackupsManager.swift): `apps/mobile/ios/Uniswap/RNCloudBackupsManager/RNCloudStorageBackupsManager.swift`
- [Native key storage](https://github.com/uniswap/interface/blob/main/apps/mobile/ios/Uniswap/RNEthersRs/RNEthersRS.swift): `apps/mobile/ios/Uniswap/RNEthersRs/RNEthersRS.swift`

### Shared Services

- [Trade quote queries](https://github.com/uniswap/interface/blob/main/packages/uniswap/src/features/transactions/swap/hooks/useTrade/useTradeServiceQueryOptions.ts): `packages/uniswap/src/features/transactions/swap/hooks/useTrade/useTradeServiceQueryOptions.ts`
- [Indicative quote queries](https://github.com/uniswap/interface/blob/main/packages/uniswap/src/features/transactions/swap/hooks/useTrade/useIndicativeTradeServiceQueryOptions.ts): `packages/uniswap/src/features/transactions/swap/hooks/useTrade/useIndicativeTradeServiceQueryOptions.ts`
- [Query client](https://github.com/uniswap/interface/blob/main/packages/react-query/src/createQueryClient.ts): `packages/react-query/src/createQueryClient.ts`
- [Shared query cache](https://github.com/uniswap/interface/blob/main/packages/api/src/clients/base/SharedQueryClient.ts): `packages/api/src/clients/base/SharedQueryClient.ts`
- [Session storage](https://github.com/uniswap/interface/blob/main/packages/sessions/src/session-storage/createSessionStorage.ts): `packages/sessions/src/session-storage/createSessionStorage.ts`
- [Session storage provider](https://github.com/uniswap/interface/blob/main/packages/api/src/provideSessionStorage.ts): `packages/api/src/provideSessionStorage.ts`
- [Tab query persistence](https://github.com/uniswap/interface/blob/main/packages/utilities/src/reactQuery/useSessionStoragePersistedQuery.ts): `packages/utilities/src/reactQuery/useSessionStoragePersistedQuery.ts`

### Other components

- **Dapp website**

## Connections

- Dapp website → Ethereum provider: requests access (evidence: `README.md`)
- Ethereum provider → Method handlers: dispatches methods
- Method handlers → Extension messaging: sends requests
- Extension messaging → Background coordinator: routes messages
- Background coordinator → Request queue: coordinates requests
- Request queue → Request approval UI: renders requests
- Request approval UI → Transaction signing: prepares signing
- Popup and sidebar → Wallet onboarding: supports setup (evidence: `README.md`)
- Popup and sidebar → Portfolio and activity: shows wallet (evidence: `README.md`)
- Portfolio and activity → Send and swap: offers transactions (evidence: `README.md`)
- Popup and sidebar → Account management: manages accounts (evidence: `README.md`)
- Popup and sidebar → Wallet settings: provides settings (evidence: `README.md`)
- Popup and sidebar → Unitag profiles: supports Unitags (evidence: `README.md`)
- Popup and sidebar → Notifications: displays notices (evidence: `README.md`)
- Popup and sidebar → Extension state: uses state
- Auction bidding → Portfolio routing
- Trade quote queries → Query client: uses query cache
- Indicative quote queries → Query client: uses query cache
- Session storage provider → Session storage: creates storage (evidence: `packages/api/src/provideSessionStorage.ts`)
- Tab query persistence → Shared query cache: persists cache entry
- Mobile wallet app → Cloud backup service: manages backups (evidence: `README.md`)
- Cloud backup service → Native key storage: retrieves mnemonic (evidence: `apps/mobile/ios/Uniswap/RNCloudBackupsManager/RNCloudStorageBackupsManager.swift`)
