# gopro/opengopro architecture

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

- Interactive diagram: https://gitdiagram.com/gopro/opengopro
- Repository: https://github.com/gopro/opengopro

## Overview

Open GoPro is a developer repository for camera API specifications, runnable demos, and supporting utilities—not a single end-user application. The main internal workflow shown in the sampled implementation is a command-line tool that reads TOML scope rules, parses generated Kotlin declarations, and rewrites their visibility. The repository also includes protobuf specifications for camera features and demos across several languages and frameworks. Those are documented as independent content areas; their runtime interactions are not established by the sampled files. The graph reflects that evidence limit rather than connecting them speculatively.

Main entry points: [`tools/proto_build/kmp_proto_manipulator/kmp_proto_manipulator/parsers/kotlin_transformer.py`](https://github.com/gopro/opengopro/blob/main/tools/proto_build/kmp_proto_manipulator/kmp_proto_manipulator/parsers/kotlin_transformer.py) (Kotlin transformer), [`tools/proto_build/kmp_proto_manipulator/kmp_proto_manipulator/scripts/set_kotlin_proto_scopes.py`](https://github.com/gopro/opengopro/blob/main/tools/proto_build/kmp_proto_manipulator/kmp_proto_manipulator/scripts/set_kotlin_proto_scopes.py) (Scope CLI), [`tools/proto_build/kmp_proto_manipulator/kmp_proto_manipulator/parsers/config.py`](https://github.com/gopro/opengopro/blob/main/tools/proto_build/kmp_proto_manipulator/kmp_proto_manipulator/parsers/config.py) (TOML parser), [`tools/proto_build/kmp_proto_manipulator/kmp_proto_manipulator/entities/config.py`](https://github.com/gopro/opengopro/blob/main/tools/proto_build/kmp_proto_manipulator/kmp_proto_manipulator/entities/config.py) (Scope config)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_specs["Camera specifications"]
  node_protobuf["Protobuf schemas"]
end

subgraph group_manipulator["Kotlin manipulator"]
  node_cli["Scope CLI"]
  node_config_parser["TOML parser<br/>[config.py]"]
  node_config_model["Scope config<br/>[config.py]"]
  node_transformer["Kotlin transformer"]
  node_kotlin_grammar["Kotlin grammar<br/>[kotlin_proto.py]"]
end

subgraph group_examples["Runnable demos"]
  node_demo_collection["Language demos"]
end

node_developer(("Developer"))

node_cli -->|"parses rules"| node_config_parser
node_cli -->|"transforms files"| node_transformer
node_config_parser -->|"creates config"| node_config_model
node_transformer -->|"uses rules"| node_config_model
node_transformer -->|"parses declarations"| node_kotlin_grammar

click node_protobuf "https://github.com/gopro/opengopro/tree/main/protobuf"
click node_demo_collection "https://github.com/gopro/opengopro/tree/main/demos"
click node_cli "https://github.com/gopro/opengopro/blob/main/tools/proto_build/kmp_proto_manipulator/kmp_proto_manipulator/scripts/set_kotlin_proto_scopes.py"
click node_config_parser "https://github.com/gopro/opengopro/blob/main/tools/proto_build/kmp_proto_manipulator/kmp_proto_manipulator/parsers/config.py"
click node_config_model "https://github.com/gopro/opengopro/blob/main/tools/proto_build/kmp_proto_manipulator/kmp_proto_manipulator/entities/config.py"
click node_transformer "https://github.com/gopro/opengopro/blob/main/tools/proto_build/kmp_proto_manipulator/kmp_proto_manipulator/parsers/kotlin_transformer.py"
click node_kotlin_grammar "https://github.com/gopro/opengopro/blob/main/tools/proto_build/kmp_proto_manipulator/kmp_proto_manipulator/grammar/kotlin_proto.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_protobuf toneBlue
class node_cli,node_config_parser,node_config_model,node_transformer,node_kotlin_grammar toneAmber
class node_demo_collection toneMint
class node_developer toneIndigo
```

## Components

### Camera specifications

- [Protobuf schemas](https://github.com/gopro/opengopro/tree/main/protobuf): `protobuf`

### Kotlin manipulator

- [Scope CLI](https://github.com/gopro/opengopro/blob/main/tools/proto_build/kmp_proto_manipulator/kmp_proto_manipulator/scripts/set_kotlin_proto_scopes.py): `tools/proto_build/kmp_proto_manipulator/kmp_proto_manipulator/scripts/set_kotlin_proto_scopes.py`
- [TOML parser](https://github.com/gopro/opengopro/blob/main/tools/proto_build/kmp_proto_manipulator/kmp_proto_manipulator/parsers/config.py): `tools/proto_build/kmp_proto_manipulator/kmp_proto_manipulator/parsers/config.py`
- [Scope config](https://github.com/gopro/opengopro/blob/main/tools/proto_build/kmp_proto_manipulator/kmp_proto_manipulator/entities/config.py): `tools/proto_build/kmp_proto_manipulator/kmp_proto_manipulator/entities/config.py`
- [Kotlin transformer](https://github.com/gopro/opengopro/blob/main/tools/proto_build/kmp_proto_manipulator/kmp_proto_manipulator/parsers/kotlin_transformer.py): `tools/proto_build/kmp_proto_manipulator/kmp_proto_manipulator/parsers/kotlin_transformer.py`
- [Kotlin grammar](https://github.com/gopro/opengopro/blob/main/tools/proto_build/kmp_proto_manipulator/kmp_proto_manipulator/grammar/kotlin_proto.py): `tools/proto_build/kmp_proto_manipulator/kmp_proto_manipulator/grammar/kotlin_proto.py`

### Runnable demos

- [Language demos](https://github.com/gopro/opengopro/tree/main/demos): `demos`

### Other components

- **Developer**

## Connections

- Scope CLI → TOML parser: parses rules (evidence: `tools/proto_build/kmp_proto_manipulator/kmp_proto_manipulator/scripts/set_kotlin_proto_scopes.py`)
- Scope CLI → Kotlin transformer: transforms files (evidence: `tools/proto_build/kmp_proto_manipulator/kmp_proto_manipulator/scripts/set_kotlin_proto_scopes.py`)
- TOML parser → Scope config: creates config (evidence: `tools/proto_build/kmp_proto_manipulator/kmp_proto_manipulator/parsers/config.py`)
- Kotlin transformer → Scope config: uses rules (evidence: `tools/proto_build/kmp_proto_manipulator/kmp_proto_manipulator/parsers/kotlin_transformer.py`)
- Kotlin transformer → Kotlin grammar: parses declarations (evidence: `tools/proto_build/kmp_proto_manipulator/kmp_proto_manipulator/parsers/kotlin_transformer.py`)
