2026-03-11 11:18:48 +08:00
|
|
|
# PolyWeather Pro
|
2026-02-05 19:52:02 +08:00
|
|
|
|
2026-03-11 11:18:48 +08:00
|
|
|
Production weather-intelligence stack for temperature settlement markets.
|
2026-03-03 00:06:19 +08:00
|
|
|
|
2026-03-11 11:18:48 +08:00
|
|
|
Official dashboard: [polyweather-pro.vercel.app](https://polyweather-pro.vercel.app/)
|
2026-03-06 19:10:05 +08:00
|
|
|
|
2026-03-12 03:18:07 +08:00
|
|
|
## Product Screenshots
|
|
|
|
|
|
|
|
|
|
### Global Dashboard
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
### City Analysis (Ankara)
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
2026-03-11 11:18:48 +08:00
|
|
|
## What This Project Does
|
2026-03-06 19:10:05 +08:00
|
|
|
|
2026-03-11 11:18:48 +08:00
|
|
|
- Aggregates weather observations and forecasts for monitored cities.
|
|
|
|
|
- Blends multi-model forecasts with DEB (Dynamic Error Balancing).
|
|
|
|
|
- Computes settlement-oriented probability buckets (mu-centered distribution).
|
|
|
|
|
- Maps model view to Polymarket read-only market data for mispricing/risk scan.
|
|
|
|
|
- Delivers the same core logic to web dashboard and Telegram bot.
|
2026-02-07 01:21:55 +08:00
|
|
|
|
2026-03-11 11:45:57 +08:00
|
|
|
## Overview Diagram
|
2026-02-27 01:58:29 +08:00
|
|
|
|
2026-03-11 11:18:48 +08:00
|
|
|
```mermaid
|
2026-03-11 11:45:57 +08:00
|
|
|
flowchart TD
|
|
|
|
|
A["PolyWeather Pro"]
|
|
|
|
|
|
|
|
|
|
subgraph DL["Data Layer"]
|
|
|
|
|
DL1["METAR (Aviation Weather / METAR)"]
|
|
|
|
|
DL2["MGM (Turkey MGM)"]
|
|
|
|
|
DL3["Station 17130 (Ankara Center 17130)"]
|
|
|
|
|
DL4["Open-Meteo"]
|
|
|
|
|
DL5["weather.gov (US cities)"]
|
|
|
|
|
DL6["Polymarket (P0 Read-only)"]
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
subgraph AL["Analysis Layer"]
|
|
|
|
|
AL1["DEB (Dynamic Error Balancing)"]
|
|
|
|
|
AL2["Probability Engine (mu + buckets)"]
|
|
|
|
|
AL3["Trend Engine"]
|
|
|
|
|
AL4["Risk Profiles"]
|
|
|
|
|
AL5["Mispricing Radar"]
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
subgraph DEL["Delivery Layer"]
|
|
|
|
|
DEL1["FastAPI"]
|
|
|
|
|
DEL2["Next.js Dashboard"]
|
|
|
|
|
DEL3["Telegram Bot"]
|
|
|
|
|
DEL4["Alert Push"]
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
subgraph OL["Ops Layer"]
|
|
|
|
|
OL1["Docker Compose (VPS backend + bot)"]
|
|
|
|
|
OL2["Vercel (frontend)"]
|
|
|
|
|
OL3["Cache + force_refresh"]
|
|
|
|
|
OL4["Speed Insights"]
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
A --> DL
|
|
|
|
|
A --> AL
|
|
|
|
|
A --> DEL
|
|
|
|
|
A --> OL
|
2026-03-11 11:18:48 +08:00
|
|
|
```
|
2026-03-01 19:17:27 +08:00
|
|
|
|
2026-03-11 11:18:48 +08:00
|
|
|
## Architecture
|
2026-03-01 19:17:27 +08:00
|
|
|
|
2026-03-11 11:18:48 +08:00
|
|
|
```mermaid
|
|
|
|
|
graph TD
|
|
|
|
|
User[Web / Telegram User] --> FE[Next.js Frontend on Vercel]
|
|
|
|
|
User --> Bot[Telegram Bot on VPS]
|
|
|
|
|
FE --> API[FastAPI Service]
|
|
|
|
|
Bot --> API
|
|
|
|
|
|
|
|
|
|
API --> WX[Weather Data Collector]
|
|
|
|
|
WX --> METAR[METAR / Aviation Weather]
|
|
|
|
|
WX --> MGM[MGM API / nearby stations]
|
|
|
|
|
WX --> OM[Open-Meteo]
|
|
|
|
|
WX --> NWS[weather.gov]
|
|
|
|
|
|
|
|
|
|
API --> DEB[DEB + Trend + Probability Engines]
|
|
|
|
|
API --> PM[Polymarket Read-only Layer]
|
|
|
|
|
PM --> Gamma[Gamma API]
|
|
|
|
|
PM --> CLOB[CLOB / py-clob-client]
|
|
|
|
|
```
|
2026-02-27 01:58:29 +08:00
|
|
|
|
2026-03-11 11:18:48 +08:00
|
|
|
## Current Source Policy
|
2026-02-27 01:58:29 +08:00
|
|
|
|
2026-03-11 11:24:41 +08:00
|
|
|
| Domain | Source Policy |
|
|
|
|
|
| :------------------ | :--------------------------------------------------- |
|
|
|
|
|
| Primary observation | Aviation Weather / METAR |
|
|
|
|
|
| Ankara enhancement | MGM + nearby stations, lead station fixed to `17130` |
|
|
|
|
|
| Forecast baseline | Open-Meteo |
|
|
|
|
|
| US official context | weather.gov |
|
|
|
|
|
| Market layer | Polymarket P0 read-only discovery + quotes |
|
|
|
|
|
| Removed source | Meteoblue (fully removed from code and docs) |
|
2026-02-27 01:58:29 +08:00
|
|
|
|
2026-03-11 11:18:48 +08:00
|
|
|
## Recent Changes (2026-03-11)
|
2026-02-27 01:58:29 +08:00
|
|
|
|
2026-03-11 11:18:48 +08:00
|
|
|
- Removed all Meteoblue API integration and references.
|
|
|
|
|
- Fixed market top-bucket rendering path by deduplicating repeated temperature buckets.
|
|
|
|
|
- Added frontend fallback guard when market top buckets collapse to low-quality duplicates.
|
|
|
|
|
- Fixed detail panel accessibility issue (`aria-hidden` focus conflict) using `inert` + active-element blur.
|
|
|
|
|
- Added Vercel Speed Insights integration in `frontend/app/layout.tsx`.
|
2026-02-27 14:36:36 +08:00
|
|
|
|
2026-03-11 11:18:48 +08:00
|
|
|
## Repositories and Runtime Paths
|
2026-03-09 04:41:24 +08:00
|
|
|
|
2026-03-11 11:18:48 +08:00
|
|
|
- Frontend: `frontend/` (Next.js App Router)
|
|
|
|
|
- Backend API: `web/app.py` and `src/`
|
|
|
|
|
- Telegram runtime: `bot_listener.py` + `src/analysis/*`
|
|
|
|
|
- Docs: `docs/`
|
2026-03-09 04:41:24 +08:00
|
|
|
|
2026-03-11 11:18:48 +08:00
|
|
|
## Quick Start
|
2026-03-09 04:41:24 +08:00
|
|
|
|
2026-03-11 11:18:48 +08:00
|
|
|
### Backend + Bot (VPS / Docker)
|
2026-02-27 14:36:36 +08:00
|
|
|
|
2026-03-11 11:18:48 +08:00
|
|
|
```bash
|
|
|
|
|
docker compose up -d --build
|
2026-03-06 19:10:05 +08:00
|
|
|
```
|
2026-02-27 14:36:36 +08:00
|
|
|
|
2026-03-11 11:18:48 +08:00
|
|
|
### Frontend (local)
|
2026-02-18 09:49:40 +08:00
|
|
|
|
2026-03-06 19:16:48 +08:00
|
|
|
```bash
|
2026-03-11 11:18:48 +08:00
|
|
|
cd frontend
|
|
|
|
|
npm install
|
|
|
|
|
npm run dev
|
2026-02-07 01:21:55 +08:00
|
|
|
```
|
|
|
|
|
|
2026-03-11 11:18:48 +08:00
|
|
|
### Frontend production build check
|
2026-02-06 20:16:45 +08:00
|
|
|
|
2026-03-11 11:18:48 +08:00
|
|
|
```bash
|
|
|
|
|
cd frontend
|
|
|
|
|
npm run build
|
|
|
|
|
```
|
2026-03-04 03:06:40 +08:00
|
|
|
|
2026-03-11 11:18:48 +08:00
|
|
|
## Command Surface (Telegram)
|
2026-03-04 03:06:40 +08:00
|
|
|
|
2026-03-11 11:24:41 +08:00
|
|
|
| Command | Purpose |
|
|
|
|
|
| :------------- | :---------------------------- |
|
|
|
|
|
| `/city <name>` | City real-time analysis |
|
|
|
|
|
| `/deb <name>` | DEB historical reconciliation |
|
|
|
|
|
| `/top` | User leaderboard |
|
|
|
|
|
| `/help` | Help and command usage |
|
2026-03-09 04:41:24 +08:00
|
|
|
|
2026-03-11 11:18:48 +08:00
|
|
|
## Documentation Index
|
2026-03-04 03:06:40 +08:00
|
|
|
|
2026-03-11 11:18:48 +08:00
|
|
|
- Chinese API guide: `docs/API_ZH.md`
|
|
|
|
|
- Commercial roadmap: `docs/COMMERCIALIZATION.md`
|
|
|
|
|
- Tech debt (EN): `docs/TECH_DEBT.md`
|
|
|
|
|
- Tech debt (ZH): `docs/TECH_DEBT_ZH.md`
|
|
|
|
|
- Chinese overview: `README_ZH.md`
|
2026-03-08 04:35:04 +08:00
|
|
|
|
2026-03-11 11:18:48 +08:00
|
|
|
## Status
|
2026-03-08 04:35:04 +08:00
|
|
|
|
2026-03-11 11:18:48 +08:00
|
|
|
- Version: `v1.3`
|
|
|
|
|
- Last Updated: `2026-03-11`
|
|
|
|
|
- Runtime: Stable (web + bot + market read-only layer in production)
|