# droidchief/lense_bridge architecture

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

- Interactive diagram: https://gitdiagram.com/droidchief/lense_bridge
- Repository: https://github.com/droidchief/lense_bridge

## Overview

This is a Flutter mobile app whose apparent purpose is to bridge camera views and overlays to native Android and iOS code. The README is only Flutter boilerplate, so the product workflow is inferred from the camera- and overlay-named files in the tree. Most implementation excerpts are empty or absent; links between those components are therefore limited to likely app entry and platform-view relationships, not asserted native call chains.

Main entry points: [`lib/main.dart`](https://github.com/droidchief/lense_bridge/blob/main/lib/main.dart) (Flutter entry), [`lib/camera_view.dart`](https://github.com/droidchief/lense_bridge/blob/main/lib/camera_view.dart) (Camera view), [`lib/camera_controller.dart`](https://github.com/droidchief/lense_bridge/blob/main/lib/camera_controller.dart) (Dart controller)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_flutter["Flutter app"]
  node_app["Flutter entry<br/>[main.dart]"]
  node_camera_view["Camera view<br/>[camera_view.dart]"]
  node_camera_controller["Dart controller"]
  node_camera_state["Camera state<br/>[camera_state.dart]"]
end

subgraph group_android["Android camera"]
  node_android_entry["Android entry<br/>[MainActivity.kt]"]
  node_android_factory["View factory"]
  node_android_view["Platform view"]
  node_android_camera["Native controller"]
  node_android_overlay["Overlay renderer<br/>[OverlayRenderer.kt]"]
  node_android_overlay_view["Overlay view<br/>[OverlayView.kt]"]
end

subgraph group_ios["iOS camera"]
  node_ios_entry["iOS entry<br/>[AppDelegate.swift]"]
  node_ios_factory["View factory"]
  node_ios_view["Platform view"]
  node_ios_camera["Native controller"]
  node_ios_overlay["Overlay renderer"]
end

node_user(("App user"))
node_camera_hardware["Device camera"]

node_user -->|"opens"| node_app
node_app -->|"shows"| node_camera_view
node_camera_view -->|"uses"| node_camera_controller

click node_app "https://github.com/droidchief/lense_bridge/blob/main/lib/main.dart"
click node_camera_view "https://github.com/droidchief/lense_bridge/blob/main/lib/camera_view.dart"
click node_camera_controller "https://github.com/droidchief/lense_bridge/blob/main/lib/camera_controller.dart"
click node_camera_state "https://github.com/droidchief/lense_bridge/blob/main/lib/models/camera_state.dart"
click node_android_entry "https://github.com/droidchief/lense_bridge/blob/main/android/app/src/main/kotlin/com/example/lens_bridge/MainActivity.kt"
click node_android_factory "https://github.com/droidchief/lense_bridge/blob/main/android/app/src/main/kotlin/com/example/lens_bridge/CameraPlatformViewFactory.kt"
click node_android_view "https://github.com/droidchief/lense_bridge/blob/main/android/app/src/main/kotlin/com/example/lens_bridge/CameraPlatformView.kt"
click node_android_camera "https://github.com/droidchief/lense_bridge/blob/main/android/app/src/main/kotlin/com/example/lens_bridge/CameraController.kt"
click node_android_overlay "https://github.com/droidchief/lense_bridge/blob/main/android/app/src/main/kotlin/com/example/lens_bridge/OverlayRenderer.kt"
click node_android_overlay_view "https://github.com/droidchief/lense_bridge/blob/main/android/app/src/main/kotlin/com/example/lens_bridge/OverlayView.kt"
click node_ios_entry "https://github.com/droidchief/lense_bridge/blob/main/ios/Runner/AppDelegate.swift"
click node_ios_factory "https://github.com/droidchief/lense_bridge/blob/main/ios/Runner/CameraPlatformViewFactory.swift"
click node_ios_view "https://github.com/droidchief/lense_bridge/blob/main/ios/Runner/CameraPlatformView.swift"
click node_ios_camera "https://github.com/droidchief/lense_bridge/blob/main/ios/Runner/CameraController.swift"
click node_ios_overlay "https://github.com/droidchief/lense_bridge/blob/main/ios/Runner/OverlayRenderer.swift"

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_app,node_camera_view,node_camera_controller,node_camera_state,node_user toneBlue
class node_android_entry,node_android_factory,node_android_view,node_android_camera,node_android_overlay,node_android_overlay_view toneAmber
class node_ios_entry,node_ios_factory,node_ios_view,node_ios_camera,node_ios_overlay toneMint
class node_camera_hardware toneIndigo
```

## Components

### Flutter app

- [Flutter entry](https://github.com/droidchief/lense_bridge/blob/main/lib/main.dart): `lib/main.dart`
- [Camera view](https://github.com/droidchief/lense_bridge/blob/main/lib/camera_view.dart): `lib/camera_view.dart`
- [Dart controller](https://github.com/droidchief/lense_bridge/blob/main/lib/camera_controller.dart): `lib/camera_controller.dart`
- [Camera state](https://github.com/droidchief/lense_bridge/blob/main/lib/models/camera_state.dart): `lib/models/camera_state.dart`

### Android camera

- [Android entry](https://github.com/droidchief/lense_bridge/blob/main/android/app/src/main/kotlin/com/example/lens_bridge/MainActivity.kt): `android/app/src/main/kotlin/com/example/lens_bridge/MainActivity.kt`
- [View factory](https://github.com/droidchief/lense_bridge/blob/main/android/app/src/main/kotlin/com/example/lens_bridge/CameraPlatformViewFactory.kt): `android/app/src/main/kotlin/com/example/lens_bridge/CameraPlatformViewFactory.kt`
- [Platform view](https://github.com/droidchief/lense_bridge/blob/main/android/app/src/main/kotlin/com/example/lens_bridge/CameraPlatformView.kt): `android/app/src/main/kotlin/com/example/lens_bridge/CameraPlatformView.kt`
- [Native controller](https://github.com/droidchief/lense_bridge/blob/main/android/app/src/main/kotlin/com/example/lens_bridge/CameraController.kt): `android/app/src/main/kotlin/com/example/lens_bridge/CameraController.kt`
- [Overlay renderer](https://github.com/droidchief/lense_bridge/blob/main/android/app/src/main/kotlin/com/example/lens_bridge/OverlayRenderer.kt): `android/app/src/main/kotlin/com/example/lens_bridge/OverlayRenderer.kt`
- [Overlay view](https://github.com/droidchief/lense_bridge/blob/main/android/app/src/main/kotlin/com/example/lens_bridge/OverlayView.kt): `android/app/src/main/kotlin/com/example/lens_bridge/OverlayView.kt`

### iOS camera

- [iOS entry](https://github.com/droidchief/lense_bridge/blob/main/ios/Runner/AppDelegate.swift): `ios/Runner/AppDelegate.swift`
- [View factory](https://github.com/droidchief/lense_bridge/blob/main/ios/Runner/CameraPlatformViewFactory.swift): `ios/Runner/CameraPlatformViewFactory.swift`
- [Platform view](https://github.com/droidchief/lense_bridge/blob/main/ios/Runner/CameraPlatformView.swift): `ios/Runner/CameraPlatformView.swift`
- [Native controller](https://github.com/droidchief/lense_bridge/blob/main/ios/Runner/CameraController.swift): `ios/Runner/CameraController.swift`
- [Overlay renderer](https://github.com/droidchief/lense_bridge/blob/main/ios/Runner/OverlayRenderer.swift): `ios/Runner/OverlayRenderer.swift`

### Other components

- **App user**
- **Device camera**

## Connections

- App user → Flutter entry: opens
- Flutter entry → Camera view: shows
- Camera view → Dart controller: uses
