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-14 10:53:53 +08:00
|
|
|
## Product Status (2026-03)
|
|
|
|
|
|
|
|
|
|
- Subscription live: `Pro Monthly 5 USDC`.
|
|
|
|
|
- Points redemption live: `500 points = 1 USDC`, max `3 USDC` off.
|
|
|
|
|
- Onchain checkout live: Polygon contract checkout (USDC / USDC.e).
|
|
|
|
|
- Auto-reconciliation live: event listener + periodic confirm loop.
|
|
|
|
|
|
|
|
|
|
## Open-Core Boundary (Important)
|
|
|
|
|
|
|
|
|
|
This repository follows an **Open-Core** strategy:
|
|
|
|
|
|
|
|
|
|
- Public in repo: weather aggregation, core analysis, dashboard, bot baseline, standard payment flow.
|
|
|
|
|
- Private in production: commercial risk rules, operational thresholds, pricing strategy details, internal reconciliation policies, and growth operations tooling.
|
|
|
|
|
|
|
|
|
|
See: [Open-Core & Commercial Boundary](docs/OPEN_CORE_POLICY.md)
|
|
|
|
|
|
2026-03-12 12:01:29 +08:00
|
|
|
## Core Capabilities
|
2026-03-06 19:10:05 +08:00
|
|
|
|
2026-03-14 10:53:53 +08:00
|
|
|
- Aggregates observations and forecasts for 20 monitored cities.
|
2026-03-12 12:01:29 +08:00
|
|
|
- Uses DEB (Dynamic Error Balancing) to blend multi-model highs.
|
2026-03-14 10:53:53 +08:00
|
|
|
- Generates settlement-oriented probability buckets (`mu` + bucket distribution).
|
|
|
|
|
- Maps weather view to Polymarket quotes for mispricing scan.
|
|
|
|
|
- Reuses one analysis core across web dashboard and Telegram bot.
|
2026-02-07 01:21:55 +08:00
|
|
|
|
2026-03-14 10:53:53 +08:00
|
|
|
## Reference Architecture
|
2026-02-27 01:58:29 +08:00
|
|
|
|
2026-03-11 11:18:48 +08:00
|
|
|
```mermaid
|
2026-03-12 12:01:29 +08:00
|
|
|
flowchart LR
|
|
|
|
|
U["Users (Web / Telegram)"] --> FE["Next.js Frontend (Vercel)"]
|
|
|
|
|
U --> BOT["Telegram Bot (VPS)"]
|
|
|
|
|
FE --> API["FastAPI /web/app.py"]
|
|
|
|
|
BOT --> API
|
|
|
|
|
|
|
|
|
|
API --> WX["Weather Collector"]
|
|
|
|
|
WX --> METAR["Aviation Weather (METAR)"]
|
|
|
|
|
WX --> MGM["MGM (Turkey station network)"]
|
|
|
|
|
WX --> OM["Open-Meteo"]
|
2026-03-01 19:17:27 +08:00
|
|
|
|
2026-03-14 10:53:53 +08:00
|
|
|
API --> ANA["DEB + Trend + Probability + Market Scan"]
|
|
|
|
|
ANA --> PAY["Payment State (Intent + Event + Confirm Loop)"]
|
|
|
|
|
ANA --> PM["Polymarket Read-only Layer"]
|
2026-03-11 11:18:48 +08:00
|
|
|
```
|
2026-02-27 01:58:29 +08:00
|
|
|
|
2026-03-12 12:01:29 +08:00
|
|
|
## Monitored Cities (20)
|
|
|
|
|
|
|
|
|
|
- Europe / Middle East: Ankara, London, Paris, Munich
|
|
|
|
|
- APAC: Seoul, Hong Kong, Shanghai, Singapore, Tokyo, Wellington
|
|
|
|
|
- Americas: Toronto, New York, Chicago, Dallas, Miami, Atlanta, Seattle, Buenos Aires, Sao Paulo
|
|
|
|
|
- South Asia: Lucknow
|
|
|
|
|
|
2026-03-11 11:18:48 +08:00
|
|
|
## Quick Start
|
2026-03-09 04:41:24 +08:00
|
|
|
|
2026-03-12 12:01:29 +08:00
|
|
|
### Backend + Bot (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-14 10:53:53 +08:00
|
|
|
## Runtime Data (Recommended on VPS)
|
2026-02-06 20:16:45 +08:00
|
|
|
|
2026-03-14 10:53:53 +08:00
|
|
|
Use external runtime storage to avoid SQLite/git conflicts:
|
|
|
|
|
|
|
|
|
|
```env
|
|
|
|
|
POLYWEATHER_RUNTIME_DATA_DIR=/var/lib/polyweather
|
|
|
|
|
POLYWEATHER_DB_PATH=/var/lib/polyweather/polyweather.db
|
2026-03-11 11:18:48 +08:00
|
|
|
```
|
2026-03-04 03:06:40 +08:00
|
|
|
|
2026-03-12 12:01:29 +08:00
|
|
|
## Ops Verification
|
2026-03-12 10:43:31 +08:00
|
|
|
|
2026-03-14 10:53:53 +08:00
|
|
|
### Frontend cache headers
|
2026-03-12 10:43:31 +08:00
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
./scripts/validate_frontend_cache.sh "https://polyweather-pro.vercel.app"
|
|
|
|
|
```
|
|
|
|
|
|
2026-03-14 10:53:53 +08:00
|
|
|
### Payment auto-reconciliation logs
|
2026-03-12 10:43:31 +08:00
|
|
|
|
|
|
|
|
```bash
|
2026-03-14 10:53:53 +08:00
|
|
|
docker compose logs -f polyweather | egrep "payment event loop started|payment confirm loop started|payment auto-confirmed"
|
2026-03-12 10:43:31 +08:00
|
|
|
```
|
|
|
|
|
|
2026-03-14 10:53:53 +08:00
|
|
|
### Wallet activity logs
|
2026-03-12 12:01:29 +08:00
|
|
|
|
|
|
|
|
```bash
|
2026-03-14 10:53:53 +08:00
|
|
|
docker compose logs -f polyweather | egrep "polymarket wallet activity watcher started|wallet activity pushed"
|
2026-03-12 12:01:29 +08:00
|
|
|
```
|
|
|
|
|
|
2026-03-14 10:53:53 +08:00
|
|
|
## Telegram Commands
|
2026-03-12 12:01:29 +08:00
|
|
|
|
|
|
|
|
| Command | Purpose |
|
|
|
|
|
| :-- | :-- |
|
|
|
|
|
| `/city <name>` | City real-time analysis |
|
|
|
|
|
| `/deb <name>` | DEB historical reconciliation |
|
|
|
|
|
| `/top` | User leaderboard |
|
|
|
|
|
| `/id` | Show current chat ID |
|
2026-03-14 10:53:53 +08:00
|
|
|
| `/diag` | Startup diagnostics |
|
2026-03-12 12:01:29 +08:00
|
|
|
| `/help` | Help and 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-14 10:53:53 +08:00
|
|
|
- Chinese overview: [README_ZH.md](README_ZH.md)
|
|
|
|
|
- Chinese API guide: [docs/API_ZH.md](docs/API_ZH.md)
|
|
|
|
|
- Commercialization: [docs/COMMERCIALIZATION.md](docs/COMMERCIALIZATION.md)
|
|
|
|
|
- Open-Core policy: [docs/OPEN_CORE_POLICY.md](docs/OPEN_CORE_POLICY.md)
|
|
|
|
|
- Supabase setup (ZH): [docs/SUPABASE_SETUP_ZH.md](docs/SUPABASE_SETUP_ZH.md)
|
|
|
|
|
- Tech debt (EN): [docs/TECH_DEBT.md](docs/TECH_DEBT.md)
|
|
|
|
|
- Tech debt (ZH): [docs/TECH_DEBT_ZH.md](docs/TECH_DEBT_ZH.md)
|
|
|
|
|
- Payment verification: [docs/payments/POLYGONSCAN_VERIFY.md](docs/payments/POLYGONSCAN_VERIFY.md)
|
|
|
|
|
- Frontend report: [FRONTEND_REDESIGN_REPORT.md](FRONTEND_REDESIGN_REPORT.md)
|
2026-03-08 04:35:04 +08:00
|
|
|
|
2026-03-14 10:53:53 +08:00
|
|
|
## Version
|
2026-03-08 04:35:04 +08:00
|
|
|
|
2026-03-14 10:53:53 +08:00
|
|
|
- Version: `v1.4`
|
|
|
|
|
- Last Updated: `2026-03-14`
|