Skip to main content

Prerequisites

Before installing Viber, ensure you have the following:

Bun (recommended)

Viber uses Bun as the primary runtime and package manager.Install with: curl -fsSL https://bun.sh/install | bash

Node.js 18+

Optional alternative to Bun, though Bun is the recommended path.

Google Gemini API key

Required for code generation. Get yours at Google AI Studio.

Daytona API key

Required for sandbox management. Sign up at Daytona.

Optional prerequisites

ElevenLabs API key

Only required for voice mode. Get started at ElevenLabs.

Unsplash API keys

Required for AI-generated image placement. Register at Unsplash Developers.

Environment variables

Viber uses environment variables for configuration. Create a .env file in the project root:
# AI Code Generation
GEMINI_API_KEY=your_gemini_api_key_here
DEFAULT_MODEL=gemini-3-pro

# Sandbox Management
DAYTONA_API_KEY=your_daytona_api_key_here

# Image Generation
UNSPLASH_ACCESS_KEY=your_unsplash_access_key
UNSPLASH_SECRET_KEY=your_unsplash_secret_key

Variable descriptions

VariableRequiredDescription
GEMINI_API_KEYYesGoogle Gemini API key for code generation
DEFAULT_MODELNoGemini model to use (default: gemini-3-pro)
DAYTONA_API_KEYYesDaytona API key for sandbox management
UNSPLASH_ACCESS_KEYYesUnsplash access key for image generation
UNSPLASH_SECRET_KEYYesUnsplash secret key for image generation
ELEVENLABS_API_KEYNoElevenLabs API key (only for voice mode)
VITE_ELEVENLABS_AGENT_IDNoElevenLabs agent ID (only for voice mode)
IMAGE_CDN_BASE_URLNoPublic URL for image CDN in production
VITE_ELEVENLABS_AGENT_ID is a client-side variable and must be set at build time. It gets compiled into the frontend bundle.

Local installation

1

Clone the repository

git clone https://github.com/yourusername/viber.git
cd viber
2

Install dependencies

Using Bun (recommended):
bun install
Or using npm:
npm install
3

Configure environment

Create a .env file with your API keys (see environment variables section above).
4

Start development server

bun run dev
The application will be available at http://localhost:3000.

Production build

To build and run Viber in production mode:
1

Build the application

bun run build
This creates an optimized production build in the .output directory.
2

Start the production server

bun run start
The server runs on port 3000 by default.

Docker installation

Build and run with Docker

1

Build the Docker image

docker build -t viber .
2

Run the container

docker run --rm -p 3000:3000 \
  -e GEMINI_API_KEY=your_key \
  -e DAYTONA_API_KEY=your_key \
  -e UNSPLASH_ACCESS_KEY=your_key \
  -e UNSPLASH_SECRET_KEY=your_key \
  -e ELEVENLABS_API_KEY=your_key \
  -e IMAGE_CDN_BASE_URL=https://your-domain.com \
  viber
Remember that VITE_ELEVENLABS_AGENT_ID must be set at build time in the Dockerfile, not at runtime.

Using the convenience script

Viber includes a Docker convenience script:
./docker.sh
This script handles building and running the container with environment variables from your .env file.

Deployment to Google Cloud Run

Deploy Viber to Google Cloud Run for a fully managed, serverless deployment:
1

Authenticate with Google Cloud

gcloud auth login
gcloud config set project YOUR_PROJECT_ID
2

Enable required services

gcloud services enable run.googleapis.com cloudbuild.googleapis.com
3

Build and push container image

gcloud builds submit --tag gcr.io/YOUR_PROJECT_ID/viber .
4

Deploy to Cloud Run

gcloud run deploy viber \
  --image gcr.io/YOUR_PROJECT_ID/viber \
  --region us-central1 \
  --allow-unauthenticated \
  --port 3000 \
  --set-env-vars GEMINI_API_KEY=your_key \
  --set-env-vars DAYTONA_API_KEY=your_key \
  --set-env-vars UNSPLASH_ACCESS_KEY=your_key \
  --set-env-vars UNSPLASH_SECRET_KEY=your_key \
  --set-env-vars ELEVENLABS_API_KEY=your_key \
  --set-env-vars IMAGE_CDN_BASE_URL=https://your-cloudrun-url.run.app
After deployment, Cloud Run will provide a public URL for your Viber instance.

Available scripts

Viber includes several npm/bun scripts for development and maintenance:
ScriptCommandDescription
Developmentbun run devStart Vite dev server on port 3000
Buildbun run buildCreate production build
Previewbun run servePreview production build locally
Startbun run startRun production server
Testbun run testRun Vitest test suite
Daytona Snapshotbun run daytona:snapshotCreate Daytona sandbox snapshot
Daytona Benchmarkbun run daytona:benchmarkBenchmark Daytona performance
Test Proxybun run daytona:test-proxyTest Daytona proxy connection

Configuring ElevenLabs voice agent

To enable voice mode, you need to set up an ElevenLabs Conversational AI agent:
1

Create an ElevenLabs account

Sign up at ElevenLabs and navigate to the Conversational AI section.
2

Create a new agent

Configure your agent with:
  • A system prompt that understands the vibe_build and navigate_ui tools
  • Voice settings for natural conversation
  • Tool definitions for the client-side tools
3

Get your credentials

Copy:
  • Your ElevenLabs API key
  • Your agent ID
4

Add to environment

ELEVENLABS_API_KEY=your_api_key
VITE_ELEVENLABS_AGENT_ID=your_agent_id
5

Rebuild the application

Since VITE_ELEVENLABS_AGENT_ID is a build-time variable:
bun run build
bun run start

Troubleshooting

Check that:
  • ELEVENLABS_API_KEY is set correctly
  • VITE_ELEVENLABS_AGENT_ID was set before building
  • You rebuilt the app after adding the agent ID
  • Your browser has microphone permissions
Verify:
  • Your DAYTONA_API_KEY is valid
  • You have sufficient quota in your Daytona account
  • Network connectivity to Daytona API
Ensure:
  • Both UNSPLASH_ACCESS_KEY and UNSPLASH_SECRET_KEY are set
  • Your Unsplash API keys are active
  • You haven’t exceeded Unsplash rate limits
Check:
  • GEMINI_API_KEY is valid and active
  • You have API quota remaining
  • The DEFAULT_MODEL is set to a valid Gemini model

Next steps

Quick start guide

Build your first voice-generated app

Architecture overview

Learn how Viber works internally

Build docs developers (and LLMs) love