WorldWideView is structured as a pnpm monorepo. The primary application resides in the root src/ directory, while external dependencies, plugins, and the core Plugin SDK are abstracted into the packages/ directory.
The system is highly modularized to separate React UI rendering from heavy CesiumJS 3D operations and high-frequency real-time WebSocket state management.
src/app/- The Next.js App Router entry points. Containslayout.tsx(the core React shell),page.tsx(the globe view), and/api/(server-side NextAuth and API handlers).src/core/plugins/PluginManager.ts- Central orchestration unit for dynamic plugins. Handles loading, lifecycle (initialize,destroy), and manifest resolution.src/core/globe/GlobeView.tsx- The primary CesiumJS container. It memoizes Zustand state to prevent heavy re-renders while injectingEntityRendererprimitives.src/core/data/DataBus.ts- Singleton pub/sub event bus handling all high-velocity WebSocket stream events without triggering React re-renders.src/core/state/store.ts- The primary Zustand state registry exporting all nine discrete slices (globe,layers,timeline,ui,filter,data,config,favorites,geojson).
src/core/plugins/loaders/InstalledPluginsLoader.ts- Platform-specific loader that dynamically injects ES module CDNs viaimport(/* webpackIgnore: true */).src/core/globe/hooks/useCameraActions.ts- Abstraction connecting React UI logic to raw CesiumJS camera math (flyTo, lookAt).src/lib/edition.ts- Platform edition configuration. Exposes runtime feature flags forlocal,cloud, anddemodeployments.
package.json- Root monorepo configuration withpnpmworkspace bindings.next.config.ts- Next.js compiler settings, security headers, and standalone output configuration.docker-compose.yml- Defines the orchestration of the frontend, Redis cache, and the generic data engine runner (wwv-data-engine) loaded with local seeders.
prisma/schema.prisma- PostgreSQL database schema for storing user settings and installed plugin manifests.scripts/copy-cesium.mjs- Crucial build-time script that extracts and copies CesiumJS static web workers topublic/cesium/.public/- Static assets, plugin icons, and compiled Cesium workers.
- Plugins Directory: All frontend plugins conform to the
@worldwideview/wwv-plugin-sdkinterface and are developed insidepackages/wwv-plugin-<name>/orlocal-plugins/<name>/. - Seeders Directory: Backend telemetry scripts are developed in the
local-seeders/community/<name>/orlocal-seeders/private/<name>/directories and are mounted directly into the data engine at runtime.