# justjake/fujimod architecture

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

- Interactive diagram: https://gitdiagram.com/justjake/fujimod
- Repository: https://github.com/justjake/fujimod

## Overview

FujiMod is an open-source camera-development toolkit: its browser application helps users select firmware, prepare a camera-specific mod, and run it in an emulator; the repository also provides USB access/sharing, camera mounting, emulator cores, and language bindings. The graph preserves these documented product branches. Relationships are limited to README statements and source-index references; unsampled implementation details are not inferred.

Main entry points: [`apps/web/src/home/controller.ts`](https://github.com/justjake/fujimod/blob/main/apps/web/src/home/controller.ts) (Firmware workflow), [`packages/emulator-ui/src/session/controller.ts`](https://github.com/justjake/fujimod/blob/main/packages/emulator-ui/src/session/controller.ts) (Emulator interface), [`apps/web/src/App.tsx`](https://github.com/justjake/fujimod/blob/main/apps/web/src/App.tsx) (Web application), [`crates/emulator-boot/src/application.rs`](https://github.com/justjake/fujimod/blob/main/crates/emulator-boot/src/application.rs) (Camera boot emulation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Browser application"]
  node_webapp["Web application<br/>[App.tsx]"]
  node_home["Firmware workflow<br/>[controller.ts]"]
  node_firmware[("Firmware library")]
  node_camera_state[("Camera records<br/>[store.ts]")]
  node_catalog["Firmware catalog<br/>[catalog.ts]"]
  node_patch_catalog["Patch releases<br/>[catalog.ts]"]
  node_patcher["Patch interpreter<br/>[patcher.ts]"]
  node_patch_download["Patch downloads<br/>[download.ts]"]
  node_release["Release metadata<br/>[release.ts]"]
end

subgraph group_emu["Emulation"]
  node_engine_adapter["Wasm runtime adapter<br/>[wasm-engine.ts]"]
  node_emulator_ui["Emulator interface<br/>[controller.ts]"]
  node_emulator_boot["Camera boot emulation<br/>[application.rs]"]
  node_emulator_storage[("Emulated storage<br/>[storage.rs]")]
end

subgraph group_camera["Camera access"]
  node_usb["USB protocol<br/>[lib.rs]"]
  node_sharing["USB sharing<br/>[pipeline.rs]"]
  node_mount["Camera mount tool<br/>[main.rs]"]
end

subgraph group_bindings["Language interfaces"]
  node_js_binding["JavaScript binding<br/>[lib.rs]"]
  node_python_binding["Python package<br/>[__init__.py]"]
  node_catalog_crate["Rust catalog<br/>[lib.rs]"]
  node_emulator_crate["Rust emulator<br/>[workers_tests.rs]"]
  node_python_emulator["Python emulator<br/>[lib.rs]"]
end

node_user(("Camera developer"))

node_user -->|"opens"| node_webapp
node_webapp -.->|"routes to"| node_home
node_home -->|"loads"| node_firmware
node_home -->|"creates camera"| node_camera_state
node_home -->|"uses catalog"| node_catalog
node_home -->|"selects release"| node_patch_catalog
node_home -->|"patches firmware"| node_patcher
node_home -->|"downloads patch"| node_patch_download
node_home -->|"loads release"| node_release
node_home -.->|"runs emulator"| node_emulator_ui
node_engine_adapter -->|"implements engine"| node_emulator_ui
node_emulator_ui -.->|"boots camera"| node_emulator_boot
node_emulator_boot -.->|"uses device models"| node_emulator_storage
node_user -->|"accesses camera"| node_usb
node_usb -->|"supports sharing"| node_sharing
node_user -.->|"mounts camera"| node_mount
node_user -->|"uses APIs"| node_js_binding
node_user -->|"uses APIs"| node_python_binding
node_python_binding -->|"exposes emulator"| node_python_emulator
node_user -->|"loads firmware data"| node_catalog_crate
node_user -->|"runs emulator"| node_emulator_crate

click node_webapp "https://github.com/justjake/fujimod/blob/main/apps/web/src/App.tsx"
click node_home "https://github.com/justjake/fujimod/blob/main/apps/web/src/home/controller.ts"
click node_firmware "https://github.com/justjake/fujimod/blob/main/apps/web/src/cameras/firmware-library.ts"
click node_camera_state "https://github.com/justjake/fujimod/blob/main/apps/web/src/cameras/store.ts"
click node_catalog "https://github.com/justjake/fujimod/blob/main/apps/web/src/catalog.ts"
click node_patch_catalog "https://github.com/justjake/fujimod/blob/main/apps/web/src/patch/catalog.ts"
click node_patcher "https://github.com/justjake/fujimod/blob/main/apps/web/src/patch/patcher.ts"
click node_patch_download "https://github.com/justjake/fujimod/blob/main/apps/web/src/patch/download.ts"
click node_release "https://github.com/justjake/fujimod/blob/main/apps/web/src/patch/release.ts"
click node_engine_adapter "https://github.com/justjake/fujimod/blob/main/apps/web/src/engine/wasm-engine.ts"
click node_emulator_ui "https://github.com/justjake/fujimod/blob/main/packages/emulator-ui/src/session/controller.ts"
click node_emulator_boot "https://github.com/justjake/fujimod/blob/main/crates/emulator-boot/src/application.rs"
click node_emulator_storage "https://github.com/justjake/fujimod/blob/main/crates/emulator-xp4-storage/src/storage.rs"
click node_usb "https://github.com/justjake/fujimod/blob/main/crates/usb/src/lib.rs"
click node_sharing "https://github.com/justjake/fujimod/blob/main/crates/usb-proxy/src/pipeline.rs"
click node_mount "https://github.com/justjake/fujimod/blob/main/crates/camera-mount/src/main.rs"
click node_js_binding "https://github.com/justjake/fujimod/blob/main/bindings/javascript/src/lib.rs"
click node_python_binding "https://github.com/justjake/fujimod/blob/main/bindings/python/python/fujimod/__init__.py"
click node_catalog_crate "https://github.com/justjake/fujimod/blob/main/crates/catalog/src/lib.rs"
click node_emulator_crate "https://github.com/justjake/fujimod/blob/main/crates/emulator/src/board/workers_tests.rs"
click node_python_emulator "https://github.com/justjake/fujimod/blob/main/bindings/python/emulator/src/lib.rs"

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_webapp,node_home,node_firmware,node_camera_state,node_catalog,node_patch_catalog,node_patcher,node_patch_download,node_release toneBlue
class node_engine_adapter,node_emulator_ui,node_emulator_boot,node_emulator_storage toneAmber
class node_usb,node_sharing,node_mount toneMint
class node_js_binding,node_python_binding,node_catalog_crate,node_emulator_crate,node_python_emulator toneRose
class node_user toneIndigo
```

## Components

### Browser application

- [Web application](https://github.com/justjake/fujimod/blob/main/apps/web/src/App.tsx): `apps/web/src/App.tsx`
- [Firmware workflow](https://github.com/justjake/fujimod/blob/main/apps/web/src/home/controller.ts): `apps/web/src/home/controller.ts`
- [Firmware library](https://github.com/justjake/fujimod/blob/main/apps/web/src/cameras/firmware-library.ts): `apps/web/src/cameras/firmware-library.ts`
- [Camera records](https://github.com/justjake/fujimod/blob/main/apps/web/src/cameras/store.ts): `apps/web/src/cameras/store.ts`
- [Firmware catalog](https://github.com/justjake/fujimod/blob/main/apps/web/src/catalog.ts): `apps/web/src/catalog.ts`
- [Patch releases](https://github.com/justjake/fujimod/blob/main/apps/web/src/patch/catalog.ts): `apps/web/src/patch/catalog.ts`
- [Patch interpreter](https://github.com/justjake/fujimod/blob/main/apps/web/src/patch/patcher.ts): `apps/web/src/patch/patcher.ts`
- [Patch downloads](https://github.com/justjake/fujimod/blob/main/apps/web/src/patch/download.ts): `apps/web/src/patch/download.ts`
- [Release metadata](https://github.com/justjake/fujimod/blob/main/apps/web/src/patch/release.ts): `apps/web/src/patch/release.ts`

### Emulation

- [Wasm runtime adapter](https://github.com/justjake/fujimod/blob/main/apps/web/src/engine/wasm-engine.ts): `apps/web/src/engine/wasm-engine.ts`
- [Emulator interface](https://github.com/justjake/fujimod/blob/main/packages/emulator-ui/src/session/controller.ts): `packages/emulator-ui/src/session/controller.ts`
- [Camera boot emulation](https://github.com/justjake/fujimod/blob/main/crates/emulator-boot/src/application.rs): `crates/emulator-boot/src/application.rs`
- [Emulated storage](https://github.com/justjake/fujimod/blob/main/crates/emulator-xp4-storage/src/storage.rs): `crates/emulator-xp4-storage/src/storage.rs`

### Camera access

- [USB protocol](https://github.com/justjake/fujimod/blob/main/crates/usb/src/lib.rs): `crates/usb/src/lib.rs`
- [USB sharing](https://github.com/justjake/fujimod/blob/main/crates/usb-proxy/src/pipeline.rs): `crates/usb-proxy/src/pipeline.rs`
- [Camera mount tool](https://github.com/justjake/fujimod/blob/main/crates/camera-mount/src/main.rs): `crates/camera-mount/src/main.rs`

### Language interfaces

- [JavaScript binding](https://github.com/justjake/fujimod/blob/main/bindings/javascript/src/lib.rs): `bindings/javascript/src/lib.rs`
- [Python package](https://github.com/justjake/fujimod/blob/main/bindings/python/python/fujimod/__init__.py): `bindings/python/python/fujimod/__init__.py`
- [Rust catalog](https://github.com/justjake/fujimod/blob/main/crates/catalog/src/lib.rs): `crates/catalog/src/lib.rs`
- [Rust emulator](https://github.com/justjake/fujimod/blob/main/crates/emulator/src/board/workers_tests.rs): `crates/emulator/src/board/workers_tests.rs`
- [Python emulator](https://github.com/justjake/fujimod/blob/main/bindings/python/emulator/src/lib.rs): `bindings/python/emulator/src/lib.rs`

### Other components

- **Camera developer**

## Connections

- Camera developer → Web application: opens (evidence: `README.md`)
- Web application → Firmware workflow: routes to
- Firmware workflow → Firmware library: loads (evidence: `apps/web/src/home/controller.ts`)
- Firmware workflow → Camera records: creates camera (evidence: `apps/web/src/home/controller.ts`)
- Firmware workflow → Firmware catalog: uses catalog (evidence: `apps/web/src/home/controller.ts`)
- Firmware workflow → Patch releases: selects release (evidence: `apps/web/src/home/controller.ts`)
- Firmware workflow → Patch interpreter: patches firmware (evidence: `apps/web/src/home/controller.ts`)
- Firmware workflow → Patch downloads: downloads patch (evidence: `apps/web/src/home/controller.ts`)
- Firmware workflow → Release metadata: loads release (evidence: `apps/web/src/home/controller.ts`)
- Firmware workflow → Emulator interface: runs emulator
- Wasm runtime adapter → Emulator interface: implements engine (evidence: `apps/web/src/engine/wasm-engine.ts`)
- Emulator interface → Camera boot emulation: boots camera
- Camera boot emulation → Emulated storage: uses device models
- Camera developer → USB protocol: accesses camera (evidence: `README.md`)
- USB protocol → USB sharing: supports sharing (evidence: `README.md`)
- Camera developer → Camera mount tool: mounts camera
- Camera developer → JavaScript binding: uses APIs (evidence: `README.md`)
- Camera developer → Python package: uses APIs (evidence: `README.md`)
- Python package → Python emulator: exposes emulator (evidence: `README.md`)
- Camera developer → Rust catalog: loads firmware data (evidence: `README.md`)
- Camera developer → Rust emulator: runs emulator (evidence: `README.md`)
