Front-end dashboard built with Vite + React + TypeScript + Tailwind + Recharts for Open-Meteo data.
- Endpoint:
hourly.temperature_2m(timezone: Asia/Bangkok) - Features: interactive chart, statistics, data table, °C/°F toggle, caching, PWA support, ready to deploy on GitHub Pages.
- Create a Codespace for this repository.
- In the terminal:
npm install # or npm ci if you have package-lock.json npm run dev - Open port 5173 forwarded by Codespaces.
-
API URL is defined in src/config.ts (OPEN_METEO_URL).
-
Vite base path for GitHub Pages is set in vite.config.ts → base: "/Project-Weather/".
-
Go to Settings → Pages → Build and deployment, select GitHub Actions.
-
Push to the main branch — the deploy.yml workflow will automatically build and publish to Pages.
- Local cache duration: 10 minutes (localStorage) + Service Worker caching for last successful data (offline support).
- Customize the look & feel via Tailwind styles in src/index.css.