# cyberhandyman/wloc-spoofer-en architecture

> Architecture diagram of the GitHub repository cyberhandyman/wloc-spoofer-en, 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/cyberhandyman/wloc-spoofer-en
- Repository: https://github.com/cyberhandyman/wloc-spoofer-en

## Overview

WLOC provides two ways to set a virtual network location: an online map picker or iOS Shortcuts. Coordinates are stored by the proxy module, then used to modify Apple’s later WLOC response. The Worker also serves the picker, searches places, manages browser-side favorites, and parses map links with coordinate conversion. Proxy-platform adapters and script behavior are documented in the README; their source was not sampled, so those relationships rely on that documentation.

Main entry points: [`worker/src/page.js`](https://github.com/cyberhandyman/wloc-spoofer-en/blob/main/worker/src/page.js) (Map picker UI), [`modules`](https://github.com/cyberhandyman/wloc-spoofer-en/tree/main/modules) (Proxy platform modules), [`worker/src/index.js`](https://github.com/cyberhandyman/wloc-spoofer-en/blob/main/worker/src/index.js) (HTTP routes), [`worker/src/parse.js`](https://github.com/cyberhandyman/wloc-spoofer-en/blob/main/worker/src/parse.js) (Map link parser)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_picker["Location picker"]
  node_picker_page["Map picker UI<br/>[page.js]"]
  node_favorites[("Saved favorites<br/>[page.js]")]
  node_place_search["Place search<br/>[page.js]"]
end

subgraph group_worker["Worker services"]
  node_worker_routes["HTTP routes<br/>[index.js]"]
  node_pages_adapter["Pages adapter<br/>[&#91;&#91;route&#93;&#93;.js]"]
  node_link_parser["Map link parser<br/>[parse.js]"]
end

subgraph group_proxy["Proxy integration"]
  node_proxy_modules["Proxy platform modules"]
  node_settings_script["Settings handler<br/>[wloc-settings.js]"]
  node_wloc_script["WLOC response patch<br/>[wloc.js]"]
  node_persistent_store[("Proxy persistent store")]
end

subgraph group_apple["Apple location"]
  node_apple_wloc["Apple WLOC service"]
end

node_user(("User"))
node_shortcuts["iOS Shortcuts"]
node_map_services["Map link hosts"]
node_geocoder["Nominatim"]

node_user -->|"chooses location"| node_picker_page
node_user -->|"shares map link"| node_shortcuts
node_shortcuts -->|"requests parsing"| node_worker_routes
node_worker_routes -->|"serves page"| node_picker_page
node_worker_routes -->|"parses coordinates"| node_link_parser
node_pages_adapter -->|"dispatches requests"| node_worker_routes
node_picker_page -->|"reads and writes"| node_favorites
node_picker_page -->|"searches places"| node_place_search
node_place_search -->|"queries"| node_geocoder
node_link_parser -->|"follows redirects"| node_map_services
node_picker_page -->|"sends coordinates"| node_proxy_modules
node_proxy_modules -->|"routes save request"| node_settings_script
node_proxy_modules -->|"routes WLOC response"| node_wloc_script
node_settings_script -->|"writes coordinates"| node_persistent_store
node_wloc_script -->|"reads coordinates"| node_persistent_store
node_apple_wloc -->|"sends location response"| node_proxy_modules
node_proxy_modules -->|"returns patched response"| node_apple_wloc

click node_picker_page "https://github.com/cyberhandyman/wloc-spoofer-en/blob/main/worker/src/page.js"
click node_favorites "https://github.com/cyberhandyman/wloc-spoofer-en/blob/main/worker/src/page.js"
click node_place_search "https://github.com/cyberhandyman/wloc-spoofer-en/blob/main/worker/src/page.js"
click node_worker_routes "https://github.com/cyberhandyman/wloc-spoofer-en/blob/main/worker/src/index.js"
click node_pages_adapter "https://github.com/cyberhandyman/wloc-spoofer-en/blob/main/worker/functions/%5B%5Broute%5D%5D.js"
click node_link_parser "https://github.com/cyberhandyman/wloc-spoofer-en/blob/main/worker/src/parse.js"
click node_proxy_modules "https://github.com/cyberhandyman/wloc-spoofer-en/tree/main/modules"
click node_settings_script "https://github.com/cyberhandyman/wloc-spoofer-en/blob/main/dist/wloc-settings.js"
click node_wloc_script "https://github.com/cyberhandyman/wloc-spoofer-en/blob/main/dist/wloc.js"

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_picker_page,node_favorites,node_place_search,node_user toneBlue
class node_worker_routes,node_pages_adapter,node_link_parser toneAmber
class node_proxy_modules,node_settings_script,node_wloc_script,node_persistent_store toneMint
class node_apple_wloc toneRose
class node_shortcuts,node_map_services,node_geocoder toneIndigo
```

## Components

### Location picker

- [Map picker UI](https://github.com/cyberhandyman/wloc-spoofer-en/blob/main/worker/src/page.js): `worker/src/page.js`
- [Saved favorites](https://github.com/cyberhandyman/wloc-spoofer-en/blob/main/worker/src/page.js): `worker/src/page.js`
- [Place search](https://github.com/cyberhandyman/wloc-spoofer-en/blob/main/worker/src/page.js): `worker/src/page.js`

### Worker services

- [HTTP routes](https://github.com/cyberhandyman/wloc-spoofer-en/blob/main/worker/src/index.js): `worker/src/index.js`
- [Pages adapter](https://github.com/cyberhandyman/wloc-spoofer-en/blob/main/worker/functions/%5B%5Broute%5D%5D.js): `worker/functions/[[route]].js`
- [Map link parser](https://github.com/cyberhandyman/wloc-spoofer-en/blob/main/worker/src/parse.js): `worker/src/parse.js`

### Proxy integration

- [Proxy platform modules](https://github.com/cyberhandyman/wloc-spoofer-en/tree/main/modules): `modules`
- [Settings handler](https://github.com/cyberhandyman/wloc-spoofer-en/blob/main/dist/wloc-settings.js): `dist/wloc-settings.js`
- [WLOC response patch](https://github.com/cyberhandyman/wloc-spoofer-en/blob/main/dist/wloc.js): `dist/wloc.js`
- **Proxy persistent store**

### Apple location

- **Apple WLOC service**

### Other components

- **User**
- **iOS Shortcuts**
- **Map link hosts**
- **Nominatim**

## Connections

- User → Map picker UI: chooses location (evidence: `README.md`)
- User → iOS Shortcuts: shares map link (evidence: `README.md`)
- iOS Shortcuts → HTTP routes: requests parsing (evidence: `README.md`)
- HTTP routes → Map picker UI: serves page (evidence: `worker/src/index.js`)
- HTTP routes → Map link parser: parses coordinates (evidence: `worker/src/index.js`)
- Pages adapter → HTTP routes: dispatches requests (evidence: `worker/functions/[[route]].js`)
- Map picker UI → Saved favorites: reads and writes (evidence: `worker/src/page.js`)
- Map picker UI → Place search: searches places (evidence: `worker/src/page.js`)
- Place search → Nominatim: queries (evidence: `worker/src/page.js`)
- Map link parser → Map link hosts: follows redirects (evidence: `worker/src/parse.js`)
- Map picker UI → Proxy platform modules: sends coordinates (evidence: `README.md`)
- Proxy platform modules → Settings handler: routes save request (evidence: `README.md`)
- Proxy platform modules → WLOC response patch: routes WLOC response (evidence: `README.md`)
- Settings handler → Proxy persistent store: writes coordinates (evidence: `README.md`)
- WLOC response patch → Proxy persistent store: reads coordinates (evidence: `README.md`)
- Apple WLOC service → Proxy platform modules: sends location response (evidence: `README.md`)
- Proxy platform modules → Apple WLOC service: returns patched response (evidence: `README.md`)
