Tech Stack
Frontend
Backend (Serverless)
Desktop (Tauri)
AI & ML
Data Processing
Protobuf Tooling
System Architecture
High-Level Design
Proto-First API Flow
Desktop Architecture
Project Structure
Key Directories Explained
/proto
Contains all protocol buffer definitions organized by domain:
- 20 service domains: aviation, climate, conflict, cyber, displacement, economic, giving, infrastructure, intelligence, maritime, market, military, news, positive_events, prediction, research, seismology, supply_chain, trade
- buf.gen.yaml: Configures code generation plugins
- buf.yaml: Proto linting rules and dependencies
/src/generated
WARNING: Never edit files here manually. This directory is regenerated by make generate.
- client/: TypeScript RPC clients for frontend use
- server/: TypeScript server stubs for backend handlers
/server
Server-side handler implementations that fulfill the generated service interfaces:
/api
Vercel serverless functions. Most routes are handled by the catch-all:
/scripts
Build and utility scripts:
- build-sidecar-sebuf.mjs: Bundles the sidecar gateway for Tauri
- desktop-package.mjs: Creates signed installers for macOS/Windows
- ais-relay.cjs: Railway relay server for AIS/OpenSky/Telegram
- validate-rss-feeds.mjs: Tests all RSS feed URLs
/e2e
Playwright end-to-end tests:
- runtime-fetch.spec.ts: Tests all API endpoints across variants
- map-harness.spec.ts: Visual regression tests for map layers
- circuit-breaker-persistence.spec.ts: Circuit breaker behavior
- keyword-spike-flow.spec.ts: Keyword spike detection
Build Variants
World Monitor supports 4 build variants from a single codebase:
Variants are controlled by the
VITE_VARIANT environment variable.
Data Flow
News Aggregation
AI Summarization
Map Rendering Pipeline
Configuration Files
vite.config.ts
Configures:- Build variants with dynamic HTML meta injection
- Brotli pre-compression
- Service worker registration (PWA)
- Dev server plugins (sebuf, RSS proxy, Polymarket, YouTube)
- Chunk splitting strategy
playwright.config.ts
Configures:- Test directory:
./e2e - Base URL:
http://127.0.0.1:4173 - Browser: Chromium with SwiftShader (headless GPU)
- Retries: 0 (fail fast)
- Workers: 1 (serial execution)
tsconfig.json
TypeScript settings:- Target: ES2020
- Module: ESNext
- Strict mode enabled
- Path alias:
@/*→src/*
Makefile
Development commands:make install— Install all dependenciesmake generate— Generate code from protosmake lint— Lint proto filesmake clean— Remove generated code
Next Steps
Proto API
Learn the proto-first workflow
Building
Build for production and desktop