# voxel51/fiftyone architecture

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

- Interactive diagram: https://gitdiagram.com/voxel51/fiftyone
- Repository: https://github.com/voxel51/fiftyone

## Overview

FiftyOne is an open-source visual-AI dataset and model development tool. Users work with datasets to inspect and filter samples, annotate visual data, evaluate models, and improve data quality. The repository combines a Python dataset/server runtime with a React application and a specialized annotation engine. The graph preserves those product stages and the engine’s state, view, and surface layers. Relationships are limited to those visible in the README or SOURCE INDEX references; many application and server details are unsampled.

Main entry points: [`fiftyone/core/view.py`](https://github.com/voxel51/fiftyone/blob/main/fiftyone/core/view.py) (Dataset views), [`app/packages/annotation/src/engine/core/engine.ts`](https://github.com/voxel51/fiftyone/blob/main/app/packages/annotation/src/engine/core/engine.ts) (Annotation engine), [`fiftyone/server/app.py`](https://github.com/voxel51/fiftyone/blob/main/fiftyone/server/app.py) (Server application), [`app/packages/annotation/src/state/useEngine.ts`](https://github.com/voxel51/fiftyone/blob/main/app/packages/annotation/src/state/useEngine.ts) (Engine session)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_dataset["Dataset Core"]
  node_dataset["Datasets<br/>[dataset.py]"]
  node_view["Dataset views<br/>[view.py]"]
  node_stages["View stages<br/>[stages.py]"]
  node_collections["Collections<br/>[collections.py]"]
  node_fields["Schema fields<br/>[fields.py]"]
  node_expressions["Expressions<br/>[expressions.py]"]
  node_db[("MongoDB<br/>[database.py]")]
  node_python_api["Python API<br/>[__public__.py]"]
end

subgraph group_server["Server Runtime"]
  node_server_app["Server application<br/>[app.py]"]
  node_graphql["GraphQL queries<br/>[query.py]"]
  node_routes["HTTP routes<br/>[fiftyone.py]"]
  node_decorators["Route decorators<br/>[decorators.py]"]
  node_operators["Operator workflows<br/>[server.py]"]
end

subgraph group_app["App Experience"]
  node_web_app["Web application<br/>[index.tsx]"]
  node_dataset_page["Dataset browser<br/>[DatasetPage.tsx]"]
end

subgraph group_annotation["Annotation Engine"]
  node_annotation["Annotation tools<br/>[registry.ts]"]
  node_engine["Annotation engine<br/>[engine.ts]"]
  node_identity["Entity identity<br/>[ref.ts]"]
  node_sample_store[("Sample label store")]
  node_engine_state["Engine session<br/>[useEngine.ts]"]
  node_surface_bridge["Surface bridge"]
  node_lighter_bridge["2D canvas bridge"]
  node_video_bridge["Video canvas bridge"]
end

subgraph group_analytics["Model Analysis"]
  node_evaluation["Model evaluation<br/>[__init__.py]"]
  node_similarity["Similarity search<br/>[run_manager.py]"]
end

node_user(("Dataset builder"))

node_user -->|"build datasets"| node_dataset
node_user -->|"inspect samples"| node_dataset_page
node_user -->|"label data"| node_annotation
node_user -->|"evaluate models"| node_evaluation
node_user -->|"improve quality"| node_similarity
node_python_api -.->|"exposes"| node_dataset
node_view -->|"uses"| node_collections
node_view -->|"uses"| node_expressions
node_view -->|"uses"| node_fields
node_server_app -->|"loads"| node_graphql
node_server_app -->|"loads"| node_routes
node_routes -->|"registers route"| node_decorators
node_web_app -.->|"routes to"| node_dataset_page
node_engine -->|"uses references"| node_identity
node_engine_state -->|"creates"| node_engine
node_engine_state -->|"registers stores"| node_sample_store
node_surface_bridge -->|"bridges to"| node_engine
node_lighter_bridge -->|"uses bridge"| node_surface_bridge
node_video_bridge -->|"configures"| node_lighter_bridge

click node_dataset "https://github.com/voxel51/fiftyone/blob/main/fiftyone/core/dataset.py"
click node_view "https://github.com/voxel51/fiftyone/blob/main/fiftyone/core/view.py"
click node_stages "https://github.com/voxel51/fiftyone/blob/main/fiftyone/core/stages.py"
click node_collections "https://github.com/voxel51/fiftyone/blob/main/fiftyone/core/collections.py"
click node_fields "https://github.com/voxel51/fiftyone/blob/main/fiftyone/core/fields.py"
click node_expressions "https://github.com/voxel51/fiftyone/blob/main/fiftyone/core/expressions.py"
click node_db "https://github.com/voxel51/fiftyone/blob/main/fiftyone/core/odm/database.py"
click node_python_api "https://github.com/voxel51/fiftyone/blob/main/fiftyone/__public__.py"
click node_server_app "https://github.com/voxel51/fiftyone/blob/main/fiftyone/server/app.py"
click node_graphql "https://github.com/voxel51/fiftyone/blob/main/fiftyone/server/query.py"
click node_routes "https://github.com/voxel51/fiftyone/blob/main/fiftyone/server/routes/fiftyone.py"
click node_decorators "https://github.com/voxel51/fiftyone/blob/main/fiftyone/server/decorators.py"
click node_web_app "https://github.com/voxel51/fiftyone/blob/main/app/packages/app/src/index.tsx"
click node_dataset_page "https://github.com/voxel51/fiftyone/blob/main/app/packages/app/src/pages/datasets/DatasetPage.tsx"
click node_annotation "https://github.com/voxel51/fiftyone/blob/main/app/packages/annotation/src/agents/registry.ts"
click node_engine "https://github.com/voxel51/fiftyone/blob/main/app/packages/annotation/src/engine/core/engine.ts"
click node_identity "https://github.com/voxel51/fiftyone/blob/main/app/packages/annotation/src/engine/identity/ref.ts"
click node_sample_store "https://github.com/voxel51/fiftyone/blob/main/app/packages/annotation/src/engine/store/sampleLabelStore.ts"
click node_engine_state "https://github.com/voxel51/fiftyone/blob/main/app/packages/annotation/src/state/useEngine.ts"
click node_surface_bridge "https://github.com/voxel51/fiftyone/blob/main/app/packages/annotation/src/engine/react/useSurfaceBridge.ts"
click node_lighter_bridge "https://github.com/voxel51/fiftyone/blob/main/app/packages/annotation/src/engine/surfaces/lighter/useLighterEngineBridge.ts"
click node_video_bridge "https://github.com/voxel51/fiftyone/blob/main/app/packages/video-annotation/src/hooks/useVideoLighterEngineBridge.ts"
click node_evaluation "https://github.com/voxel51/fiftyone/blob/main/plugins/operators/model_evaluation/__init__.py"
click node_similarity "https://github.com/voxel51/fiftyone/blob/main/plugins/panels/similarity_search/run_manager.py"
click node_operators "https://github.com/voxel51/fiftyone/blob/main/fiftyone/operators/server.py"

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_dataset,node_view,node_stages,node_collections,node_fields,node_expressions,node_db,node_python_api toneBlue
class node_server_app,node_graphql,node_routes,node_decorators,node_operators toneAmber
class node_web_app,node_dataset_page toneMint
class node_annotation,node_engine,node_identity,node_sample_store,node_engine_state,node_surface_bridge,node_lighter_bridge,node_video_bridge toneRose
class node_evaluation,node_similarity,node_user toneIndigo
```

## Components

### Dataset Core

- [Datasets](https://github.com/voxel51/fiftyone/blob/main/fiftyone/core/dataset.py): `fiftyone/core/dataset.py`
- [Dataset views](https://github.com/voxel51/fiftyone/blob/main/fiftyone/core/view.py): `fiftyone/core/view.py`
- [View stages](https://github.com/voxel51/fiftyone/blob/main/fiftyone/core/stages.py): `fiftyone/core/stages.py`
- [Collections](https://github.com/voxel51/fiftyone/blob/main/fiftyone/core/collections.py): `fiftyone/core/collections.py`
- [Schema fields](https://github.com/voxel51/fiftyone/blob/main/fiftyone/core/fields.py): `fiftyone/core/fields.py`
- [Expressions](https://github.com/voxel51/fiftyone/blob/main/fiftyone/core/expressions.py): `fiftyone/core/expressions.py`
- [MongoDB](https://github.com/voxel51/fiftyone/blob/main/fiftyone/core/odm/database.py): `fiftyone/core/odm/database.py`
- [Python API](https://github.com/voxel51/fiftyone/blob/main/fiftyone/__public__.py): `fiftyone/__public__.py`

### Server Runtime

- [Server application](https://github.com/voxel51/fiftyone/blob/main/fiftyone/server/app.py): `fiftyone/server/app.py`
- [GraphQL queries](https://github.com/voxel51/fiftyone/blob/main/fiftyone/server/query.py): `fiftyone/server/query.py`
- [HTTP routes](https://github.com/voxel51/fiftyone/blob/main/fiftyone/server/routes/fiftyone.py): `fiftyone/server/routes/fiftyone.py`
- [Route decorators](https://github.com/voxel51/fiftyone/blob/main/fiftyone/server/decorators.py): `fiftyone/server/decorators.py`
- [Operator workflows](https://github.com/voxel51/fiftyone/blob/main/fiftyone/operators/server.py): `fiftyone/operators/server.py`

### App Experience

- [Web application](https://github.com/voxel51/fiftyone/blob/main/app/packages/app/src/index.tsx): `app/packages/app/src/index.tsx`
- [Dataset browser](https://github.com/voxel51/fiftyone/blob/main/app/packages/app/src/pages/datasets/DatasetPage.tsx): `app/packages/app/src/pages/datasets/DatasetPage.tsx`

### Annotation Engine

- [Annotation tools](https://github.com/voxel51/fiftyone/blob/main/app/packages/annotation/src/agents/registry.ts): `app/packages/annotation/src/agents/registry.ts`
- [Annotation engine](https://github.com/voxel51/fiftyone/blob/main/app/packages/annotation/src/engine/core/engine.ts): `app/packages/annotation/src/engine/core/engine.ts`
- [Entity identity](https://github.com/voxel51/fiftyone/blob/main/app/packages/annotation/src/engine/identity/ref.ts): `app/packages/annotation/src/engine/identity/ref.ts`
- [Sample label store](https://github.com/voxel51/fiftyone/blob/main/app/packages/annotation/src/engine/store/sampleLabelStore.ts): `app/packages/annotation/src/engine/store/sampleLabelStore.ts`
- [Engine session](https://github.com/voxel51/fiftyone/blob/main/app/packages/annotation/src/state/useEngine.ts): `app/packages/annotation/src/state/useEngine.ts`
- [Surface bridge](https://github.com/voxel51/fiftyone/blob/main/app/packages/annotation/src/engine/react/useSurfaceBridge.ts): `app/packages/annotation/src/engine/react/useSurfaceBridge.ts`
- [2D canvas bridge](https://github.com/voxel51/fiftyone/blob/main/app/packages/annotation/src/engine/surfaces/lighter/useLighterEngineBridge.ts): `app/packages/annotation/src/engine/surfaces/lighter/useLighterEngineBridge.ts`
- [Video canvas bridge](https://github.com/voxel51/fiftyone/blob/main/app/packages/video-annotation/src/hooks/useVideoLighterEngineBridge.ts): `app/packages/video-annotation/src/hooks/useVideoLighterEngineBridge.ts`

### Model Analysis

- [Model evaluation](https://github.com/voxel51/fiftyone/blob/main/plugins/operators/model_evaluation/__init__.py): `plugins/operators/model_evaluation/__init__.py`
- [Similarity search](https://github.com/voxel51/fiftyone/blob/main/plugins/panels/similarity_search/run_manager.py): `plugins/panels/similarity_search/run_manager.py`

### Other components

- **Dataset builder**

## Connections

- Dataset builder → Datasets: build datasets (evidence: `README.md`)
- Dataset builder → Dataset browser: inspect samples (evidence: `README.md`)
- Dataset builder → Annotation tools: label data (evidence: `README.md`)
- Dataset builder → Model evaluation: evaluate models (evidence: `README.md`)
- Dataset builder → Similarity search: improve quality (evidence: `README.md`)
- Python API → Datasets: exposes
- Dataset views → Collections: uses (evidence: `fiftyone/core/view.py`)
- Dataset views → Expressions: uses (evidence: `fiftyone/core/view.py`)
- Dataset views → Schema fields: uses (evidence: `fiftyone/core/view.py`)
- Server application → GraphQL queries: loads (evidence: `fiftyone/server/app.py`)
- Server application → HTTP routes: loads (evidence: `fiftyone/server/app.py`)
- HTTP routes → Route decorators: registers route (evidence: `fiftyone/server/routes/fiftyone.py`)
- Web application → Dataset browser: routes to
- Annotation engine → Entity identity: uses references (evidence: `app/packages/annotation/src/engine/core/engine.ts`)
- Engine session → Annotation engine: creates (evidence: `app/packages/annotation/src/state/useEngine.ts`)
- Engine session → Sample label store: registers stores (evidence: `app/packages/annotation/src/state/useEngine.ts`)
- Surface bridge → Annotation engine: bridges to (evidence: `app/packages/annotation/src/engine/react/useSurfaceBridge.ts`)
- 2D canvas bridge → Surface bridge: uses bridge (evidence: `app/packages/annotation/src/engine/surfaces/lighter/useLighterEngineBridge.ts`)
- Video canvas bridge → 2D canvas bridge: configures (evidence: `app/packages/video-annotation/src/hooks/useVideoLighterEngineBridge.ts`)
