Skip to main content

Prerequisites

Before you begin, ensure you have the following installed:
  • Node.js 18+ and npm
  • Go 1.21+ (for protobuf tooling)
  • Git
  • Make (optional, for Makefile commands)

Clone the Repository

git clone https://github.com/koala73/worldmonitor.git
cd worldmonitor

Install Dependencies

make install
This single command installs:
  • Buf CLI for protobuf management
  • Sebuf protoc plugins (TypeScript client/server generators)
  • npm dependencies
  • Playwright browsers for E2E tests
  • Proto dependencies

Option 2: Manual Installation

If you prefer granular control:
# Install buf CLI
make install-buf

# Install sebuf protoc plugins
make install-plugins

# Install npm dependencies
npm install

# Install Playwright browsers
npm run playwright install chromium

# Install proto dependencies
make deps

Environment Configuration

  1. Copy the example environment file:
cp .env.example .env.local
  1. Configure API keys for the features you want to enable:
# Groq API (primary — 14,400 req/day on free tier)
GROQ_API_KEY=your_key_here

# OpenRouter API (fallback — 50 req/day on free tier)
OPENROUTER_API_KEY=your_key_here
# Upstash Redis for cross-user cache
UPSTASH_REDIS_REST_URL=your_url_here
UPSTASH_REDIS_REST_TOKEN=your_token_here
# Stock quotes
FINNHUB_API_KEY=your_key_here

# Oil prices and energy data
EIA_API_KEY=your_key_here

# Federal Reserve economic data
FRED_API_KEY=your_key_here
# Conflict and protest data
ACLED_ACCESS_TOKEN=your_token_here

# Aircraft enrichment
WINGBITS_API_KEY=your_key_here

# Internet outages
CLOUDFLARE_API_TOKEN=your_token_here

# Satellite fire detection
NASA_FIRMS_API_KEY=your_key_here
All API keys are optional. The dashboard works without them, but corresponding features will be disabled.

Generate Code from Protos

World Monitor uses a proto-first API design. Generate TypeScript clients and servers:
make generate
This command:
  1. Cleans previous generated code
  2. Generates TypeScript client code to src/generated/client/
  3. Generates TypeScript server code to src/generated/server/
  4. Generates OpenAPI v3 documentation to docs/api/

First Run

Development Server (Web)

Start the development server with hot module replacement:
npm run dev
The dashboard will be available at:

Desktop Application (Tauri)

Run the desktop app with DevTools enabled:
npm run desktop:dev
This command:
  1. Syncs version numbers between package.json and Tauri config
  2. Builds the sidecar sebuf gateway
  3. Launches the Tauri app with the devtools feature flag
The desktop app runs a local Node.js sidecar that handles all API requests. It auto-discovers available Ollama models and stores API keys in your OS keychain.

Verify Installation

Open http://localhost:3000 and check:
  1. Map loads — You should see the 3D globe with base layers
  2. News panel populates — RSS feeds should load within 3-5 seconds
  3. No console errors — Open DevTools (F12) and check for errors

Development Workflow

Typical development cycle:
# 1. Make changes to source code
vim src/components/NewsPanel.ts

# 2. Vite hot-reloads automatically (no restart needed)
# Watch the browser refresh

# 3. If you modify proto files:
make generate

# 4. Type-check before committing:
npm run typecheck

# 5. Run E2E tests:
npm run test:e2e:full

Common Issues

Install buf CLI:
make install-buf
Or manually:
go install github.com/bufbuild/buf/cmd/[email protected]
Install sebuf plugins:
make install-plugins
Ensure ~/go/bin is in your $PATH.
Kill the existing process or change the port in vite.config.ts:
server: {
  port: 3001, // Change this
}
Check your network connection. MapTiler CDN requires internet access. If you’re behind a corporate proxy, configure it:
export HTTP_PROXY=http://proxy.company.com:8080
export HTTPS_PROXY=http://proxy.company.com:8080

Next Steps

Architecture

Understand the system design and tech stack

Proto API

Learn the proto-first API workflow

Building

Build for production and desktop

Testing

Run E2E, API, and regression tests

Build docs developers (and LLMs) love