Installation & Setup

This guide covers installing Happy Vibecode for local development.

Prerequisites

Requirement Version Notes
Node.js >= 18 Required for TypeScript tooling
Bun 1.3.x Package manager and runtime (declared in package.json)
Wrangler Latest For Cloudflare Workers deployment
Expo CLI Latest Only needed for mobile development
Why Bun?
This project uses Bun as the package manager and runtime (see package.json: "packageManager": "bun@1.3.10"). Bun provides fast installs, native TypeScript execution, and integrated bundling.

Quick Start

Terminal
# Clone the repository
git clone https://github.com/involvex/happy-vibecode.git
cd happy-vibecode

# Install dependencies
bun install

# Start the web app in development mode
bun run dev:web

The web app will be available at http://localhost:5173.

Development Commands

Command Description
bun install Install all workspace dependencies
bun run dev Start all packages in development mode (via Turborepo)
bun run dev:web Start only the web app (Vite + vinext + Cloudflare plugin)
bun run build Build all packages
bun run build:web Build only the web app
bun run typecheck Run TypeScript type checking across all packages
bun run test Run tests across all packages
bun run lint Lint all packages
bun run lint:fix Lint and auto-fix issues
bun run format Format code with Prettier

Package-Scoped Commands

Target a specific package using the -F flag:

Terminal
# Build only the API package
bun run -F @happy-vibecode/api build

# Run typecheck on the web app
bun run -F @happy-vibecode/web typecheck

# Generate Drizzle migrations
bun run -F @happy-vibecode/db generate

# Apply database migrations
bun run -F @happy-vibecode/db migrate

CLI

The packages/cli package provides developer commands for interacting with the platform:

Terminal
# Build the CLI
bun run build:cli

# Available commands
node packages/cli/dist/index.js login     # Authenticate
node packages/cli/dist/index.js whoami    # Show authenticated user
node packages/cli/dist/index.js status    # Show connection status
node packages/cli/dist/index.js config    # View/edit configuration
node packages/cli/dist/index.js doctor    # Diagnose issues
node packages/cli/dist/index.js init      # Initialize workspace
node packages/cli/dist/index.js workspace # Manage workspaces
node packages/cli/dist/index.js connect   # Connect to agent bridge

Deployment

Cloudflare Workers

Terminal
# Deploy the web app to Cloudflare Workers
bun run -F @happy-vibecode/web deploy

# This runs: wrangler types -> vite build -> wrangler deploy
D1 and KV Bindings
The wrangler.jsonc uses placeholder IDs for local development. Before deploying to production, create real D1 and KV resources and update the IDs. See Configuration for details.

Database Migrations

Terminal
# Generate a new migration from schema changes
bun run -F @happy-vibecode/db generate

# Apply migrations to D1
bun run -F @happy-vibecode/db migrate

Mobile Development

Terminal
# Navigate to mobile app
cd apps/mobile

# Start Expo development server
npx expo start

# Build with EAS
npx eas build --profile development