Commit Graph
40 Commits
Author SHA1 Message Date
Silvertakana 8a8165eeea fix(camera): camera proxy display + iframe sandbox hardening (#194)
* fix(camera): fix camera stream not displaying — CSP frame-ancestors and HTTP SSRF block

- next.config.ts: add path-scoped header override for /api/camera/proxy/:path*
  setting frame-ancestors 'self' and X-Frame-Options SAMEORIGIN so proxy iframe
  responses are not blocked by the global frame-ancestors 'none' policy
- ssrf.ts: extend validateOrigin to accept http:// URLs; the stream proxy is a
  server-side bridge that must fetch plain-HTTP camera feeds before re-serving
  them over HTTPS to the browser to avoid mixed-content blocks
- ssrf.spec.ts: update validateOrigin tests to match new HTTP-allowed behaviour;
  add explicit rejection tests for ftp://, file://, data://, javascript://
- scripts/boot-db.mjs: create .env from .env.example in worktrees when missing
  so DATABASE_URL injection block is never silently skipped

* fix(camera): sandbox proxied iframes and unblock external stylesheets

The CSP override for /api/camera/proxy/:path* still inherited the app's
restrictive style-src/script-src, which blocked external stylesheets and
scripts inside proxied iframes (YouTube, third-party players, etc).
Relax proxy CSP to default-src * while keeping frame-ancestors 'self'.

Because the proxy iframe is same-origin with the host app, this widened
CSP would have let upstream HTML reach window.parent.localStorage / DOM.
Add sandbox="allow-scripts allow-popups allow-presentation" (no
allow-same-origin) to proxied iframes so they run in an opaque origin
and cannot touch the host app. Major-platform iframes (YouTube/Twitch/
Vimeo) bypass the proxy and remain unsandboxed since the browser already
isolates them via cross-origin.

- next.config.ts: proxy CSP -> default-src * 'unsafe-inline' 'unsafe-eval' data: blob:; frame-ancestors 'self'
- CameraStream.tsx: add sandbox attribute to proxied (non-major-platform) iframes
2026-05-26 16:43:24 +12:00
Antigravity AI 0ff1d23e4a chore(lint): clean up legacy linting errors and hallucinated rules 2026-05-17 20:04:13 +12:00
Antigravity AI c480bfdbd2 fix: add nz-traffic-cameras to transpilePackages 2026-05-10 21:34:06 +12:00
Antigravity AI 753071224e refactor: move nz-traffic-cameras out of monorepo to worldwideview-plugins 2026-05-10 20:39:17 +12:00
Antigravity AI 93504624ae build: integrate nz-traffic-cameras plugin into workspace 2026-05-10 20:27:36 +12:00
Antigravity AI ca17552d3d feat(plugin): Add FortiGuard threat map plugin 2026-05-10 20:15:11 +12:00
Antigravity AI 6a3b143614 feat(build): add healthcheck, fix cesuim spz-loader octal error, and remove sentry
- fix(build): Add pnpm override for @spz-loader/core to 0.3.0 to bypass Octal escape sequences error during build

- feat(healthcheck): Add /api/health endpoint and HEALTHCHECK directive to Dockerfile and docker-compose.yml for Coolify monitoring

- refactor(build): Remove Sentry config from next.config.ts to avoid webpack plugin conflicts with wasm compilation
2026-05-10 15:32:45 +12:00
Antigravity AI d8205e6c3a chore(cleanup): remove legacy SQLite migrations and fix webpack warnings
- chore: remove deprecated prisma/migrations_sqlite artifacts (Patch bump)

- fix(build): suppress false-positive webpack warnings for opentelemetry, sentry, and require-in-the-middle in next.config.ts (Patch bump)
2026-05-10 13:12:58 +12:00
Antigravity AI 400a6abe74 fix(build): disable Sentry webpack config to prevent octal escape syntax errors 2026-05-10 11:36:39 +12:00
Silvertakana c4207bd6e1 feat(core): migrate to Prisma 7 and unify PostgreSQL architecture (#56)
* feat(cloud): implement Postgres DB adapter, fix static build crashes, and containerize NextAuth/Stripe integrations

* test(marketplace): fix mocks and assertions for multi-tenant Postgres architecture

* feat: rsa jwt license key verification and state integration

* feat: add internal workspace validation route for Edge Functions

* refactor: clean up hub routes and finalize db proxy/adapter for multi-tenant cloud deploy

* feat(cloud): finalize multi-tenant Prisma extensions and workspace routing

* fix(db): correct Prisma 7 better-sqlite3 adapter initialization [Patch]

- update better-sqlite3 adapter instantiation to use configuration object ({ url }) required by Prisma 7 instead of raw Database instance [Patch]
- fix PrismaClientConstructorValidationError by generating client with adapter support [Patch]

* fix(auth): support dynamic origins for local proxies and multi-tenant subdomains [Patch]

- prioritize forwarded headers and request host over hardcoded envOrigin in getRequestOrigin to support subdomain routing [Patch]
- allow ALLOWED_DEV_ORIGIN in marketplace install redirect checks to fix local network development login flows [Patch]

* fix(marketplace): enable dynamic CORS reflection for marketplace API [Patch]

- remove explicit origin array, replacing with origin header reflection to allow marketplace hosted on any domain or local IP [Patch]

- remove global wildcard CORS headers from next.config.ts to harden security against broader app injection [Patch]

* feat(db): create initial postgresql migration

* refactor(db): update remaining files for postgresql

* feat(db): unify database adapter to PostgreSQL-only [Minor]

- replace SQLite adapter with PostgreSQL PrismaPg [Minor]
- remove better-sqlite3 dependencies [Patch]
- finalize docs and implementation plan [Patch]

* fix: resolve prisma client generation and script execution issues with tsx and type module

* feat(db): port tenant isolation logic to new PostgreSQL adapter

* docs: add rule for transparent and narrated agent actions

* BREAKING CHANGE(core): migrate to PostgreSQL and add auto-migration pipeline [Major]

- unified database adapter to exclusively use PostgreSQL [Major]
- implement auto-migration pipeline to pipe legacy SQLite data to Postgres [Major]
- add sqlite to runner stage to support extraction pipeline [Patch]

* feat(core): migrate to Prisma 7 and unify PostgreSQL architecture [Minor]

- removed legacy Prisma SQLite driver and all Better-Sqlite dependencies [Minor]
- updated schema to utilize purely postgresql providers [Patch]
- modified migration scripts to seamlessly convert local sqlite DBs to PostgreSQL containers using keinos/sqlite3 [Minor]
- updated deployment scripts, Coolify pipelines, and Nginx proxy support [Patch]
- injected Prisma Client Extensions for multi-tenant Row Level Security isolation [Minor]
- stabilized PrismaClient initialization utilizing the official adapter-pg runtime pattern [Patch]
- bumped version to 2.1.0

* fix(core): resolve TypeScript compilation errors for CI [Patch]

- fixed NextResponse.json() 3-arg calls to use 2-arg ResponseInit form [Patch]
- replaced invalid 'developer' TrustTier with 'unverified' in parseWwvManifest and load-unpacked route [Patch]
- removed non-existent pluginManager.hotReload() call in DevModeSubscriber, replaced with disable/reload cycle [Patch]
- updated Stripe API version from '2024-04-10' to '2026-04-22.dahlia' to match installed SDK [Patch]
- excluded local-scripts/ from tsconfig to prevent debug scripts from breaking CI [Patch]

* fix(ci): resolve pnpm version conflict in GitHub Actions [Patch]

- removed explicit version: 9 from pnpm/action-setup@v4 — v4 auto-reads packageManager from package.json [Patch]
- updated build job DATABASE_URL from SQLite to PostgreSQL format [Patch]

* fix(docker): add explicit Prisma generator output path for Docker builds [Patch]

- Prisma 7 changed default output location, causing COPY --from=builder to fail
- added output = '../src/generated/prisma' to generator block for consistency

* fix(prisma): update client import path and resolve CI type errors [Patch]

- updated PrismaClient import in db.ts to point to custom generated output path
- resolved implicit 'any' error in marketplace check-updates route
- verified clean local build with tsc --noEmit

* chore(deps): sync Prisma versions to 7.6.0 [Patch]
2026-05-09 22:44:30 +12:00
Antigravity AI 6e3a8ab625 fix(cors): allow permissive CORS and private network access 2026-05-09 09:55:16 +12:00
SilvertakanaandAntigravity AI 7354b414e7 fix: Enlarge panel pull tab trigger areas (#46)
* fix: enlarge panel pull tab trigger areas for better touch targets

* fix: extend trigger area further inward towards panels

* fix(globe): increase mobile pinch zoom sensitivity [Patch]

- decrease _zoomFactor to 5 to make pinch zooming more responsive on touch devices [Patch]
- conditionally allow dev origins in next config [Patch]

---------

Co-authored-by: Antigravity AI <[email protected]>
2026-04-29 23:59:52 +12:00
Antigravity AI 764af74d14 fix(core): resolve data engine routing and plugin validation errors [Patch]
- update hostGlobals to default to cloud URL and respect explicit engine env vars [Patch]
- fix Next.js CSP headers to allow dynamic CDN bundle loading from unpkg [Patch]
- add strict manifest validation handling and logging to plugin loader [Patch]
2026-04-18 20:58:13 +12:00
Antigravity AI ac95a64115 feat(plugins): implement marketplace updates and fix SDK global injection [Minor]
- add /check-updates mechanism to check with marketplace [Minor]
- inject zustand into WWV_HOST to prevent plugin crashes [Patch]
- fix next.config.ts sentry schema [Patch]
2026-04-18 13:39:46 +12:00
Antigravity AI 26970e6adc build: remove plugin packages from core workspace 2026-04-17 13:41:11 +12:00
Antigravity AI 055ead345a feat(config): remove legacy REST proxy, point plugins directly at engine
Remove /api/external/ rewrite from next.config.ts.
Update Aviation plugin fetch() to call engine REST API directly
using NEXT_PUBLIC_DEFAULT_ENGINE_URL.
2026-04-16 17:21:22 +12:00
Antigravity AI f3b48ac302 refactor(data-engine): extract wwv-data-engine into standalone repo [Minor]
- Bump version to 1.11.0 [Minor]
- Remove wwv-data-engine code, docker-compose and package.json scripts [Patch]
2026-04-16 15:13:59 +12:00
SilvertakanaandAntigravity AI 4951a2d047 feat(osm-search): implement OSM Search plugin with Bellingcat-style proximity (#21)
* feat(osm): setup plugin shell and state

* feat(osm): implement locking b-box overlay

* feat(api): overpass dumb proxy

* feat(osm): implement sidebar and search query builder

* feat(osm): register osm search plugin

* feat(osm-search): implement OSM Search plugin with Bellingcat-style proximity [Minor]

- implement @worldwideview/wwv-plugin-osm-search package [Minor]
- add Next.js proxy route for Overpass API with mirror fallback [Patch]
- implement real-time bounding box selection with dynamic updates [Patch]
- implement advanced proximity intersection mode using 'around' queries [Minor]
- fix core rendering issues (visibility, depth-test, eyeOffset) [Patch]
- refactor viewer initialization for instant plugin loading [Patch]
- align Cesium/Resium versions and fix JSDOM localStorage tests [Patch]

---------

Co-authored-by: Antigravity AI <[email protected]>
2026-04-15 17:04:05 +12:00
Antigravity AI 7684d23398 fix(deploy): fix Coolify Next.js env var inlining, CSP, and Analytics 2026-04-06 01:33:20 +12:00
Antigravity AI a5610f0c8d feat(core): plugin stability fixes, UI enhancements, and ad integration 2026-04-05 21:03:06 +12:00
Antigravity AI de60ed3ffe perf(build): optimize Next.js docker build memory limits 2026-04-05 12:21:50 +12:00
silvertakana 3deefc9607 fix(build): remove disabled mock plugins from transpilePackages 2026-04-04 10:03:16 +13:00
silvertakana 20363d509b feat(plugins): disable mock data plugins for live demo, bump to 1.2.0 2026-04-03 20:48:02 +13:00
silvertakana 3bc3b3461f feat(plugins): implement cyber attacks plugin and seeder 2026-04-03 17:36:14 +13:00
silvertakana c89b55884f chore: migrate data engine to port 5001 and expose via docker-compose 2026-04-02 11:49:21 +13:00
silvertakana 0808326967 feat: consolidate backends into dual-tier data engine 2026-04-01 22:43:58 +13:00
silvertakana a17aafa6f6 feat(deployment): prefix iranwarlive routes and shift internal port to 5001 2026-04-01 16:21:39 +13:00
silvertakana 18da3a492c fix(deployment): resolve backend port collision by proxying traffic through next.js rewrites 2026-04-01 15:49:55 +13:00
silvertakana 68d350572f fix: use Next.js-provided webpack instance instead of direct import 2026-04-01 14:36:42 +13:00
silvertakana 23d1538ea2 fix(globe): enable depth testing for airplanes to prevent rendering through globe 2026-03-28 18:27:52 +13:00
silvertakana d65600786f fix(docker): future-proof Prisma + Next.js standalone setup
- Add prisma package to serverExternalPackages in next.config.ts
- Replace manual node_modules cherry-picking with full production install
- Copy pre-built node_modules from deps stage and prune dev dependencies
- Ensures all Prisma CLI runtime dependencies are always available
2026-03-26 16:42:03 +13:00
silvertakana c3d9b2b536 feat: Introduce camera stream playback with mixed-content proxying and add a new volcanoes plugin. 2026-03-24 11:21:15 +13:00
silvertakana 25b19ec635 fix: update CSP headers to allow camera stream feeds from arbitrary origins
- Added http: https: to img-src for MJPEG camera streams and preview images
- Added http: https: to connect-src for HLS stream fetches
- Added media-src directive for video element sources
- Added frame-src directive for YouTube, Twitch, Vimeo, and other embed providers
- Fixes CSP violations that blocked camera plugin after npm plugin migration
2026-03-19 14:30:01 +13:00
silvertakana c0789f831c fix: externalize native modules and add prisma generate to Docker build 2026-03-18 23:11:16 +13:00
silvertakana 9312c40862 feat: Add core globe rendering and entity management, implement login actions, update CSP, and ignore agents directory. 2026-03-18 11:19:15 +13:00
silvertakana c656c86baa fix: JWT user binding (sub/iss/aud), CSP headers, token via URL fragment 2026-03-17 16:25:44 +13:00
silvertakana 7db1980e0f fix: prevent Docker build failure during Next.js build traces
- Remove CopyPlugin from next.config.ts (was copying Cesium assets during
  webpack build, causing Next.js to trace thousands of files and OOM/timeout)
- Add outputFileTracingExcludes for public/cesium/**
- Copy Cesium assets via copy-cesium.mjs after build in Dockerfile instead
2026-03-13 15:35:23 +13:00
silvertakana 62daafc4a0 chore: production disk sustainability - standalone output, remove fs cache 2026-03-08 19:29:54 +13:00
silvertakana f672efd1d2 feat: integrate CesiumJS for 3D globe visualization, adding core components, assets, and documentation. 2026-03-06 13:33:24 +13:00
silvertakana 37530ebd35 Initial commit 2026-03-04 17:43:11 +13:00