How virtual-browser/virtualbrowser works
1. What this repo is
- VirtualBrowser is a Chromium-based anti-fingerprint browser product.
- The repository is organized around a control UI, a runtime/worker companion, and automation scripts rather than a classic client-server web app.
2. Top-level subsystem split
- server/ is the main Vue SPA used to manage browser environments.
- worker/ is a separate Vue/TypeScript app that likely participates in local/native browser operations.
- automation/ contains test and demo automation for interacting with the browser/API layer.
- assets/ holds shared product imagery and branding.
3. Primary control plane: server/
- This is the largest subsystem and looks like the main administrative console.
- It uses Vue, Vue Router, Vuex, Element UI, SCSS, and a large internal component library.
- The app shell is built from src/layout/, with global navigation, sidebar, tags view, settings, and responsive handling.
4. User-facing functional areas in server/src/views
- login/ handles authentication entry and social sign-in.
- browser/ appears to manage browser groups and instances.
- crx/ handles extension store/list management.
- error-page/ and redirect/ are supporting navigation and error routes.
- This suggests the UI is centered on creating, organizing, and launching isolated browser profiles.
5. State, routing, and access control
- src/router/, src/store/, and src/permission.js implement route registration, navigation guards, and permission-aware UI behavior.
- Vuex modules cover user, permission, settings, tagsView, app, and errorLog.
- The architecture is strongly shell-driven: route changes update the layout and the selected browser-management task.
6. API boundary and data flow in server/
- src/api/*.js centralizes all backend-facing calls for users, roles, articles, remote search, and native integration.
- src/utils/request.js is the network boundary wrapper.
- server/mock/ provides a mock backend for local development, so this repo does not include a full production backend service.
- In architecture terms, the UI talks to a mocked or external native/API layer through this request boundary.
7. Reusable UI and interaction components
- src/components/ contains a broad internal toolkit: charts, drag/drop, upload, image cropper, JSON editor, markdown editor, Tinymce editor, pagination, sticky elements, and more.
- src/directive/ adds cross-cutting behaviors like clipboard, drag dialogs, table adaptation, permission gating, and wave effects.
- These are presentation-layer building blocks, not core domain logic.
8. Fingerprint and localization support
- The repo includes configuration/data files for languages, timezones, speech voices, SSL, WebGL, versions, and user-agent-related metadata.
- src/lang/, src/utils/i18n.js, and the custom theme assets indicate the UI is localized and themable.
- These files support the browser-fingerprint manipulation story described in the README.
9. worker/ as a separate execution-side app
- worker/ is a second application with its own build config, TypeScript entry (src/main.ts), and src/utils/native.js.
- Compared with server/, it is much smaller and appears intended for a local helper/runtime role rather than the main admin experience.
- For a diagram, treat it as a separate frontend/runtime boundary that likely participates in native browser control or message exchange.
10. Automation subsystem
- automation/ contains both Node.js and Python tooling plus API test scripts.
- The README explicitly frames this as a Chromium automation demo, suitable for Playwright or similar tooling.
- This subsystem sits outside the product UI path and is used for validation, integration testing, or scripted browser control.
11. Runtime and deployment characteristics
- The project is built for desktop Chromium environments, with support focused on Windows and future multi-OS expansion.
- server/.env.* and server/vue.config.js suggest environment-specific builds and deployment modes.
- There is no evidence of a large standalone backend service in this repo; the important boundary is between the Vue apps, the mock/native API surface, and the Chromium runtime itself.
12. How to draw the architecture
- Put Chromium/virtual-browser runtime at the center or bottom.
- Place server/ as the main control plane UI above it.
- Place worker/ as a companion execution/helper layer beside or beneath the UI.
- Show server/mock/ as a development-only substitute for real API/native services.
- Show automation/ as an external test harness that drives the browser or its APIs.
Main entry points: user.js API layer · main.js Admin UI · index.js Routing · index.vue Shell layout
Components 17
Control plane
Main browser management UI and shared frontend architecture
- Admin UI · Main control console for browser environments
server/src/main.js - Shell layout · App chrome, sidebar, tags view, settings, responsive shell
server/src/layout/index.vue - Routing · Route registration and navigation structure
server/src/router/index.js - State store · Global state modules for user, permission, settings, tags, app, and errors
server/src/store/index.js - Access guard · Permission-aware route and UI gating
server/src/permission.js - API layer · Frontend service calls for user, role, article, native, and search APIs
server/src/api/user.js - Mock backend · Local mock server used during development
server/mock/mock-server.js - Login · Authentication entry and social sign-in
server/src/views/login/index.vue - Browser mgmt · Browser group and instance management
server/src/views/browser/index.vue - Extension mgmt · Extension store and installed extension lists
server/src/views/crx/list.vue - UI toolkit · Reusable charts, upload, editor, drag/drop, and presentation components
server/src/components/JsonEditor/index.vue - Browser data · Language, timezone, voice, SSL, UA, and WebGL metadata plus request/auth helpers
server/src/utils/index.js
Companion runtime
Secondary app for local/native browser-side operations
- Worker app · Companion frontend/runtime for native or local browser tasks
worker/src/main.ts - Native bridge · Worker-side integration surface for native/browser operations
worker/src/utils/native.js
Automation
External scripts and demos for scripted control and validation
- Automation · Node/Python test and demo scripts for API/browser automation
automation/index.js
Browser runtime
Chromium/virtual-browser execution boundary
- Chromium · Virtual browser execution target and fingerprinted runtime boundary
- Brand assets · Shared product imagery and branding
assets/img
Connections 21
- Admin UI → Shell layout: renders shell · The main app is composed through the shared layout system
- Admin UI → Routing: uses routes · Route table drives view switching and navigation
- Admin UI → State store: uses state · Vuex store provides global app and permission state
- Admin UI → Access guard: guards access · Navigation guards enforce authenticated and permitted routes
- Routing → Login: opens · Login route maps to authentication views
- Routing → Browser mgmt: opens · Browser management route maps to browser views
- Routing → Extension mgmt: opens · Extension management routes map to crx views
- Shell layout → UI toolkit: composes · Layout uses shared UI building blocks
- Browser mgmt → API layer: calls · Browser management reads and mutates via API boundary
- Extension mgmt → API layer: calls · Extension management uses backend/native-facing services
- Login → API layer: auth via · Login flow exchanges credentials and session state through APIs
- API layer → Mock backend: dev mode · Mock server substitutes for backend during local development
- API layer → Chromium: targets · Native/browser-related endpoints bridge toward the Chromium runtime
- Browser data → Chromium: data for · Language, UA, timezone, and fingerprint datasets support browser profiles
- Worker app → Native bridge: bridges to · Worker app delegates local/native operations through its bridge layer
- Native bridge → Chromium: controls · Native helper participates in browser/runtime operations
- Automation → API layer: tests · Automation scripts exercise API and integration paths
- Automation → Chromium: drives · Automation can control Chromium through browser automation tooling
- Brand assets → Admin UI: brands · Static imagery and branding support the main UI
- State store → Shell layout: drives shell · Store state affects tags, settings, sidebar, and layout behavior
- Mock backend → Browser data: serves data · Mocked responses may include browser-related reference data