PolyWeather Frontend
Production frontend for PolyWeather Pro.
Production URL:
Stack
- Next.js App Router
- React + Tailwind
- Leaflet + Chart.js
- Supabase Auth
- WalletConnect + browser EVM wallets
Runtime Model
- Browser -> Next app (
frontend) - Next Route Handlers (
/api/*) -> FastAPI backend - FastAPI -> analysis/payment services
Local Development
cd frontend
cp .env.example .env.local
npm install
npm run dev
Required Environment Variables
POLYWEATHER_API_BASE_URL=https://<your-fastapi-host>
NEXT_PUBLIC_SUPABASE_URL=
NEXT_PUBLIC_SUPABASE_ANON_KEY=
POLYWEATHER_AUTH_ENABLED=true
POLYWEATHER_AUTH_REQUIRED=false
POLYWEATHER_BACKEND_ENTITLEMENT_TOKEN=
WalletConnect:
NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID=
NEXT_PUBLIC_WALLETCONNECT_POLYGON_RPC_URL=https://polygon-bor-rpc.publicnode.com
Overlay links:
NEXT_PUBLIC_TELEGRAM_GROUP_URL=https://t.me/<your_group>
Route Handlers
Weather:
GET /api/citiesGET /api/city/[name]GET /api/city/[name]/summaryGET /api/city/[name]/detailGET /api/history/[name]
Auth:
GET /api/auth/me
Payments:
GET /api/payments/configGET /api/payments/walletsPOST /api/payments/wallets/challengePOST /api/payments/wallets/verifyPOST /api/payments/intentsGET /api/payments/intents/[intentId]POST /api/payments/intents/[intentId]/submitPOST /api/payments/intents/[intentId]/confirm
Cache Behavior
cities/summary/history:ETag + Cache-Controlsummary?force_refresh=true:no-store- payment routes:
no-store
Open-Core Note
This frontend repo includes general product UI and standard payment UX. Commercial strategy tuning, private ops workflows, and sensitive production parameters are intentionally outside the public docs scope.
See root policy: docs/OPEN_CORE_POLICY.md
Last updated: 2026-03-14