Happy Vibecode Documentation

Happy Vibecode is a platform for running AI coding agents with remote control via web and mobile. Built on Cloudflare Workers with vinext, Agents SDK, and modern React.

Version 0.0.3
This documentation reflects the current state of the codebase. See the GitHub repository for the latest changes.

Architecture

The project uses a monorepo layout managed by Bun and Turborepo:

apps/web
Next.js application running on vinext (Vite-based Next.js reimplementation) deployed as a Cloudflare Worker. React 19 + TanStack Router + Tailwind CSS v4.
apps/mobile
Expo / React Native mobile app with push notifications, biometric auth, and offline support via NativeWind.
packages/api
Hono-based HTTP API with 18 route modules. Rate limiting, auth middleware, Stripe billing, and GitHub integration.
packages/db
Drizzle ORM schemas for Cloudflare D1 (SQLite). 20+ tables including users, sessions, templates, repos, and audit logs.
packages/cli
Developer CLI for connecting to the platform. Commands: login, whoami, status, config, doctor, init, workspace, connect.
packages/shared
Shared Zod schemas, TypeScript types, and utility functions consumed by all other packages.

Technology Stack

Layer Technology
Runtime Bun 1.3.x
Frontend React 19, vinext (Next.js on Vite), Tailwind CSS v4
Backend Cloudflare Workers, Hono
AI Agents SDK, Workers AI, AI Chat SDK
Database D1 (SQLite), Drizzle ORM
Storage Cloudflare KV, Durable Objects
Deployment Wrangler, Cloudflare Pages/Workers
Testing Vitest (via Turborepo)
Linting oxlint, Prettier

Key Concepts

BridgeAgent (Durable Object)

The BridgeAgent Durable Object manages WebSocket connections between the web/mobile clients and CLI agents. Each agent session is isolated by roomId and handles message relay, state management, and connection lifecycle.

Agent Sessions

An agent session represents a connection to an external AI coding agent (Gemini CLI, Claude Code, OpenCode AI, Copilot, etc.). Sessions track connection status, message history, and workspace context.

Workspaces

Workspaces group agent sessions with a local directory path and default LLM provider settings. Each workspace can have a different default provider and model.

Agent Templates

Templates are versioned, reusable agent configurations that include prompt templates, default models, tool sets, and parameters. Templates can be shared publicly or kept private.


Ready to get started? Head to the Installation guide.