# horacech/linear-gragh-explorer architecture

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

- Interactive diagram: https://gitdiagram.com/horacech/linear-gragh-explorer
- Repository: https://github.com/horacech/linear-gragh-explorer

## Overview

PVCR Linear Graph Explorer is a private, read-only task-graph SPA. Users can connect with Linear OAuth or explore synthetic demo data, then inspect team projects, milestones, issues and their relationships in filtered, focused or expanded graph views. The live sync validates the PVCR team, retrieves and normalizes a complete snapshot, and the UI presents graph diagnostics and task details. The excerpts show the sync, authorization and normalization calls; some UI feature wiring is not shown, so those relationships are omitted.

Main entry points: [`src/api.ts`](https://github.com/horacech/linear-gragh-explorer/blob/main/src/api.ts) (Sync Orchestrator), [`src/main.tsx`](https://github.com/horacech/linear-gragh-explorer/blob/main/src/main.tsx) (Explorer App), [`src/auth.ts`](https://github.com/horacech/linear-gragh-explorer/blob/main/src/auth.ts) (PKCE Auth), [`src/model.ts`](https://github.com/horacech/linear-gragh-explorer/blob/main/src/model.ts) (Graph Normalize)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_connection["Connection"]
  node_auth["PKCE Auth<br/>[auth.ts]"]
end

subgraph group_sync["Live Sync"]
  node_sync_entry["Sync Orchestrator<br/>[api.ts]"]
  node_team_access["Team Validation<br/>[api.ts]"]
  node_project_issue["Project &amp; Issue Fetch<br/>[api.ts]"]
  node_milestone_fetch["Milestone Fetch<br/>[api.ts]"]
  node_relation_fetch["Relation Fetch<br/>[api.ts]"]
  node_transport["GraphQL Transport<br/>[api.ts]"]
  node_pagination["Pagination<br/>[api.ts]"]
end

subgraph group_graph["Graph Domain"]
  node_normalize["Graph Normalize<br/>[model.ts]"]
  node_analysis["Graph Analysis<br/>[model.ts]"]
  node_traversal["Neighborhood Expansion<br/>[model.ts]"]
  node_demo["Synthetic Graph<br/>[demo.ts]"]
end

subgraph group_experience["Explorer UI"]
  node_app["Explorer App<br/>[main.tsx]"]
  node_graph_views["Graph Views<br/>[main.tsx]"]
  node_filters_layout["Filters &amp; Layout<br/>[main.tsx]"]
  node_diagnostics["Diagnostics &amp; Details<br/>[main.tsx]"]
  node_connection_settings["Connection Settings<br/>[main.tsx]"]
end

node_user(("User"))
node_linear{{"Linear API"}}
node_oauth{{"OAuth Service"}}

node_user -->|"uses"| node_app
node_app -->|"finishes login"| node_auth
node_auth -->|"exchanges tokens"| node_oauth
node_auth -->|"redirects for consent"| node_oauth
node_app -->|"starts sync"| node_sync_entry
node_sync_entry -->|"validates team"| node_team_access
node_sync_entry -->|"loads records"| node_project_issue
node_sync_entry -->|"loads milestones"| node_milestone_fetch
node_sync_entry -->|"loads relations"| node_relation_fetch
node_team_access -->|"queries through"| node_transport
node_project_issue -->|"queries through"| node_transport
node_milestone_fetch -->|"queries through"| node_transport
node_relation_fetch -->|"queries through"| node_transport
node_project_issue -->|"loads pages"| node_pagination
node_milestone_fetch -->|"loads pages"| node_pagination
node_relation_fetch -->|"loads pages"| node_pagination
node_transport -->|"gets access token"| node_auth
node_transport -->|"sends GraphQL"| node_linear
node_sync_entry -->|"normalizes snapshot"| node_normalize
node_app -.->|"loads demo"| node_demo

click node_auth "https://github.com/horacech/linear-gragh-explorer/blob/main/src/auth.ts"
click node_sync_entry "https://github.com/horacech/linear-gragh-explorer/blob/main/src/api.ts"
click node_team_access "https://github.com/horacech/linear-gragh-explorer/blob/main/src/api.ts"
click node_project_issue "https://github.com/horacech/linear-gragh-explorer/blob/main/src/api.ts"
click node_milestone_fetch "https://github.com/horacech/linear-gragh-explorer/blob/main/src/api.ts"
click node_relation_fetch "https://github.com/horacech/linear-gragh-explorer/blob/main/src/api.ts"
click node_transport "https://github.com/horacech/linear-gragh-explorer/blob/main/src/api.ts"
click node_pagination "https://github.com/horacech/linear-gragh-explorer/blob/main/src/api.ts"
click node_normalize "https://github.com/horacech/linear-gragh-explorer/blob/main/src/model.ts"
click node_analysis "https://github.com/horacech/linear-gragh-explorer/blob/main/src/model.ts"
click node_traversal "https://github.com/horacech/linear-gragh-explorer/blob/main/src/model.ts"
click node_demo "https://github.com/horacech/linear-gragh-explorer/blob/main/src/demo.ts"
click node_app "https://github.com/horacech/linear-gragh-explorer/blob/main/src/main.tsx"
click node_graph_views "https://github.com/horacech/linear-gragh-explorer/blob/main/src/main.tsx"
click node_filters_layout "https://github.com/horacech/linear-gragh-explorer/blob/main/src/main.tsx"
click node_diagnostics "https://github.com/horacech/linear-gragh-explorer/blob/main/src/main.tsx"
click node_connection_settings "https://github.com/horacech/linear-gragh-explorer/blob/main/src/main.tsx"

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_auth,node_user toneBlue
class node_sync_entry,node_team_access,node_project_issue,node_milestone_fetch,node_relation_fetch,node_transport,node_pagination toneAmber
class node_normalize,node_analysis,node_traversal,node_demo,node_linear toneMint
class node_app,node_graph_views,node_filters_layout,node_diagnostics,node_connection_settings toneRose
class node_oauth toneIndigo
```

## Components

### Connection

- [PKCE Auth](https://github.com/horacech/linear-gragh-explorer/blob/main/src/auth.ts): `src/auth.ts`

### Live Sync

- [Sync Orchestrator](https://github.com/horacech/linear-gragh-explorer/blob/main/src/api.ts): `src/api.ts`
- [Team Validation](https://github.com/horacech/linear-gragh-explorer/blob/main/src/api.ts): `src/api.ts`
- [Project & Issue Fetch](https://github.com/horacech/linear-gragh-explorer/blob/main/src/api.ts): `src/api.ts`
- [Milestone Fetch](https://github.com/horacech/linear-gragh-explorer/blob/main/src/api.ts): `src/api.ts`
- [Relation Fetch](https://github.com/horacech/linear-gragh-explorer/blob/main/src/api.ts): `src/api.ts`
- [GraphQL Transport](https://github.com/horacech/linear-gragh-explorer/blob/main/src/api.ts): `src/api.ts`
- [Pagination](https://github.com/horacech/linear-gragh-explorer/blob/main/src/api.ts): `src/api.ts`

### Graph Domain

- [Graph Normalize](https://github.com/horacech/linear-gragh-explorer/blob/main/src/model.ts): `src/model.ts`
- [Graph Analysis](https://github.com/horacech/linear-gragh-explorer/blob/main/src/model.ts): `src/model.ts`
- [Neighborhood Expansion](https://github.com/horacech/linear-gragh-explorer/blob/main/src/model.ts): `src/model.ts`
- [Synthetic Graph](https://github.com/horacech/linear-gragh-explorer/blob/main/src/demo.ts): `src/demo.ts`

### Explorer UI

- [Explorer App](https://github.com/horacech/linear-gragh-explorer/blob/main/src/main.tsx): `src/main.tsx`
- [Graph Views](https://github.com/horacech/linear-gragh-explorer/blob/main/src/main.tsx): `src/main.tsx`
- [Filters & Layout](https://github.com/horacech/linear-gragh-explorer/blob/main/src/main.tsx): `src/main.tsx`
- [Diagnostics & Details](https://github.com/horacech/linear-gragh-explorer/blob/main/src/main.tsx): `src/main.tsx`
- [Connection Settings](https://github.com/horacech/linear-gragh-explorer/blob/main/src/main.tsx): `src/main.tsx`

### Other components

- **User**
- **Linear API**
- **OAuth Service**

## Connections

- User → Explorer App: uses (evidence: `README.md`)
- Explorer App → PKCE Auth: finishes login (evidence: `src/main.tsx`)
- PKCE Auth → OAuth Service: exchanges tokens (evidence: `src/auth.ts`)
- PKCE Auth → OAuth Service: redirects for consent (evidence: `src/auth.ts`)
- Explorer App → Sync Orchestrator: starts sync (evidence: `src/main.tsx`)
- Sync Orchestrator → Team Validation: validates team (evidence: `src/api.ts`)
- Sync Orchestrator → Project & Issue Fetch: loads records (evidence: `src/api.ts`)
- Sync Orchestrator → Milestone Fetch: loads milestones (evidence: `src/api.ts`)
- Sync Orchestrator → Relation Fetch: loads relations (evidence: `src/api.ts`)
- Team Validation → GraphQL Transport: queries through (evidence: `src/api.ts`)
- Project & Issue Fetch → GraphQL Transport: queries through (evidence: `src/api.ts`)
- Milestone Fetch → GraphQL Transport: queries through (evidence: `src/api.ts`)
- Relation Fetch → GraphQL Transport: queries through (evidence: `src/api.ts`)
- Project & Issue Fetch → Pagination: loads pages (evidence: `src/api.ts`)
- Milestone Fetch → Pagination: loads pages (evidence: `src/api.ts`)
- Relation Fetch → Pagination: loads pages (evidence: `src/api.ts`)
- GraphQL Transport → PKCE Auth: gets access token (evidence: `src/api.ts`)
- GraphQL Transport → Linear API: sends GraphQL (evidence: `src/api.ts`)
- Sync Orchestrator → Graph Normalize: normalizes snapshot (evidence: `src/api.ts`)
- Explorer App → Synthetic Graph: loads demo (evidence: `src/main.tsx`)
