Files
worldwideview/docs/build-system.md
Antigravity AI 48a17bf3ee feat(sdk,docs): add vite static compiler export, overhaul documentation for plugin ecosystem [Minor]
- add wwvStaticCompiler to SDK vite/ subpath export [Minor]
- export createPluginContext and PluginContext type from SDK [Minor]
- update viteGlobals mapping for lucide-react [Patch]
- overhaul all docs/ for decoupled plugin development workflow [Minor]
- update README with new CLI-based plugin creation instructions [Minor]
- fix marketplace load route CORS and error handling [Patch]
- add test coverage for DeclarativePlugin edge cases [Patch]
- bump root to v1.18.0, SDK to v1.5.0
2026-04-23 10:19:17 +12:00

1.5 KiB

Build System

WorldWideView operates using a strict pnpm monorepo workspace to manage the core Next.js application alongside its surrounding plugin ecosystem.

The build relies heavily on Next.js standalone output tracing optimization, allowing minimal-footprint Docker images via Multi-stage resolution.

Key Files

  • pnpm-workspace.yaml: Governs the inclusion of packages/* elements.
  • next.config.ts (lines 10-45): Implements output: "standalone" and strict Content-Security-Policy headers.
  • Dockerfile (lines 1-110): Executes the multi-stage Extractor Pattern (deps → builder → runner).

Build Workflows

  • Dependency Install: pnpm install must be run from the root directory to respect strict workspace hoisting natively.
  • Development Proxy: pnpm dev triggers the frontend server locally with active HMR, while executing pre-build scripts like copy-cesium.mjs.
  • Plugin Compilation: Run pnpm -r build inside packages/worldwideview-plugins/ to trigger Vite bundle execution mapped to dist/frontend.mjs.

Platform Setup

  • Cesium Resources: Required assets (Workers, Assets, Widgets) are structurally bound into the public/cesium/ folder during the pre-build pipeline initialized by scripts/copy-cesium.mjs (lines 10-38).
  • SQLite Engine: prisma.config.ts must export native javascript objects (free of dev CLI wrappers) for Next.js to trace correctly in the final standalone Node build.