$ show dominant-strategies/entropic
Entropic is a local-first desktop AI workspace built with Tauri and React. It provides a full desktop environment including chat with an AI agent, file management (Finder), web browsing, office document editing (OnlyOffice integration), voice control, task board with cron jobs, and an integration marketplace (OAuth for Google, Outlook, Slack, etc.). The application runs a sandboxed runtime (OpenClaw) inside Docker/Colima on macOS/Linux or WSL2 on Windows, ensuring secure execution of agent actions. Communication with the agent gateway happens via WebSocket with structured RPC frames. The system supports two modes: local API keys (user provides LLM keys) and managed proxy mode with hosted authentication and billing via Supabase/Stripe. The architecture is a monolith with separate microservices for browser automation (Playwright) and skill scanning (Cisco AI Defense). The frontend uses React 18, TypeScript, Vite 5, and Tailwind CSS 4, while the backend is Rust with Tauri v2 plugins for deep-link, updater, store, stronghold, and shell access. The codebase demonstrates strong engineering practices with reusable hooks for audio recording/transcription, a custom markdown renderer with workspace link support, and a resilient WebSocket client. However, some components are monolithic (Chat.tsx ~4000 lines, Files.tsx ~3000 lines) and there are hardcoded model lists and pricing that may drift over time.
The LLM identified 4 files worth highlighting for reuse:
GatewayClient class implementing a resilient WebSocket client with automatic reconnection, keepalive pings, challenge-response authentication, and structured RPC calls with timeouts. It handles event streaming and request/response matching. This pattern is reusable for any application needing a robust WebSocket connection to a local or remote service.
A custom Markdown renderer built with react-markdown and rehype plugins. It adds support for workspace file links (clickable), office document chips (inline previews), and browser link delegation. The plugin architecture allows easy extension for domain-specific content types. Reusable in any application needing rich Markdown rendering with custom interactive elements.
A React hook for audio recording using the MediaRecorder API with configurable silence detection (auto-stop after silence duration). It handles PCM fallback, provides recording state, and returns audio chunks. This is a self-contained pattern for adding voice input to any web or Tauri application.
A collection of pure functions for normalizing chat messages from the gateway, extracting tool call payloads, sanitizing assistant display content (removing internal tags), and building message objects. These functions are stateless and can be extracted to any chat application that needs to process structured AI responses.