Skip to content

cleverfranke/v0-sandbox-kit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

v0-sandbox-kit

A portable, additive kit that makes this branch renderable in Vercel's v0 preview without changing any app code. The app's apps/client config is left byte-for-byte untouched; the kit is a separate Vite config overlay plus a launcher script. Everything the kit changes lives only in v0's ephemeral sandbox — nothing is meant to be committed back (see Danger zone).

Background

This is an experiment to help design researchers quickly prototype on top of the Boeing Aerospace Safety Timeline using v0, Vercel's platform for branching a GitHub project and using a coding agent to create, modify, and preview a web application.

The Timeline lives as a pnpm monorepo with its own pipeline, registry, and build structure, which conflicts with v0's environment in several ways (host checks, unbuilt workspace packages, a private package registry, an unreachable backend). The kit resolves each of these conflicts so the client runs in the v0 preview with synthetic mock data, producing a sandbox that stays ~95% visually faithful to the real app.

The workflow has three layers:

  1. Base — the latest main of the boeing-kg repository.
  2. Branch — starting a chat in v0 creates a branch on top of it.
  3. Kit — drop this folder into the branch, run one command, and prototype your design ideas through the chat.
image

How to use it in v0

  1. In v0, create a new branch from the boeing-kg-client project.

  2. Download this repository's folder and drop it into the root directory of the branch, in code-editor mode (so it sits at <repo root>/v0-sandbox-kit/).

  3. Paste this single command into the v0 terminal and hit enter:

    printf 'registry=https://registry.npmjs.org/\nshamefully-hoist=true\nauto-install-peers=true\n' > .npmrc && rm -rf node_modules pnpm-lock.yaml && pnpm install && bash v0-sandbox-kit/start-v0.sh
  4. When Vite reports ready, click refresh in the Preview. The app should be running.

What the command does (and why)

Step Purpose
rewrite .npmrc The repo's registry points at the corporate Artifactory, unreachable from v0's sandbox (ERR_SOCKET_TIMEOUT). This repoints installs at the public npm registry, for every process in the sandbox — including v0's own auto-installer. The shamefully-hoist / auto-install-peers lines replicate the hoisted layout v0's auto-install uses; without them, panda codegen fails with Could not resolve "@pandacss/dev".
rm -rf node_modules pnpm-lock.yaml The committed lockfile hard-codes Artifactory tarball URLs, which pnpm obeys verbatim regardless of registry settings — it must go. Wiping node_modules avoids the interactive "modules were installed with different settings" prompt, keeping the command fully non-interactive.
pnpm install Fresh resolution against the public registry.
start-v0.sh Frees :3000 (killing v0's default server), regenerates Panda's styled-system, and relaunches Vite there with the overlay config.

⚠️ Danger zone

Never merge this branch — and never let its setup commits reach a shared branch.

The command deliberately rewrites two tracked files as sandbox-only surgery: .npmrc (corporate registry replaced with the public one) and pnpm-lock.yaml (deleted and regenerated with public-registry URLs). If those changes reach the real repo, installs break for everyone on the corporate network.

About

An additive kit for boeing-kg-client to run on v0 for prototyping purpose.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors