# Architecture
For comprehensive architecture documentation, see [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md).
Quick reference: the project is a **standalone browser automation library** built on Chrome DevTools Protocol (CDP). It provides a modular, trait-based design with `browser/` (20+ CDP feature managers), `dom/`, `tools/`, `actor/`, and `perception/` modules. The browser runs **headless by default** with 17+ lightweight Chrome flags for fast, minimal operation. No LLM or AI dependencies.
## Module Highlights
- **`browser/session.rs`** — Main `Browser` struct implementing `BrowserClient` trait
- **`browser/cdp.rs`** — WebSocket CDP client with iterative retry, event subscription
- **`browser/` managers** — Dialog, FileChooser, Permissions, Tracing, Touch, Worker, ServiceWorker, HAR, Coverage, Performance, Auth, Console, Cookies, Interceptor, PDF, Viewport (device presets, color scheme, vision deficiency, locale)
- **`actor/`** — Low-level Page, Element, Mouse, Keyboard interactions (`Arc<str>` session IDs for zero-copy)
- **`dom/`** — DOM processing, serialization, tree building, HTML→markdown
- **`tools/`** — Action registry and handlers (navigation, interaction, tabs, content, advanced)
- **`perception/`** — Semantic DOM enrichment and page classification