Open Source Example: OpenVibeCoding
OpenVibeCoding is an open-source Vibe Coding platform built on CloudBase that fully implements the core architecture described in this solution. You can use it as a foundation to quickly build your own Vibe Coding platform.
Project Overview
OpenVibeCoding is forked from Vercel's coding-agent-template and has been extensively restructured:
| Dimension | Upstream (Vercel) | OpenVibeCoding (CloudBase) |
|---|---|---|
| Architecture | Next.js full-stack | Monorepo with separated frontend/backend (React + Vite / Hono) |
| Deployment | Vercel | Tencent CloudBase |
| Sandbox | Vercel Sandbox | CloudBase SCF (Serverless containers) |
| Multi-tenancy | None | One tenant per environment, CAM policy isolation |
Implemented Features
Agent Runtime (see Agent Runtime)
- Multi-model support: Built-in GLM, DeepSeek, Kimi, MiniMax, etc., unified through CodeBuddy SDK with dynamic switching
- Agent Loop: Complete cycle of prompt orchestration → LLM call → Tool Calls parsing → tool execution → result feedback
- Session management: Conversation history persisted to CloudBase Database (
vibe_agent_messagescollection), with cross-device recovery - ACP protocol: Agent Communication Protocol based on JSON-RPC 2.0, with SSE streaming to the frontend (text, thinking, tool calls, artifacts, etc.)
- Scheduled tasks: Cron expression-based scheduled Agent tasks with distributed lock-based multi-instance safe scheduling
Sandbox (see Agent Runtime - Sandbox)
- SCF container sandbox: Isolated containers based on CloudBase Cloud Functions (SCF), per-conversation or shared instances
- Full programming capabilities: File read/write (e2b-compatible), Bash execution, Git operations
- MCP tool proxy: CloudBase MCP Server runs inside the sandbox, dynamically registering tools for database CRUD, function deployment, storage management, domain configuration, etc.
- Workspace persistence: Workspace changes pushed to remote Git repository via Git Archive, organized by envId/conversationId branch directories
- Lifecycle management: Complete flow of create/reuse/health check/credential injection/archive
App Backend (see App Backend & Hosting)
- CloudBase Database: Agent can automatically create collections, insert data, and execute SQL via MCP tools
- Cloud Function deployment: Supports both code packages and container image deployment, with automatic HTTP route configuration
- Static hosting: One-click deployment of Agent build output to CDN-accelerated static hosting
- Cloud Storage operations: File upload/download/delete, supports static hosting deployment
- Web deployment artifacts: Automatically generates access links on successful deployment, pushed to frontend as Artifact events
- Mini Program deployment: Supports WeChat Mini Program CI build and publishing, returns preview QR codes
Tenant Isolation (see Multi-tenant Architecture)
- Two isolation modes:
sharedmode: All users share one CloudBase support environment (suitable for quick trials)isolatedmode: Each user automatically gets an independent CloudBase environment + CAM sub-user (suitable for production)
- Credential isolation: System-level secrets are used only for support environment operations; user-level operations use STS-issued temporary credentials scoped to the user's own envId
- Temporary credential management: 2-hour validity, auto-refresh 5 minutes before expiry, in-memory caching
Security & Administration
- Controlled trust boundaries: Agent Loop holds credentials, Sandbox has no platform-level secrets, all sensitive data encrypted with AES-256-CBC
- Multiple auth methods: Local username/password, GitHub OAuth, CloudBase identity source, API Key (Bearer
sak_xxx) - Admin dashboard: User management (create/disable/role assignment), task inspection, environment overview, resource proxy access, audit logging
Tech Stack
| Layer | Technology |
|---|---|
| Frontend | React 19 + Vite + Tailwind CSS 4 + shadcn/ui + Jotai |
| Backend | Hono + Node.js + Drizzle ORM |
| Database | CloudBase Document DB (primary) / SQLite (local fallback) |
| AI | CodeBuddy SDK (@tencent-ai/agent-sdk) + MCP |
| Sandbox | CloudBase SCF + TCR container images |
| Auth | JWE Session + bcrypt + Arctic (OAuth) |
Quick Start
# Clone the project
git clone https://github.com/TencentCloudBase/OpenVibeCoding.git
cd OpenVibeCoding
# One-click initialization (interactive setup for CloudBase, CodeBuddy, TCR, etc.)
./init.sh
# Start development environment
pnpm dev
The initialization flow sequentially completes: Node.js check → pnpm installation → environment variable configuration → CloudBase environment binding → CodeBuddy authentication → TCR image repository setup → database initialization.
For detailed deployment instructions, see the Setup documentation.