Skip to content

docs: add internal architecture documentation#4909

Open
yedidyak wants to merge 1 commit intomasterfrom
docs/architecture-documentation
Open

docs: add internal architecture documentation#4909
yedidyak wants to merge 1 commit intomasterfrom
docs/architecture-documentation

Conversation

@yedidyak
Copy link
Contributor

@yedidyak yedidyak commented Feb 5, 2026

Summary

  • Add comprehensive architecture documentation for contributors and maintainers
  • Create main ARCHITECTURE.md with high-level overview of Detox internals
  • Add detailed subsection docs for client-server, devices, and artifacts systems

Changes

ARCHITECTURE.md

High-level overview covering:

  • Realms pattern (Primary/Secondary contexts)
  • DetoxWorker lifecycle
  • Client-Server communication
  • Device management
  • Artifacts system
  • Invocation system
  • Test runner integration
  • Key design patterns (Symbol-based privacy, Factory pattern, CAF, Event-driven architecture)

docs/architecture/client-server.md

  • WebSocket protocol details
  • Message format and actions table
  • Connection lifecycle
  • Synchronization and error handling

docs/architecture/devices.md

  • Device allocation system (DeviceAllocator, DeviceRegistry)
  • Runtime drivers hierarchy
  • Platform-specific tools (AppleSimUtils, ADB)
  • Device lifecycle flows

docs/architecture/artifacts.md

  • ArtifactsManager plugin orchestration
  • Plugin types (Screenshot, Video, Log, Instruments, UIHierarchy)
  • Platform-specific implementations
  • Path building and lifecycle hooks

Test plan

  • Verify documentation renders correctly on GitHub
  • Review accuracy of architecture diagrams
  • Confirm all file paths referenced exist in the codebase

🤖 Generated with Claude Code

Add comprehensive architecture documentation for contributors and maintainers:

- ARCHITECTURE.md: High-level overview of Detox internals including
  realms, worker, client-server, devices, artifacts, and invocation system
- docs/architecture/client-server.md: WebSocket protocol details,
  message format, actions, and connection lifecycle
- docs/architecture/devices.md: Device allocation, runtime drivers,
  platform tools, and lifecycle management
- docs/architecture/artifacts.md: Plugin system, platform-specific
  implementations, path building, and lifecycle hooks

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant