1.3 KiB
1.3 KiB
apps/
Responsibility
Container for deployable application packages. Currently hosts the OpenPets desktop Electron application. Acts as the integration layer between workspace packages (packages/) and user-facing applications.
Design
- Monorepo App Pattern: Each subdirectory is an independently buildable/deployable application
- Workspace Dependencies: Apps consume shared packages via
workspace:*protocol (pnpm) - Electron-First Architecture: Desktop app uses Electron with tray-centric UX (no traditional main window)
- Security-First: CSP headers, sandboxed renderers, context isolation, no nodeIntegration
Flow
- Apps bootstrap from
main.tsentry points - State flows: User Data → App State → UI Windows → Tray Menu
- IPC flows: Agent Tools → Local IPC Server → Lease Manager → Pet Controllers → Window Updates
- Pet display flows: Catalog/Codex → Installation → State → Window Rendering
Integration Points
- packages/: Consumes
@open-pets/agent-events,@open-pets/claude,@open-pets/cli,@open-pets/mcp,@open-pets/opencode - External: GitHub Releases API (update checks), openpets.dev (catalog), zip.openpets.dev (pet downloads)
- System: Claude Code CLI, OpenCode CLI, OS tray/dock, file system (userData, ~/.codex, ~/.claude)