# desktop/node-detect-arm64-translation architecture

> Architecture diagram of the GitHub repository desktop/node-detect-arm64-translation, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/desktop/node-detect-arm64-translation
- Repository: https://github.com/desktop/node-detect-arm64-translation

## Overview

This small Node.js library exposes a single ARM64-translation check. A consumer imports the public entry point, which re-exports a TypeScript wrapper; on Windows the wrapper calls the native addon, which checks the current process using Windows APIs and returns a boolean. On other platforms the wrapper returns undefined. The excerpts show these runtime relationships; no broader product subsystems are evident.

Main entry points: [`lib/index.ts`](https://github.com/desktop/node-detect-arm64-translation/blob/main/lib/index.ts) (Public entry), [`lib/detect-arm64-translation.ts`](https://github.com/desktop/node-detect-arm64-translation/blob/main/lib/detect-arm64-translation.ts) (Platform wrapper), [`src/main.cc`](https://github.com/desktop/node-detect-arm64-translation/blob/main/src/main.cc) (Native detector)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_consumer(("Library consumer"))
node_entry["Public entry<br/>[index.ts]"]
node_wrapper["Platform wrapper"]
node_native["Native detector<br/>[main.cc]"]
node_windows["Windows APIs"]

node_consumer -->|"imports"| node_entry
node_entry -->|"re-exports"| node_wrapper
node_wrapper -->|"loads and calls"| node_native
node_native -->|"queries process"| node_windows

click node_entry "https://github.com/desktop/node-detect-arm64-translation/blob/main/lib/index.ts"
click node_wrapper "https://github.com/desktop/node-detect-arm64-translation/blob/main/lib/detect-arm64-translation.ts"
click node_native "https://github.com/desktop/node-detect-arm64-translation/blob/main/src/main.cc"

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_consumer toneIndigo
class node_entry,node_wrapper,node_native toneTeal
class node_windows toneMint
```

## Components

### Other components

- **Library consumer**
- [Public entry](https://github.com/desktop/node-detect-arm64-translation/blob/main/lib/index.ts): `lib/index.ts`
- [Platform wrapper](https://github.com/desktop/node-detect-arm64-translation/blob/main/lib/detect-arm64-translation.ts): `lib/detect-arm64-translation.ts`
- [Native detector](https://github.com/desktop/node-detect-arm64-translation/blob/main/src/main.cc): `src/main.cc`
- **Windows APIs**

## Connections

- Library consumer → Public entry: imports (evidence: `README.md`)
- Public entry → Platform wrapper: re-exports (evidence: `lib/index.ts`)
- Platform wrapper → Native detector: loads and calls (evidence: `lib/detect-arm64-translation.ts`)
- Native detector → Windows APIs: queries process (evidence: `src/main.cc`)
