How does the Vibe coding template work?

HEAD
72aaac1feat(vibe-coding-platform): add AI Gateway app attribution headers (#1469)

how does the vibe coding template work? specifically, does it auto-start the dev server in the sandbox? is it next.js only?

Avatar of anthropic/claude-opus-4.6
Claude Opus 4.6
commented

Now I have a complete picture. Let me summarize the findings.


##How the Vibe Coding Template Works

There are actually two separate implementations in the repo:

###1. apps/vibe-coding-platform — The Next.js-based "Vibe Coding Agent"

###2. python/vibe-coding-ide — A Python+Next.js full IDE with multi-framework templates


###Does it auto-start the dev server in the sandbox?

No, the dev server is NOT auto-started. In both implementations, starting the dev server is an explicit step performed by the AI agent as part of its workflow — it is never triggered automatically by sandbox creation.

Here's the workflow from the Next.js platform system prompt (app/api/chat/prompt.md, lines 118–127):

1. Create the sandbox, ensuring exposed ports are specified as needed.
2. Generate the initial set of application files according to the user's requirements.
3. Install dependencies with pnpm install
4. Start the dev server with pnpm run dev
5. IF ERRORS OCCUR: Fix them one by one until the server runs successfully
6. Retrieve a preview URL once the application is running successfully
7. Only then declare success to the user

The createSandbox tool (ai/tools/create-sandbox.ts) only calls Sandbox.create() with a timeout and ports — it does not run any commands. The dev server is started later via the runCommand tool (ai/tools/run-command.ts), which the LLM invokes as a separate step with wait: false (since it's a long-running process).

Similarly in the Python IDE, sandbox_create (backend/src/agent/tools/sandbox.py) creates the sandbox and syncs project files, but does not start a dev server. The agent must explicitly call sandbox_run with the appropriate command (e.g., pnpm run dev, uvicorn, etc.).

###Is it Next.js only?

No — but the two implementations differ in how framework-agnostic they are:

####apps/vibe-coding-platform (Next.js platform)

This one defaults to Next.js but is not locked to it. From the system prompt:

"Prefer using Next.js for all new projects unless the user explicitly requests otherwise."

The sandbox itself is a generic Amazon Linux 2023 container. There are no pre-baked templates — the AI generates all files from scratch. The test prompts in ai/constants.ts even include a Go example:

export const TEST_PROMPTS = [
  'Generate a Next.js app that allows to list and search Pokemons',
  'Create a `golang` server that responds with "Hello World" to any request',
]

So you can ask it to build anything, but its system prompt is heavily Next.js-optimized (with detailed rules about Next.js config naming, App Router structure, ESM/CJS, etc.).

####python/vibe-coding-ide (Python IDE)

This one has explicit multi-framework template support. From frontend/src/templates.ts and the frontend/templates/ directory, the available templates are:

TemplateType
nextNext.js
next_stackNext.js (stackable frontend)
reactReact + Vite
react_stackReact + Vite (stackable frontend)
expressExpress.js backend
fastapiFastAPI (Python) backend
flaskFlask (Python) backend
honoHono backend
react-fastapiFull-stack React + FastAPI
blankBlank project

It also supports stack composition — combining a frontend (next_stack or react_stack) with any backend (express, fastapi, flask, hono) into a single project via composeStack().

On top of that, the Python backend has synthetic runtime support for Ruby and Go — it bootstraps these languages on a Node base image at sandbox creation time (backend/src/sandbox/runtimes.py), and has auto-detection of readiness patterns for Go, Uvicorn/FastAPI, Rack/Sinatra, Rails, and more (backend/src/sandbox/command.py, infer_ready_patterns_and_port).

###TL;DR

Questionapps/vibe-coding-platformpython/vibe-coding-ide
Auto-starts dev server?No — the LLM agent runs pnpm dev as a separate tool call stepNo — the agent calls sandbox_run explicitly
Next.js only?Defaults to Next.js but the sandbox is generic Linux; you can request anythingMulti-framework with 10+ templates (Next.js, React, FastAPI, Flask, Express, Hono, Ruby, Go) and stack composition

END OF POST

How does the Vibe coding template work? — vercel/examples