# browserslist/caniuse-lite architecture

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

- Interactive diagram: https://gitdiagram.com/browserslist/caniuse-lite
- Repository: https://github.com/browserslist/caniuse-lite

## Overview

caniuse-lite is a compact browser-compatibility data package. Consumers use its API to access browser agents, enumerate feature records and expand an individual feature, or expand regional usage data. The feature and region records retain selected caniuse-db fields in packed form. The README documents these results, but the unpacker implementation is not present in the supplied tree, so its internal calls are not mapped; packing/build code is omitted.

Main entry points: [`data/features.js`](https://github.com/browserslist/caniuse-lite/blob/main/data/features.js) (Feature API), [`data/agents.js`](https://github.com/browserslist/caniuse-lite/blob/main/data/agents.js) (Agents API), [`data/regions`](https://github.com/browserslist/caniuse-lite/tree/main/data/regions) (Region API), [`data/features`](https://github.com/browserslist/caniuse-lite/tree/main/data/features) (Feature Records)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["Consumer API"]
  node_feature_api["Feature API<br/>[features.js]"]
  node_agents_api["Agents API<br/>[agents.js]"]
  node_region_api["Region API"]
end

subgraph group_browser["Browser Data"]
  node_agents["Browser Agents<br/>[agents.js]"]
  node_browsers["Browser Keys<br/>[browsers.js]"]
  node_versions["Version Keys<br/>[browserVersions.js]"]
end

subgraph group_compat["Compatibility Data"]
  node_feature_index["Feature Index<br/>[features.js]"]
  node_feature_data["Feature Records"]
  node_version_groups["Support Groups<br/>[versionGroups.js]"]
end

subgraph group_regional["Regional Data"]
  node_region_data["Regional Records"]
end

node_consumer(("Library Consumer"))

node_consumer -->|"requests agents"| node_agents_api
node_agents_api -->|"returns subset"| node_agents
node_consumer -->|"queries features"| node_feature_api
node_feature_api -->|"uses index"| node_feature_index
node_consumer -->|"expands feature"| node_feature_api
node_feature_api -->|"returns record"| node_feature_data
node_consumer -->|"requests region"| node_region_api
node_region_api -->|"returns usage"| node_region_data

click node_agents "https://github.com/browserslist/caniuse-lite/blob/main/data/agents.js"
click node_browsers "https://github.com/browserslist/caniuse-lite/blob/main/data/browsers.js"
click node_versions "https://github.com/browserslist/caniuse-lite/blob/main/data/browserVersions.js"
click node_feature_index "https://github.com/browserslist/caniuse-lite/blob/main/data/features.js"
click node_feature_data "https://github.com/browserslist/caniuse-lite/tree/main/data/features"
click node_version_groups "https://github.com/browserslist/caniuse-lite/blob/main/data/versionGroups.js"
click node_feature_api "https://github.com/browserslist/caniuse-lite/blob/main/data/features.js"
click node_agents_api "https://github.com/browserslist/caniuse-lite/blob/main/data/agents.js"
click node_region_data "https://github.com/browserslist/caniuse-lite/tree/main/data/regions"
click node_region_api "https://github.com/browserslist/caniuse-lite/tree/main/data/regions"

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_feature_api,node_agents_api,node_region_api toneBlue
class node_agents,node_browsers,node_versions toneAmber
class node_feature_index,node_feature_data,node_version_groups toneMint
class node_region_data toneRose
class node_consumer toneIndigo
```

## Components

### Consumer API

- [Feature API](https://github.com/browserslist/caniuse-lite/blob/main/data/features.js): `data/features.js`
- [Agents API](https://github.com/browserslist/caniuse-lite/blob/main/data/agents.js): `data/agents.js`
- [Region API](https://github.com/browserslist/caniuse-lite/tree/main/data/regions): `data/regions`

### Browser Data

- [Browser Agents](https://github.com/browserslist/caniuse-lite/blob/main/data/agents.js): `data/agents.js`
- [Browser Keys](https://github.com/browserslist/caniuse-lite/blob/main/data/browsers.js): `data/browsers.js`
- [Version Keys](https://github.com/browserslist/caniuse-lite/blob/main/data/browserVersions.js): `data/browserVersions.js`

### Compatibility Data

- [Feature Index](https://github.com/browserslist/caniuse-lite/blob/main/data/features.js): `data/features.js`
- [Feature Records](https://github.com/browserslist/caniuse-lite/tree/main/data/features): `data/features`
- [Support Groups](https://github.com/browserslist/caniuse-lite/blob/main/data/versionGroups.js): `data/versionGroups.js`

### Regional Data

- [Regional Records](https://github.com/browserslist/caniuse-lite/tree/main/data/regions): `data/regions`

### Other components

- **Library Consumer**

## Connections

- Library Consumer → Agents API: requests agents
- Agents API → Browser Agents: returns subset (evidence: `data/agents.js`)
- Library Consumer → Feature API: queries features
- Feature API → Feature Index: uses index (evidence: `data/features.js`)
- Library Consumer → Feature API: expands feature
- Feature API → Feature Records: returns record (evidence: `data/features.js`)
- Library Consumer → Region API: requests region
- Region API → Regional Records: returns usage
