# mozilla/application-services architecture

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

- Interactive diagram: https://gitdiagram.com/mozilla/application-services
- Repository: https://github.com/mozilla/application-services

## Overview

Firefox Application Services is a collection of Rust libraries that Firefox applications consume through native-language bindings. Its product workflow is therefore integration: an application uses a component API to access account, sync, storage, networking, experimentation, or other browser services. Sync-capable components stage and apply records through shared Sync 1.5 engines and a storage client. The README documents the consumer and binding model; sampled source shows selected sync and persistence relationships, not a single repository-wide runtime pipeline.

Main entry points: [`components/sync15/src/engine/sync_engine.rs`](https://github.com/mozilla/application-services/blob/main/components/sync15/src/engine/sync_engine.rs) (Sync Protocol), [`components/places/android`](https://github.com/mozilla/application-services/tree/main/components/places/android) (Native Bindings), [`components/logins/src/sync/engine.rs`](https://github.com/mozilla/application-services/blob/main/components/logins/src/sync/engine.rs) (Saved Logins), [`components/autofill/src/sync/engine.rs`](https://github.com/mozilla/application-services/blob/main/components/autofill/src/sync/engine.rs) (Autofill Data)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_integration["App Integration"]
  node_native_bindings["Native Bindings"]
end

subgraph group_account_sync["Accounts &amp; Sync"]
  node_fxa["Firefox Accounts<br/>[account.rs]"]
  node_sync15["Sync Protocol<br/>[sync_engine.rs]"]
  node_sync_http["Sync Storage Client<br/>[storage_client.rs]"]
  node_sync_manager["Sync Manager<br/>[manager.rs]"]
end

subgraph group_browser_data["Browser Data"]
  node_logins["Saved Logins<br/>[engine.rs]"]
  node_autofill["Autofill Data<br/>[engine.rs]"]
  node_places_api["Places API<br/>[places_api.rs]"]
  node_places_db[("Places Storage<br/>[mod.rs]")]
  node_bookmark_sync["Bookmark Sync<br/>[engine.rs]"]
  node_history_sync["History Sync<br/>[engine.rs]"]
  node_tabs[("Remote Tabs<br/>[storage.rs]")]
  node_tabs_sync["Tabs Sync<br/>[engine.rs]"]
end

subgraph group_remote_services["Remote Services"]
  node_remote_settings["Remote Settings<br/>[client.rs]"]
  node_ads["Ads Client<br/>[client.rs]"]
  node_push["WebPush<br/>[push_manager.rs]"]
end

subgraph group_experimentation["Experiments"]
  node_nimbus["Nimbus Experiments<br/>[nimbus_client.rs]"]
  node_nimbus_cli["Nimbus CLI<br/>[main.rs]"]
end

node_firefox_apps(("Firefox Apps"))

node_firefox_apps -->|"integrate through"| node_native_bindings
node_native_bindings -->|"wraps Rust API"| node_places_api
node_firefox_apps -->|"use component"| node_fxa
node_firefox_apps -->|"use component"| node_logins
node_firefox_apps -->|"use component"| node_autofill
node_firefox_apps -->|"use component"| node_places_api
node_firefox_apps -->|"use component"| node_tabs
node_firefox_apps -->|"use component"| node_remote_settings
node_firefox_apps -->|"use component"| node_ads
node_firefox_apps -->|"use component"| node_push
node_firefox_apps -->|"use component"| node_nimbus
node_logins -.->|"implements sync"| node_sync15
node_autofill -.->|"implements sync"| node_sync15
node_bookmark_sync -->|"syncs bookmarks"| node_places_db
node_history_sync -->|"reads and writes"| node_places_db
node_tabs_sync -->|"reads and writes"| node_tabs
node_sync_manager -.->|"coordinates engines"| node_sync15
node_sync15 -.->|"uses storage client"| node_sync_http
node_firefox_apps -.->|"configure experiments"| node_nimbus_cli

click node_native_bindings "https://github.com/mozilla/application-services/tree/main/components/places/android"
click node_fxa "https://github.com/mozilla/application-services/blob/main/components/fxa-client/src/account.rs"
click node_sync15 "https://github.com/mozilla/application-services/blob/main/components/sync15/src/engine/sync_engine.rs"
click node_sync_http "https://github.com/mozilla/application-services/blob/main/components/sync15/src/client/storage_client.rs"
click node_sync_manager "https://github.com/mozilla/application-services/blob/main/components/sync_manager/src/manager.rs"
click node_logins "https://github.com/mozilla/application-services/blob/main/components/logins/src/sync/engine.rs"
click node_autofill "https://github.com/mozilla/application-services/blob/main/components/autofill/src/sync/engine.rs"
click node_places_api "https://github.com/mozilla/application-services/blob/main/components/places/src/api/places_api.rs"
click node_places_db "https://github.com/mozilla/application-services/blob/main/components/places/src/storage/mod.rs"
click node_bookmark_sync "https://github.com/mozilla/application-services/blob/main/components/places/src/bookmark_sync/engine.rs"
click node_history_sync "https://github.com/mozilla/application-services/blob/main/components/places/src/history_sync/engine.rs"
click node_tabs "https://github.com/mozilla/application-services/blob/main/components/tabs/src/storage.rs"
click node_tabs_sync "https://github.com/mozilla/application-services/blob/main/components/tabs/src/sync/engine.rs"
click node_remote_settings "https://github.com/mozilla/application-services/blob/main/components/remote_settings/src/client.rs"
click node_ads "https://github.com/mozilla/application-services/blob/main/components/ads-client/src/client.rs"
click node_push "https://github.com/mozilla/application-services/blob/main/components/push/src/internal/push_manager.rs"
click node_nimbus "https://github.com/mozilla/application-services/blob/main/components/nimbus/src/stateful/nimbus_client.rs"
click node_nimbus_cli "https://github.com/mozilla/application-services/blob/main/components/support/nimbus-cli/src/main.rs"

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_native_bindings toneBlue
class node_fxa,node_sync15,node_sync_http,node_sync_manager toneAmber
class node_logins,node_autofill,node_places_api,node_places_db,node_bookmark_sync,node_history_sync,node_tabs,node_tabs_sync toneMint
class node_remote_settings,node_ads,node_push toneRose
class node_nimbus,node_nimbus_cli,node_firefox_apps toneIndigo
```

## Components

### App Integration

- [Native Bindings](https://github.com/mozilla/application-services/tree/main/components/places/android): `components/places/android`

### Accounts & Sync

- [Firefox Accounts](https://github.com/mozilla/application-services/blob/main/components/fxa-client/src/account.rs): `components/fxa-client/src/account.rs`
- [Sync Protocol](https://github.com/mozilla/application-services/blob/main/components/sync15/src/engine/sync_engine.rs): `components/sync15/src/engine/sync_engine.rs`
- [Sync Storage Client](https://github.com/mozilla/application-services/blob/main/components/sync15/src/client/storage_client.rs): `components/sync15/src/client/storage_client.rs`
- [Sync Manager](https://github.com/mozilla/application-services/blob/main/components/sync_manager/src/manager.rs): `components/sync_manager/src/manager.rs`

### Browser Data

- [Saved Logins](https://github.com/mozilla/application-services/blob/main/components/logins/src/sync/engine.rs): `components/logins/src/sync/engine.rs`
- [Autofill Data](https://github.com/mozilla/application-services/blob/main/components/autofill/src/sync/engine.rs): `components/autofill/src/sync/engine.rs`
- [Places API](https://github.com/mozilla/application-services/blob/main/components/places/src/api/places_api.rs): `components/places/src/api/places_api.rs`
- [Places Storage](https://github.com/mozilla/application-services/blob/main/components/places/src/storage/mod.rs): `components/places/src/storage/mod.rs`
- [Bookmark Sync](https://github.com/mozilla/application-services/blob/main/components/places/src/bookmark_sync/engine.rs): `components/places/src/bookmark_sync/engine.rs`
- [History Sync](https://github.com/mozilla/application-services/blob/main/components/places/src/history_sync/engine.rs): `components/places/src/history_sync/engine.rs`
- [Remote Tabs](https://github.com/mozilla/application-services/blob/main/components/tabs/src/storage.rs): `components/tabs/src/storage.rs`
- [Tabs Sync](https://github.com/mozilla/application-services/blob/main/components/tabs/src/sync/engine.rs): `components/tabs/src/sync/engine.rs`

### Remote Services

- [Remote Settings](https://github.com/mozilla/application-services/blob/main/components/remote_settings/src/client.rs): `components/remote_settings/src/client.rs`
- [Ads Client](https://github.com/mozilla/application-services/blob/main/components/ads-client/src/client.rs): `components/ads-client/src/client.rs`
- [WebPush](https://github.com/mozilla/application-services/blob/main/components/push/src/internal/push_manager.rs): `components/push/src/internal/push_manager.rs`

### Experiments

- [Nimbus Experiments](https://github.com/mozilla/application-services/blob/main/components/nimbus/src/stateful/nimbus_client.rs): `components/nimbus/src/stateful/nimbus_client.rs`
- [Nimbus CLI](https://github.com/mozilla/application-services/blob/main/components/support/nimbus-cli/src/main.rs): `components/support/nimbus-cli/src/main.rs`

### Other components

- **Firefox Apps**

## Connections

- Firefox Apps → Native Bindings: integrate through
- Native Bindings → Places API: wraps Rust API
- Firefox Apps → Firefox Accounts: use component
- Firefox Apps → Saved Logins: use component
- Firefox Apps → Autofill Data: use component
- Firefox Apps → Places API: use component
- Firefox Apps → Remote Tabs: use component
- Firefox Apps → Remote Settings: use component
- Firefox Apps → Ads Client: use component
- Firefox Apps → WebPush: use component
- Firefox Apps → Nimbus Experiments: use component
- Saved Logins → Sync Protocol: implements sync
- Autofill Data → Sync Protocol: implements sync
- Bookmark Sync → Places Storage: syncs bookmarks (evidence: `components/places/src/bookmark_sync/engine.rs`)
- History Sync → Places Storage: reads and writes (evidence: `components/places/src/history_sync/engine.rs`)
- Tabs Sync → Remote Tabs: reads and writes (evidence: `components/tabs/src/sync/engine.rs`)
- Sync Manager → Sync Protocol: coordinates engines
- Sync Protocol → Sync Storage Client: uses storage client
- Firefox Apps → Nimbus CLI: configure experiments
