# looker-open-source/sdk-codegen architecture

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

- Interactive diagram: https://gitdiagram.com/looker-open-source/sdk-codegen
- Repository: https://github.com/looker-open-source/sdk-codegen

## Overview

This repository combines a generator for Looker API client SDKs with the generated SDKs, API Explorer, and RunIt REST client tester. The primary workflow is configuring a Looker server, obtaining and converting its API specification, validating it, then generating language bindings. Separately, API Explorer presents API references and differences, while RunIt lets users try REST calls. SDK runtime modules handle settings, authentication, and transport; the sampled TypeScript runtime shows browser service construction and transport responsibilities. Several branches are documented in the README but their implementation details were not sampled, so those links cite the README.

Main entry points: [`packages/sdk-codegen/src/codeGen.ts`](https://github.com/looker-open-source/sdk-codegen/blob/main/packages/sdk-codegen/src/codeGen.ts) (Code generator), [`packages/api-explorer/src/routes/AppRouter.tsx`](https://github.com/looker-open-source/sdk-codegen/blob/main/packages/api-explorer/src/routes/AppRouter.tsx) (Explorer routes), [`packages/sdk-rtl/src/transport.ts`](https://github.com/looker-open-source/sdk-codegen/blob/main/packages/sdk-rtl/src/transport.ts) (HTTP transport), [`packages/api-explorer/src/ApiExplorer.tsx`](https://github.com/looker-open-source/sdk-codegen/blob/main/packages/api-explorer/src/ApiExplorer.tsx) (Explorer app)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_generation["SDK generation"]
  node_spec["API specification"]
  node_generator["Code generator<br/>[codeGen.ts]"]
  node_spec_conversion["Spec conversion<br/>[convert.apispec.ts]"]
  node_resource_index["Resource index<br/>[resources.ts]"]
end

subgraph group_clients["SDK clients"]
  node_typescript_sdk["TypeScript SDK<br/>[funcs.ts]"]
  node_python_sdk["Python SDK<br/>[auth_session.py]"]
  node_csharp_sdk["C&#35; SDK<br/>[methods.cs]"]
  node_go_sdk["Go SDK<br/>[methods.go]"]
end

subgraph group_explorer["API Explorer"]
  node_explorer_app["Explorer app<br/>[ApiExplorer.tsx]"]
  node_explorer_routes["Explorer routes<br/>[AppRouter.tsx]"]
  node_method_docs["Method reference<br/>[MethodScene.tsx]"]
  node_type_docs["Type reference<br/>[TypeScene.tsx]"]
  node_spec_diff["Spec differences<br/>[DiffScene.tsx]"]
  node_run_it["REST tester<br/>[RunIt.tsx]"]
end

subgraph group_runtime["SDK runtime"]
  node_settings["API settings<br/>[apiSettings.ts]"]
  node_auth_session["Auth session<br/>[auth_session.py]"]
  node_transport["HTTP transport<br/>[transport.ts]"]
  node_browser_services["Browser services<br/>[browserServices.ts]"]
  node_browser_transport["Browser transport"]
end

node_developer(("SDK developer"))
node_looker(("Looker server"))

node_developer -->|"runs generation"| node_generator
node_developer -->|"configures access"| node_looker
node_looker -->|"provides spec"| node_spec
node_spec -->|"converts format"| node_spec_conversion
node_spec_conversion -->|"supplies converted spec"| node_generator
node_generator -->|"generates bindings"| node_typescript_sdk
node_generator -->|"generates bindings"| node_python_sdk
node_generator -->|"generates bindings"| node_csharp_sdk
node_generator -->|"generates bindings"| node_go_sdk
node_explorer_app -.->|"uses routes"| node_explorer_routes
node_explorer_routes -->|"routes to"| node_method_docs
node_explorer_routes -->|"routes to"| node_type_docs
node_explorer_routes -->|"routes to"| node_spec_diff
node_explorer_app -->|"embeds tester"| node_run_it
node_settings -->|"configures"| node_transport
node_browser_services -->|"uses settings"| node_settings
node_browser_services -->|"constructs transport"| node_browser_transport
node_browser_transport -.->|"implements contract"| node_transport
node_auth_session -->|"uses transport"| node_transport

click node_generator "https://github.com/looker-open-source/sdk-codegen/blob/main/packages/sdk-codegen/src/codeGen.ts"
click node_spec_conversion "https://github.com/looker-open-source/sdk-codegen/blob/main/packages/sdk-codegen-scripts/src/convert.apispec.ts"
click node_resource_index "https://github.com/looker-open-source/sdk-codegen/blob/main/bin/looker-resources-index/src/resource-data/resources.ts"
click node_typescript_sdk "https://github.com/looker-open-source/sdk-codegen/blob/main/packages/sdk/src/4.0/funcs.ts"
click node_python_sdk "https://github.com/looker-open-source/sdk-codegen/blob/main/python/looker_sdk/rtl/auth_session.py"
click node_csharp_sdk "https://github.com/looker-open-source/sdk-codegen/blob/main/csharp/sdk/4.0/methods.cs"
click node_go_sdk "https://github.com/looker-open-source/sdk-codegen/blob/main/go/sdk/v4/methods.go"
click node_explorer_app "https://github.com/looker-open-source/sdk-codegen/blob/main/packages/api-explorer/src/ApiExplorer.tsx"
click node_explorer_routes "https://github.com/looker-open-source/sdk-codegen/blob/main/packages/api-explorer/src/routes/AppRouter.tsx"
click node_method_docs "https://github.com/looker-open-source/sdk-codegen/blob/main/packages/api-explorer/src/scenes/MethodScene/MethodScene.tsx"
click node_type_docs "https://github.com/looker-open-source/sdk-codegen/blob/main/packages/api-explorer/src/scenes/TypeScene/TypeScene.tsx"
click node_spec_diff "https://github.com/looker-open-source/sdk-codegen/blob/main/packages/api-explorer/src/scenes/DiffScene/DiffScene.tsx"
click node_run_it "https://github.com/looker-open-source/sdk-codegen/blob/main/packages/run-it/src/RunIt.tsx"
click node_settings "https://github.com/looker-open-source/sdk-codegen/blob/main/packages/sdk-rtl/src/apiSettings.ts"
click node_auth_session "https://github.com/looker-open-source/sdk-codegen/blob/main/python/looker_sdk/rtl/auth_session.py"
click node_transport "https://github.com/looker-open-source/sdk-codegen/blob/main/packages/sdk-rtl/src/transport.ts"
click node_browser_services "https://github.com/looker-open-source/sdk-codegen/blob/main/packages/sdk-rtl/src/browserServices.ts"
click node_browser_transport "https://github.com/looker-open-source/sdk-codegen/blob/main/packages/sdk-rtl/src/browserTransport.ts"

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_spec,node_generator,node_spec_conversion,node_resource_index toneBlue
class node_typescript_sdk,node_python_sdk,node_csharp_sdk,node_go_sdk toneAmber
class node_explorer_app,node_explorer_routes,node_method_docs,node_type_docs,node_spec_diff,node_run_it,node_looker toneMint
class node_settings,node_auth_session,node_transport,node_browser_services,node_browser_transport toneRose
class node_developer toneIndigo
```

## Components

### SDK generation

- **API specification**
- [Code generator](https://github.com/looker-open-source/sdk-codegen/blob/main/packages/sdk-codegen/src/codeGen.ts): `packages/sdk-codegen/src/codeGen.ts`
- [Spec conversion](https://github.com/looker-open-source/sdk-codegen/blob/main/packages/sdk-codegen-scripts/src/convert.apispec.ts): `packages/sdk-codegen-scripts/src/convert.apispec.ts`
- [Resource index](https://github.com/looker-open-source/sdk-codegen/blob/main/bin/looker-resources-index/src/resource-data/resources.ts): `bin/looker-resources-index/src/resource-data/resources.ts`

### SDK clients

- [TypeScript SDK](https://github.com/looker-open-source/sdk-codegen/blob/main/packages/sdk/src/4.0/funcs.ts): `packages/sdk/src/4.0/funcs.ts`
- [Python SDK](https://github.com/looker-open-source/sdk-codegen/blob/main/python/looker_sdk/rtl/auth_session.py): `python/looker_sdk/rtl/auth_session.py`
- [C# SDK](https://github.com/looker-open-source/sdk-codegen/blob/main/csharp/sdk/4.0/methods.cs): `csharp/sdk/4.0/methods.cs`
- [Go SDK](https://github.com/looker-open-source/sdk-codegen/blob/main/go/sdk/v4/methods.go): `go/sdk/v4/methods.go`

### API Explorer

- [Explorer app](https://github.com/looker-open-source/sdk-codegen/blob/main/packages/api-explorer/src/ApiExplorer.tsx): `packages/api-explorer/src/ApiExplorer.tsx`
- [Explorer routes](https://github.com/looker-open-source/sdk-codegen/blob/main/packages/api-explorer/src/routes/AppRouter.tsx): `packages/api-explorer/src/routes/AppRouter.tsx`
- [Method reference](https://github.com/looker-open-source/sdk-codegen/blob/main/packages/api-explorer/src/scenes/MethodScene/MethodScene.tsx): `packages/api-explorer/src/scenes/MethodScene/MethodScene.tsx`
- [Type reference](https://github.com/looker-open-source/sdk-codegen/blob/main/packages/api-explorer/src/scenes/TypeScene/TypeScene.tsx): `packages/api-explorer/src/scenes/TypeScene/TypeScene.tsx`
- [Spec differences](https://github.com/looker-open-source/sdk-codegen/blob/main/packages/api-explorer/src/scenes/DiffScene/DiffScene.tsx): `packages/api-explorer/src/scenes/DiffScene/DiffScene.tsx`
- [REST tester](https://github.com/looker-open-source/sdk-codegen/blob/main/packages/run-it/src/RunIt.tsx): `packages/run-it/src/RunIt.tsx`

### SDK runtime

- [API settings](https://github.com/looker-open-source/sdk-codegen/blob/main/packages/sdk-rtl/src/apiSettings.ts): `packages/sdk-rtl/src/apiSettings.ts`
- [Auth session](https://github.com/looker-open-source/sdk-codegen/blob/main/python/looker_sdk/rtl/auth_session.py): `python/looker_sdk/rtl/auth_session.py`
- [HTTP transport](https://github.com/looker-open-source/sdk-codegen/blob/main/packages/sdk-rtl/src/transport.ts): `packages/sdk-rtl/src/transport.ts`
- [Browser services](https://github.com/looker-open-source/sdk-codegen/blob/main/packages/sdk-rtl/src/browserServices.ts): `packages/sdk-rtl/src/browserServices.ts`
- [Browser transport](https://github.com/looker-open-source/sdk-codegen/blob/main/packages/sdk-rtl/src/browserTransport.ts): `packages/sdk-rtl/src/browserTransport.ts`

### Other components

- **SDK developer**
- **Looker server**

## Connections

- SDK developer → Code generator: runs generation
- SDK developer → Looker server: configures access
- Looker server → API specification: provides spec
- API specification → Spec conversion: converts format
- Spec conversion → Code generator: supplies converted spec
- Code generator → TypeScript SDK: generates bindings
- Code generator → Python SDK: generates bindings
- Code generator → C# SDK: generates bindings
- Code generator → Go SDK: generates bindings
- Explorer app → Explorer routes: uses routes
- Explorer routes → Method reference: routes to (evidence: `packages/api-explorer/src/routes/AppRouter.tsx`)
- Explorer routes → Type reference: routes to (evidence: `packages/api-explorer/src/routes/AppRouter.tsx`)
- Explorer routes → Spec differences: routes to (evidence: `packages/api-explorer/src/routes/AppRouter.tsx`)
- Explorer app → REST tester: embeds tester
- API settings → HTTP transport: configures (evidence: `packages/sdk-rtl/src/apiSettings.ts`)
- Browser services → API settings: uses settings (evidence: `packages/sdk-rtl/src/browserServices.ts`)
- Browser services → Browser transport: constructs transport (evidence: `packages/sdk-rtl/src/browserServices.ts`)
- Browser transport → HTTP transport: implements contract
- Auth session → HTTP transport: uses transport (evidence: `python/looker_sdk/rtl/auth_session.py`)
