twearth

地球環境・偏西風・海水温・地震・火山・雷・宇宙天気をリアルタイム可視化し、相関分析・自治体ランキング・AI/MCP連携を提供するデスクトップアプリケーション。TWSNMPシリーズプロジェクト。

View on GitHub

twearth 🌍⚡

twearth (TWSNMP Earth) is a cross-platform desktop and mobile application for real-time monitoring, visualization, and statistical/AI analysis of global and local natural environment data—including weather, jet streams, sea surface temperatures, earthquakes, volcanoes, lightning, river levels, and space weather—with no user registration or API keys required. Built with Wails v3, Svelte 5, and Go. Part of the TWSNMP project family.

🇯🇵 日本語版 README はこちら


🗺️ System Workflow & Architecture

twearth System Workflow & Architecture

twearth integrates open environmental data collection (Open-Meteo, JMA, P2PQuake, USGS, NOAA SWPC, MLIT, GSI) with local bbolt time-series storage, MapLibre + p5.js + ECharts visualization, statistical correlation & regional ranking engines, and local/cloud AI + MCP server integration.


✨ Key Features


🖥️ User Interface & Operation Guide

twearth provides a unified main workspace on desktop with detachable multi-window panels and a touch-friendly tabbed layout on mobile.

1. Main Map & Live Dashboard

Main Map & Dashboard

2. Multi-Location & Time-Series Charts

Multi-Location & Charts

3. Synoptic, Space Weather & Marine SST Monitor

Synoptic Pressure & Upper-Air Marine & Synoptic Monitor

4. Event & Alert History (Earthquake, Volcano & Hazard Log)

Event & Alert History

5. Correlation Analysis, Discovery & Regional Ranking

Correlation Analysis

Regional Ranking

6. AI Assistant & Local Model Manager

AI Assistant

7. Settings & Multi-Window Controls

Settings


📡 Data Sources (No API Keys Required)

Category Provider / Source Data Collected
Weather & Upper-Air Open-Meteo Forecast API Surface/MSL pressure, temp, humidity, precipitation, CAPE, 250 hPa & 500 hPa wind/geopotential grids
Air Quality Open-Meteo Air Quality API PM2.5, PM10, dust, UV index
Marine & SST Open-Meteo Marine API Sea surface temperature (SST), wave height, ocean current velocity & direction
Earthquakes & Tsunami P2PQuake API v2 / JMA / USGS Real-time WebSocket hypocenter/intensity, tsunami forecasts, global M4.5+ earthquakes
Site Amplification NIED J-SHIS Surface ground amplification factor & geomorphologic classification
Volcanoes JMA Volcano JSON / XML Active volcano list, eruption warning levels, eruption & ashfall bulletins
Lightning & Radar JMA LIDEN / Nowcast / Kikikuru Lightning strikes, precipitation radar, landslide/inundation/flood risk tiles
Rivers & Lore MLIT / GSI River water levels, GSI base/hazard tiles, natural disaster lore monuments
Space Weather NOAA SWPC Planetary Kp-index (1m) & GOES primary X-ray flux (6h)

🔌 Local MCP Server Integration

Desktop builds include a local-only Model Context Protocol (MCP) server using Streamable HTTP (POST /mcp, GET /mcp, DELETE /mcp) bound strictly to 127.0.0.1:<port> (default port 18088, disabled by default) with loopback IP, Host, and Origin validation.

Exposed MCP Tools (25 Tools)


🛠️ Tech Stack

Component Technology
App Framework Wails v3 (Desktop & Mobile)
Backend Go 1.27 (GOEXPERIMENT=simd)
Frontend Svelte 5 (Runes) + TypeScript + Vite + Tailwind CSS
Mapping & Particles MapLibre GL JS + p5.js
Charts & Gauges Apache ECharts
Database bbolt (Embedded Key-Value Store)
AI / LLM github.com/mattn/tensai (Embedded GGUF) + langchaingo
Packaging macOS Universal PKG (Notarized), Windows ZIP / NSIS Installer, Linux tar.gz

🚀 Installation & Releases

Download Prebuilt Packages

Visit the Releases page to download binaries for your platform:


💻 Development Setup

Prerequisites

Setup & Run

# Install Go and Node.js via mise
mise install

# Install frontend dependencies
cd frontend
npm install
cd ..

# Run in development mode
mise run dev

# Run Go tests
mise run test

# Build desktop binary
mise run build

# Build, sign, and notarize macOS Universal release
mise run release-mac

🗄️ Data Directories

Configuration, cached time-series data, event logs, and the bbolt database are stored locally in the OS application config directory:

Platform Default Path
macOS ~/Library/Application Support/twearth/
Windows %APPDATA%\twearth\
Linux ~/.config/twearth/

📄 Specifications & License