# b00h0o/recaptcha-vm architecture

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

- Interactive diagram: https://gitdiagram.com/b00h0o/recaptcha-vm
- Repository: https://github.com/b00h0o/recaptcha-vm

## Overview

This repository runs Google’s reCAPTCHA BotGuard engine inside a jsdom sandbox to mint v3 tokens; its v2 path demonstrates the anchor and challenge setup but does not solve challenges. The main workflow fetches sitekey-specific anchor and engine artifacts, executes the engine in the sandbox, and makes real Google network requests; tokens can then be checked with siteverify. The v3 scripts are separate minter variants, not stages in a shared pipeline. Relationships for unsampled portions are limited to README documentation.

Main entry points: [`live-v3-single.mjs`](https://github.com/b00h0o/recaptcha-vm/blob/master/live-v3-single.mjs) (v3 single minter), [`fetch-anchor-generic.mjs`](https://github.com/b00h0o/recaptcha-vm/blob/master/fetch-anchor-generic.mjs) (Fetch anchor bundle), [`siteverify.mjs`](https://github.com/b00h0o/recaptcha-vm/blob/master/siteverify.mjs) (Verify token), [`live-v2-single.mjs`](https://github.com/b00h0o/recaptcha-vm/blob/master/live-v2-single.mjs) (v2 challenge flow)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_setup["Anchor setup"]
  node_anchor_fetch["Fetch anchor bundle"]
  node_anchor_bundle["Anchor artifacts"]
end

subgraph group_runtime["Token runtimes"]
  node_v3_single["v3 single minter<br/>[live-v3-single.mjs]"]
  node_v3_dump["v3 dump variant<br/>[live-v3-dump.mjs]"]
  node_v3_protocol["v3 protocol variant"]
  node_v3_transport["v3 transport variant"]
  node_v2_single["v2 challenge flow<br/>[live-v2-single.mjs]"]
end

subgraph group_verification["Token verification"]
  node_siteverify["Verify token<br/>[siteverify.mjs]"]
  node_token["reCAPTCHA token"]
end

node_operator(("Operator"))
node_google_recaptcha["Google reCAPTCHA"]
node_google_verify["Google siteverify"]

node_operator -->|"requests bundle"| node_anchor_fetch
node_anchor_fetch -->|"fetches artifacts"| node_google_recaptcha
node_anchor_fetch -->|"saves bundle"| node_anchor_bundle
node_operator -->|"runs minter"| node_v3_single
node_v3_single -->|"loads artifacts"| node_anchor_bundle
node_v3_single -->|"sends clr request"| node_google_recaptcha
node_v3_single -->|"mints token"| node_token
node_operator -->|"runs demo"| node_v2_single
node_v2_single -->|"loads artifacts"| node_anchor_bundle
node_operator -->|"submits token"| node_siteverify
node_siteverify -->|"posts verification"| node_google_verify
node_siteverify -->|"reads token"| node_token

click node_anchor_fetch "https://github.com/b00h0o/recaptcha-vm/blob/master/fetch-anchor-generic.mjs"
click node_v3_single "https://github.com/b00h0o/recaptcha-vm/blob/master/live-v3-single.mjs"
click node_v3_dump "https://github.com/b00h0o/recaptcha-vm/blob/master/live-v3-dump.mjs"
click node_v3_protocol "https://github.com/b00h0o/recaptcha-vm/blob/master/live-v3-protocol.mjs"
click node_v3_transport "https://github.com/b00h0o/recaptcha-vm/blob/master/live-v3-transport.mjs"
click node_v2_single "https://github.com/b00h0o/recaptcha-vm/blob/master/live-v2-single.mjs"
click node_siteverify "https://github.com/b00h0o/recaptcha-vm/blob/master/siteverify.mjs"

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_anchor_fetch,node_anchor_bundle toneBlue
class node_v3_single,node_v3_dump,node_v3_protocol,node_v3_transport,node_v2_single toneAmber
class node_siteverify,node_token toneMint
class node_operator,node_google_recaptcha,node_google_verify toneIndigo
```

## Components

### Anchor setup

- [Fetch anchor bundle](https://github.com/b00h0o/recaptcha-vm/blob/master/fetch-anchor-generic.mjs): `fetch-anchor-generic.mjs`
- **Anchor artifacts**

### Token runtimes

- [v3 single minter](https://github.com/b00h0o/recaptcha-vm/blob/master/live-v3-single.mjs): `live-v3-single.mjs`
- [v3 dump variant](https://github.com/b00h0o/recaptcha-vm/blob/master/live-v3-dump.mjs): `live-v3-dump.mjs`
- [v3 protocol variant](https://github.com/b00h0o/recaptcha-vm/blob/master/live-v3-protocol.mjs): `live-v3-protocol.mjs`
- [v3 transport variant](https://github.com/b00h0o/recaptcha-vm/blob/master/live-v3-transport.mjs): `live-v3-transport.mjs`
- [v2 challenge flow](https://github.com/b00h0o/recaptcha-vm/blob/master/live-v2-single.mjs): `live-v2-single.mjs`

### Token verification

- [Verify token](https://github.com/b00h0o/recaptcha-vm/blob/master/siteverify.mjs): `siteverify.mjs`
- **reCAPTCHA token**

### Other components

- **Operator**
- **Google reCAPTCHA**
- **Google siteverify**

## Connections

- Operator → Fetch anchor bundle: requests bundle (evidence: `README.md`)
- Fetch anchor bundle → Google reCAPTCHA: fetches artifacts (evidence: `fetch-anchor-generic.mjs`)
- Fetch anchor bundle → Anchor artifacts: saves bundle (evidence: `fetch-anchor-generic.mjs`)
- Operator → v3 single minter: runs minter (evidence: `README.md`)
- v3 single minter → Anchor artifacts: loads artifacts (evidence: `README.md`)
- v3 single minter → Google reCAPTCHA: sends clr request (evidence: `README.md`)
- v3 single minter → reCAPTCHA token: mints token (evidence: `README.md`)
- Operator → v2 challenge flow: runs demo (evidence: `README.md`)
- v2 challenge flow → Anchor artifacts: loads artifacts (evidence: `README.md`)
- Operator → Verify token: submits token (evidence: `README.md`)
- Verify token → Google siteverify: posts verification (evidence: `siteverify.mjs`)
- Verify token → reCAPTCHA token: reads token (evidence: `siteverify.mjs`)
