Monorepo Overview
Happy Development is organized as a Yarn workspaces monorepo with five main packages. The project uses Yarn 1.22.22 for package management.Package Details
happy-app
Purpose: Mobile and web client for controlling AI coding agents remotely Technology Stack:- React Native 0.81.4 with React 19.1.0
- Expo SDK 54
- TypeScript 5.9.3
- Unistyles for cross-platform styling
- Socket.io for real-time communication
- libsodium for end-to-end encryption
- LiveKit for voice communication
- Cross-platform: iOS, Android, Web, macOS (via Tauri)
- End-to-end encrypted session sync
- QR code-based authentication
- Real-time voice sessions with LiveKit
- Multi-language support (EN, RU, PL, ES, CA, IT, PT, JA, ZH)
- Development, Preview, and Production variants
- Native builds via EAS (Expo Application Services)
- Web builds via Expo for Web
- macOS desktop via Tauri
happy-cli
Purpose: CLI wrapper for Claude Code and Codex enabling remote control Technology Stack:- Node.js 20+ with TypeScript
- Socket.io for real-time sync
- TweetNaCl for cryptography
- Ink for terminal UI
- Zod for validation
- Vitest for testing
- Dual mode: interactive (local terminal) and remote (mobile control)
- Background daemon for persistent sessions
- End-to-end encryption for all communications
- Permission interception via MCP (Model Context Protocol)
- Session persistence and resumption
- Support for both Claude Code and Codex
happy- Start Claude Code sessionhappy codex- Start Codex sessionhappy daemon start/stop/status- Manage background daemonhappy auth- Authenticate with serverhappy doctor- Diagnose issues
happy-agent
Purpose: Remote CLI for creating and monitoring agent sessions Technology Stack:- Node.js 20+ with TypeScript
- Socket.io client
- TweetNaCl for encryption
- Commander for CLI parsing
- Create remote agent sessions
- Monitor session output
- Send commands to running agents
- End-to-end encrypted communication
happy-server
Purpose: Backend server handling authentication, session sync, and data persistence Technology Stack:- Node.js 20 with TypeScript
- Fastify 5 web framework
- Prisma ORM with PostgreSQL
- Redis for caching and pub/sub
- Socket.io for real-time communication
- MinIO for S3-compatible storage
- Zod for validation
- RESTful API with Zod validation
- WebSocket real-time updates
- End-to-end encrypted session storage
- Multi-tenant architecture
- Redis-based event bus
- Push notification support (Expo)
- 4 spaces for indentation
- Functional and declarative patterns (avoid classes)
- Absolute imports with
@/prefix - Idempotent operations for reliability
- Transaction-wrapped database operations
happy-wire
Purpose: Shared type definitions and Zod schemas for type-safe communication Technology Stack:- TypeScript
- Zod for schema validation
- Dual CJS/ESM builds via pkgroll
- Type-safe message contracts
- Runtime validation with Zod
- Shared between CLI, app, agent, and server
- Dual module format (CJS + ESM)
Build System
Root Commands
Workspace Configuration
The rootpackage.json defines the workspace structure:
nohoist configuration ensures certain dependencies are installed locally in each package to avoid version conflicts.
Dependency Graph
happy-wire for shared types and schemas.
TypeScript Configuration
Each package has its owntsconfig.json with:
- TypeScript 5.9.3
- Strict mode enabled
- Path aliases (e.g.,
@/maps to./srcor./sources)
Testing Strategy
All packages use Vitest for testing:- Unit tests:
*.test.tsfiles - Spec tests:
*.spec.tsfiles - Integration tests:
*.integration.test.tsfiles
Code Style
happy-app
- 4 spaces for indentation
- React functional components with hooks
- Unistyles for styling (not inline styles)
- Internationalization via
t()function
happy-cli
- Strict TypeScript with comprehensive JSDoc
- No classes, prefer functions
- File-based logging (no console in library code)
- All imports use
@/prefix
happy-server
- 4 spaces for indentation
- Functional programming patterns
- Transaction-wrapped database operations
- Absolute imports with
@/prefix - Utility functions named same as filename
Next Steps
- Learn how to build the project
- Set up testing
- Read the setup guide for development environment configuration