Visitar URL original
graph-sitter/site at develop · codegen-sh/graph-sitter · GitHub
Skip to content
This repository was archived by the owner on Jul 17, 2026. It is now read-only.

Latest commit

 

History

History

site

README.md

Graph-sitter Site

Next.js landing page and docs app for the Vercel project that will own the Graph-sitter public site after review. The app renders documentation from ../docs.

The first screen explains the product, and the /docs routes statically render the MD/MDX documentation tree. Navigation is derived by site/lib/docs.ts, so docs changes should be validated with the site build.

Prerequisites

  • Node.js 22 or newer.
  • npm, using the checked-in package-lock.json.
  • Vercel CLI for preview deploys: npm i -g vercel, or an existing global vercel binary.

If the active Node install fails locally, prefer a Node 22 runtime from nvm or another version manager before running build or Vercel commands:

export PATH="$HOME/.nvm/versions/node/v22.19.0/bin:$PATH"

Local Development

cd site
npm ci
npm run dev

Open the printed localhost URL.

Build Check

cd site
npm run build

For a Vercel-shaped local build without deploying:

export PATH="$HOME/.nvm/versions/node/v22.19.0/bin:$PATH"
npx vercel pull --cwd site --environment=preview --yes
npx vercel build --cwd site

Vercel Preview Deploy

The lowest-risk setup is a dedicated Vercel project whose root directory is site.

Recommended project settings:

Framework Preset: Next.js
Root Directory: site
Build Command: checked in via `site/vercel.json`
Output Directory: default
Install Command: default
Ignored Build Step: node scripts/ignore-build.mjs
Production Branch: the integrator-approved trunk branch

The Vercel build command is checked in via site/vercel.json. Preview builds set GRAPH_SITTER_PRERENDER_DOCS=0, so the docs route renders pages on demand instead of prerendering every MD/MDX page during deployment. Production and local npm run build builds still prerender the full docs tree.

The ignored build step is also checked in via site/vercel.json. It skips Vercel builds when a commit does not change site/ or docs/, using VERCEL_GIT_PREVIOUS_SHA when Vercel exposes system environment variables and falling back to HEAD^ otherwise.

From an authenticated Vercel CLI session:

export PATH="$HOME/.nvm/versions/node/v22.19.0/bin:$PATH"
npx vercel whoami
npx vercel link --cwd site
npx vercel pull --cwd site --environment=preview --yes
npx vercel deploy --cwd site --yes

This creates a preview deployment. Do not pass --prod, attach graph-sitter.com, or attach www.graph-sitter.com until the integrator approves the docs-domain cutover.

If the Vercel project is already linked and you are running from the repository root, this equivalent command keeps the deployment scoped to the landing app:

npx vercel pull --cwd site --environment=preview --yes
npx vercel deploy --cwd site --yes

For a prebuilt preview deployment:

npx vercel pull --cwd site --environment=preview --yes
npx vercel build --cwd site
npx vercel deploy --cwd site --prebuilt --yes

Vercel should use Node.js 22.x. No runtime environment variables are required for the current static landing/docs app.

Production Cutover Sequence

  1. Review a Vercel preview deployment for site/.
  2. Confirm /docs renders the expected setup, CLI, benchmark, correctness, and API pages.
  3. Attach the approved production domains only after explicit approval.