# xoxma1993/shardbrowser architecture

> Architecture diagram of the GitHub repository xoxma1993/shardbrowser, 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/xoxma1993/shardbrowser
- Repository: https://github.com/xoxma1993/shardbrowser
- Video tour (about a minute): https://gitdiagram.com/xoxma1993/shardbrowser/video

## Overview

ShardX is a desktop anti-detect browser launcher for managing isolated browser profiles and running them with configured fingerprints and proxies. Users prepare profiles, then launch and control browser sessions through the desktop workspace, local HTTP API, MCP server, or standalone SDKs. The README documents cookie handling, extensions, bookmarks, automation, and proxy management as additional capabilities. Sampled UI stores call Tauri commands, while the backend owns persistence and browser lifecycle; README-described integration details are included without asserting unsampled internal wiring.

Main entry points: [`src-tauri/src/lib.rs`](https://github.com/xoxma1993/shardbrowser/blob/main/src-tauri/src/lib.rs) (Tauri commands), [`src/app/App.tsx`](https://github.com/xoxma1993/shardbrowser/blob/main/src/app/App.tsx) (Desktop UI), [`src-tauri/src/launch.rs`](https://github.com/xoxma1993/shardbrowser/blob/main/src-tauri/src/launch.rs) (Browser launch), [`src-tauri/src/api.rs`](https://github.com/xoxma1993/shardbrowser/blob/main/src-tauri/src/api.rs) (Local HTTP API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_control["Control surfaces"]
  node_desktop["Desktop UI<br/>[App.tsx]"]
  node_http["Local HTTP API<br/>[api.rs]"]
end

subgraph group_workspace["Launcher workspace"]
  node_profile_ui["Profiles<br/>[useProfile.tsx]"]
  node_proxy_ui["Proxy manager<br/>[useProxy.tsx]"]
  node_fingerprint_ui["Fingerprint library<br/>[useFingerprint.tsx]"]
  node_automation_ui["Automation editor<br/>[useAutomation.tsx]"]
  node_extensions_ui["Extensions<br/>[useExtensions.tsx]"]
  node_other_workspace["Workspace tools"]
end

subgraph group_backend["Native runtime"]
  node_commands["Tauri commands<br/>[lib.rs]"]
  node_profile_runtime["Profile lifecycle<br/>[profile.rs]"]
  node_proxy_runtime["Proxy handling<br/>[proxy.rs]"]
  node_fingerprint_runtime["Fingerprint data<br/>[fingerprints.rs]"]
  node_automation_runtime["Automation runtime<br/>[automation.rs]"]
  node_browser_launch["Browser launch<br/>[launch.rs]"]
  node_state[("Local state<br/>[db.rs]")]
end

subgraph group_clients["Automation clients"]
  node_mcp["MCP server<br/>[index.js]"]
  node_sdk["SDKs"]
end

subgraph group_browser["Browser operation"]
  node_chromium["Patched Chromium"]
  node_cdp["CDP control<br/>[cdp.rs]"]
  node_browser_actions["Browser actions<br/>[index.js]"]
end

node_user(("Operator"))
node_proxyshard["ProxyShard service"]

node_user -->|"uses"| node_desktop
node_user -->|"requests control"| node_http
node_user -->|"prompts"| node_mcp
node_user -->|"runs"| node_sdk
node_desktop -->|"navigates"| node_profile_ui
node_desktop -->|"navigates"| node_proxy_ui
node_desktop -->|"navigates"| node_fingerprint_ui
node_desktop -->|"navigates"| node_automation_ui
node_desktop -->|"navigates"| node_extensions_ui
node_desktop -->|"navigates"| node_other_workspace
node_profile_ui -->|"invokes commands"| node_commands
node_proxy_ui -->|"invokes commands"| node_commands
node_fingerprint_ui -->|"invokes commands"| node_commands
node_automation_ui -->|"invokes commands"| node_commands
node_extensions_ui -->|"invokes commands"| node_commands
node_http -->|"dispatches"| node_commands
node_mcp -->|"calls API"| node_http
node_mcp -->|"connects"| node_cdp
node_sdk -.->|"controls profiles"| node_http
node_commands -->|"dispatches"| node_profile_runtime
node_commands -->|"dispatches"| node_proxy_runtime
node_commands -->|"dispatches"| node_fingerprint_runtime
node_commands -->|"dispatches"| node_automation_runtime
node_profile_runtime -->|"reads/writes"| node_state
node_proxy_runtime -->|"reads/writes"| node_state
node_fingerprint_runtime -->|"reads/writes"| node_state
node_automation_runtime -->|"reads/writes"| node_state
node_commands -->|"starts/stops"| node_browser_launch
node_browser_launch -->|"loads profile"| node_profile_runtime
node_browser_launch -->|"launches"| node_chromium
node_browser_launch -->|"configures proxy"| node_proxy_runtime
node_chromium -->|"exposes endpoint"| node_cdp
node_cdp -->|"controls session"| node_browser_actions
node_browser_actions -->|"automates"| node_chromium
node_proxyshard -.->|"optional proxy service"| node_proxy_runtime

click node_desktop "https://github.com/xoxma1993/shardbrowser/blob/main/src/app/App.tsx"
click node_http "https://github.com/xoxma1993/shardbrowser/blob/main/src-tauri/src/api.rs"
click node_mcp "https://github.com/xoxma1993/shardbrowser/blob/main/mcp/index.js"
click node_sdk "https://github.com/xoxma1993/shardbrowser/tree/main/sdks"
click node_profile_ui "https://github.com/xoxma1993/shardbrowser/blob/main/src/entities/profile/lib/useProfile.tsx"
click node_proxy_ui "https://github.com/xoxma1993/shardbrowser/blob/main/src/entities/proxy/lib/useProxy.tsx"
click node_fingerprint_ui "https://github.com/xoxma1993/shardbrowser/blob/main/src/entities/fingerprint/lib/useFingerprint.tsx"
click node_automation_ui "https://github.com/xoxma1993/shardbrowser/blob/main/src/entities/automation/lib/useAutomation.tsx"
click node_extensions_ui "https://github.com/xoxma1993/shardbrowser/blob/main/src/entities/extension/lib/useExtensions.tsx"
click node_other_workspace "https://github.com/xoxma1993/shardbrowser/tree/main/src/pages"
click node_commands "https://github.com/xoxma1993/shardbrowser/blob/main/src-tauri/src/lib.rs"
click node_profile_runtime "https://github.com/xoxma1993/shardbrowser/blob/main/src-tauri/src/profile.rs"
click node_proxy_runtime "https://github.com/xoxma1993/shardbrowser/blob/main/src-tauri/src/proxy.rs"
click node_fingerprint_runtime "https://github.com/xoxma1993/shardbrowser/blob/main/src-tauri/src/fingerprints.rs"
click node_automation_runtime "https://github.com/xoxma1993/shardbrowser/blob/main/src-tauri/src/automation.rs"
click node_browser_launch "https://github.com/xoxma1993/shardbrowser/blob/main/src-tauri/src/launch.rs"
click node_state "https://github.com/xoxma1993/shardbrowser/blob/main/src-tauri/src/db.rs"
click node_cdp "https://github.com/xoxma1993/shardbrowser/blob/main/src-tauri/src/cdp.rs"
click node_browser_actions "https://github.com/xoxma1993/shardbrowser/blob/main/mcp/index.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_desktop,node_http toneBlue
class node_profile_ui,node_proxy_ui,node_fingerprint_ui,node_automation_ui,node_extensions_ui,node_other_workspace toneAmber
class node_commands,node_profile_runtime,node_proxy_runtime,node_fingerprint_runtime,node_automation_runtime,node_browser_launch,node_state toneMint
class node_mcp,node_sdk toneRose
class node_chromium,node_cdp,node_browser_actions,node_user,node_proxyshard toneIndigo
```

## Components

### Control surfaces

- [Desktop UI](https://github.com/xoxma1993/shardbrowser/blob/main/src/app/App.tsx): `src/app/App.tsx`
- [Local HTTP API](https://github.com/xoxma1993/shardbrowser/blob/main/src-tauri/src/api.rs): `src-tauri/src/api.rs`

### Launcher workspace

- [Profiles](https://github.com/xoxma1993/shardbrowser/blob/main/src/entities/profile/lib/useProfile.tsx): `src/entities/profile/lib/useProfile.tsx`
- [Proxy manager](https://github.com/xoxma1993/shardbrowser/blob/main/src/entities/proxy/lib/useProxy.tsx): `src/entities/proxy/lib/useProxy.tsx`
- [Fingerprint library](https://github.com/xoxma1993/shardbrowser/blob/main/src/entities/fingerprint/lib/useFingerprint.tsx): `src/entities/fingerprint/lib/useFingerprint.tsx`
- [Automation editor](https://github.com/xoxma1993/shardbrowser/blob/main/src/entities/automation/lib/useAutomation.tsx): `src/entities/automation/lib/useAutomation.tsx`
- [Extensions](https://github.com/xoxma1993/shardbrowser/blob/main/src/entities/extension/lib/useExtensions.tsx): `src/entities/extension/lib/useExtensions.tsx`
- [Workspace tools](https://github.com/xoxma1993/shardbrowser/tree/main/src/pages): `src/pages`

### Native runtime

- [Tauri commands](https://github.com/xoxma1993/shardbrowser/blob/main/src-tauri/src/lib.rs): `src-tauri/src/lib.rs`
- [Profile lifecycle](https://github.com/xoxma1993/shardbrowser/blob/main/src-tauri/src/profile.rs): `src-tauri/src/profile.rs`
- [Proxy handling](https://github.com/xoxma1993/shardbrowser/blob/main/src-tauri/src/proxy.rs): `src-tauri/src/proxy.rs`
- [Fingerprint data](https://github.com/xoxma1993/shardbrowser/blob/main/src-tauri/src/fingerprints.rs): `src-tauri/src/fingerprints.rs`
- [Automation runtime](https://github.com/xoxma1993/shardbrowser/blob/main/src-tauri/src/automation.rs): `src-tauri/src/automation.rs`
- [Browser launch](https://github.com/xoxma1993/shardbrowser/blob/main/src-tauri/src/launch.rs): `src-tauri/src/launch.rs`
- [Local state](https://github.com/xoxma1993/shardbrowser/blob/main/src-tauri/src/db.rs): `src-tauri/src/db.rs`

### Automation clients

- [MCP server](https://github.com/xoxma1993/shardbrowser/blob/main/mcp/index.js): `mcp/index.js`
- [SDKs](https://github.com/xoxma1993/shardbrowser/tree/main/sdks): `sdks`

### Browser operation

- **Patched Chromium**
- [CDP control](https://github.com/xoxma1993/shardbrowser/blob/main/src-tauri/src/cdp.rs): `src-tauri/src/cdp.rs`
- [Browser actions](https://github.com/xoxma1993/shardbrowser/blob/main/mcp/index.js): `mcp/index.js`

### Other components

- **Operator**
- **ProxyShard service**

## Connections

- Operator → Desktop UI: uses
- Operator → Local HTTP API: requests control
- Operator → MCP server: prompts
- Operator → SDKs: runs
- Desktop UI → Profiles: navigates
- Desktop UI → Proxy manager: navigates
- Desktop UI → Fingerprint library: navigates
- Desktop UI → Automation editor: navigates
- Desktop UI → Extensions: navigates
- Desktop UI → Workspace tools: navigates
- Profiles → Tauri commands: invokes commands
- Proxy manager → Tauri commands: invokes commands
- Fingerprint library → Tauri commands: invokes commands
- Automation editor → Tauri commands: invokes commands
- Extensions → Tauri commands: invokes commands
- Local HTTP API → Tauri commands: dispatches
- MCP server → Local HTTP API: calls API
- MCP server → CDP control: connects
- SDKs → Local HTTP API: controls profiles
- Tauri commands → Profile lifecycle: dispatches
- Tauri commands → Proxy handling: dispatches
- Tauri commands → Fingerprint data: dispatches
- Tauri commands → Automation runtime: dispatches
- Profile lifecycle → Local state: reads/writes
- Proxy handling → Local state: reads/writes
- Fingerprint data → Local state: reads/writes
- Automation runtime → Local state: reads/writes
- Tauri commands → Browser launch: starts/stops
- Browser launch → Profile lifecycle: loads profile
- Browser launch → Patched Chromium: launches
- Browser launch → Proxy handling: configures proxy
- Patched Chromium → CDP control: exposes endpoint
- CDP control → Browser actions: controls session
- Browser actions → Patched Chromium: automates
- ProxyShard service → Proxy handling: optional proxy service
