PolyWeather Frontend
This directory is the only web frontend in production.
Production URL:
Stack
- Next.js App Router
- Tailwind CSS
- Lucide React
- shadcn/ui base layer
- Legacy dashboard shell loaded from
public/legacy/index.html
Production Model
- Vercel serves the web UI
- FastAPI on VPS serves API only
- The old FastAPI static website has been removed
Current request flow:
- Browser -> Vercel frontend
- Vercel route handlers -> FastAPI API
Local Development
cd frontend
cp .env.example .env.local
npm install
npm run dev
Default local URL:
Required Environment Variable
POLYWEATHER_API_BASE_URL=https://<your-fastapi-host>
Examples:
http://38.54.27.70:8000https://api.example.com
Route Handlers
Thin BFF routes currently exposed by Next:
GET /api/citiesGET /api/city/[name]GET /api/history/[name]
Vercel Deployment
- Import the repo into Vercel
- Set Root Directory to
frontend - Set
POLYWEATHER_API_BASE_URL - Deploy
Notes
- Backend CORS must allow
https://polyweather-pro.vercel.app - The page shell currently embeds the legacy dashboard HTML from
public/legacy/index.html - If you change files under
public/static, deploy to Vercel to make them live
Last updated: 2026-03-06