Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.avocadostudio.dev/llms.txt

Use this file to discover all available pages before exploring further.

Architecture overview

ComponentNetlify productNotes
Site (apps/site)Netlify SitesNext.js via @netlify/plugin-nextjs
Content Studio (apps/editor)Netlify SitesStatic Vite build
Orchestrator (apps/orchestrator)External hostLong-running Fastify server — deploy on Render, Fly, Railway, or any container host
The orchestrator is a long-running stateful server and cannot run as a Netlify Function. Deploy it on a platform that supports persistent processes.
Deploy apps/site as a standalone Next.js site serving published content.

Netlify project setup

  1. Connect your repository to Netlify
  2. Configure build settings:
    • Base directory: apps/site
    • Build command: cd ../.. && pnpm install --frozen-lockfile && pnpm --filter @ai-site-editor/site build
    • Publish directory: apps/site/.next
  3. Install the Next.js plugin: add @netlify/plugin-nextjs via the Netlify UI or netlify.toml

netlify.toml (in repo root)

[build]
  base = "apps/site"
  command = "cd ../.. && pnpm install --frozen-lockfile && pnpm --filter @ai-site-editor/site build"
  publish = ".next"

[[plugins]]
  package = "@netlify/plugin-nextjs"

Environment variables (Phase 1)

VariableValueRequired
NODE_VERSION22Yes
ORCHESTRATOR_URL(leave unset)No
In Phase 1, the site renders from published content only — no orchestrator needed.

Phase 2: Full editing stack

Deploy the Content Studio

Create a separate Netlify site for apps/editor:
  • Base directory: apps/editor
  • Build command: cd ../.. && pnpm install --frozen-lockfile && pnpm --filter @ai-site-editor/editor build
  • Publish directory: apps/editor/dist

Content Studio environment variables

VariableValue
VITE_SITE_ORIGINhttps://<your-site>.netlify.app (no trailing slash)
VITE_ORCHESTRATOR_URLhttps://<your-orchestrator-host>
VITE_SITE_DRAFT_SECRETShared secret (must match site’s DRAFT_MODE_SECRET)

Deploy the orchestrator (external host)

The orchestrator requires a long-running process. Deploy on Render, Fly.io, Railway, or any container platform. See the Vercel deployment guide for Render-specific instructions.

Site environment variables (Phase 2)

VariableValue
ORCHESTRATOR_URLhttps://<your-orchestrator-host>
NEXT_PUBLIC_ENABLE_EDITOR1
NEXT_PUBLIC_EDITOR_ORIGINhttps://<your-editor>.netlify.app (no trailing slash)
DRAFT_MODE_SECRETShared secret (must match Content Studio’s VITE_SITE_DRAFT_SECRET)

Other platforms

Deployment guides for the following platforms are planned:
  • AWS Amplify — Next.js hosting + Lambda for orchestrator
  • Google Cloud Run — Container-based deployment for all three services
  • Docker Compose — Self-hosted deployment on any server
Contributions welcome! See the contributing guide.

Troubleshooting

See the production troubleshooting section — the same postMessage, CORS, and draft mode issues apply regardless of hosting platform.