Repository navigation
Architecture Overview
Kuray Karaaslan edited this page Oct 5, 2026
·
1 revision
Tepegoz is a layered modular monolith: one Electron desktop app over many private @tepegoz/*
packages. The desktop app should stay thin; reusable or domain-specific work belongs in packages.
| Layer | Responsibility |
|---|---|
| L0 Core Shell | Electron windowing, sandboxing, typed IPC |
| L1 Persistence | SQLite, event journal, blob store |
| L2 Durability and Memory | Checkpoint/resume, handoff, task memory |
| L3 Orchestrator | Intent to plan, scheduling, loop detection |
| L4 Perception and Tools | CDP driver, DOM/accessibility perception, content sanitizer |
| L5 Capability Plane | Tool gateway, policy enforcement point, skills, MCP client |
| L6 Integration Adapters | Official-API-first connectors and browser fallback |
| L7 Model Gateway | Provider routing, transports, token ledger |
| L8 Security Kernel | Policy kernel, egress firewall, HITL, capability broker |
| L9 Browser UI | Command palette, console, chrome, settings |
| L10 Safe Browsing | Adblock, popup/permission guard, threat shield |
Some layers describe the target architecture more than fully closed implementation. The source docs state which pieces are shipped, inert, partial, or deferred.
The desktop app uses:
- privileged main process,
- typed preload bridge,
- untrusted renderer,
- isolated web content,
- subprocesses or helper processes where needed.
The renderer displays and relays. It does not enforce autonomy, grant permissions, or store secrets.
- Zod
safeParseat trust boundaries. - Typed IPC contracts.
-
@tepegoz/shared-typesas schema source. -
dependency-cruiserlayer rules and no import cycles. - Uniform
AppErrormapping at boundaries.
Packages are private workspace packages and bundled into the app. They are not intended to be published
to npm. New work should target the owning package or a new package, not uncontrolled growth inside
apps/desktop.
docs/architecture.mddocs/package-map.mdapps/desktop/README.mddocs/adr/dependency-cruiser.cjs