What Are Variants?
World Monitor uses a variant system that packages the same codebase with different configurations, data sources, and UI themes to create specialized dashboards for different use cases:| Variant | Domain | Focus Area |
|---|---|---|
| World Monitor (full) | worldmonitor.app | Geopolitics, military, conflicts, infrastructure |
| Tech Monitor | tech.worldmonitor.app | Startups, AI/ML, cloud, cybersecurity |
| Finance Monitor | finance.worldmonitor.app | Global markets, trading, central banks, Gulf FDI |
| Happy Monitor | happy.worldmonitor.app | Good news, positive trends, uplifting stories |
VITE_VARIANT environment variable.
How Variants Work
Build-Time Configuration
Variants are configured at build time via theVITE_VARIANT environment variable in vite.config.ts:
vite.config.ts
- SEO metadata: title, description, keywords, Open Graph tags
- URLs: canonical URL and live demo link
- Categories: PWA manifest categories (e.g.,
['news', 'productivity']) - Features: list of available features for the variant
Variant Metadata (vite.config.ts:40-144)
- World Monitor (full)
- Tech Monitor
- Finance Monitor
- Happy Monitor
Switching Between Variants
In Production (Web)
Each variant is deployed to its own subdomain. The header bar displays clickable links to other variants:worldmonitor.appβtech.worldmonitor.appfinance.worldmonitor.appβhappy.worldmonitor.app
In Desktop App
The desktop app (Tauri) allows in-app variant switching without navigating to a different URL:- Click any variant in the header bar (π World, π» Tech, π Finance)
- The app stores the selection in
localStorageasworldmonitor-variant - On next reload, the app loads the selected variant
src/config/variant.ts:1-12
In Development
Use npm scripts to launch specific variants:- World Monitor
- Tech Monitor
- Finance Monitor
- Happy Monitor
Building Variants
Production Builds
Each variant has its own build script inpackage.json:
- World Monitor
- Tech Monitor
- Finance Monitor
- Happy Monitor
Desktop Builds
Desktop apps are built with variant-specific Tauri configurations:- World Monitor
- Tech Monitor
- Finance Monitor
Variant-Specific Features
UI Theme Customization
The Happy Monitor variant uses a warm cream theme instead of the default dark theme:src/styles/happy-theme.css:9-100
data-variant attribute on the root element.
RSS Feed Selection
Each variant loads a curated set of RSS feeds:- World Monitor: 150+ geopolitical, defense, and energy feeds
- Tech Monitor: 100+ tech news, AI labs, startup, and cybersecurity feeds
- Finance Monitor: 120+ market news, trading, central bank, and economic feeds
- Happy Monitor: 40+ positive news, science breakthrough, and conservation feeds
Map Layers
Variants enable/disable map layers based on relevance:| Layer | World | Tech | Finance | Happy |
|---|---|---|---|---|
| Military bases | β | β | β | β |
| Nuclear facilities | β | β | β | β |
| Tech HQs | β | β | β | β |
| Datacenters | β | β | β | β |
| Stock exchanges | β | β | β | β |
| Central banks | β | β | β | β |
| Positive events | β | β | β | β |
Analytics & Tracking
Variant switches are tracked for analytics:src/services/analytics.ts:78,303
Next Steps
World Monitor
Full geopolitical intelligence variant
Tech Monitor
AI & tech industry variant
Finance Monitor
Markets & trading variant
Happy Monitor
Positive news variant