Web · Beginner

SkyCast: Live Weather Dashboard

Build a responsive dashboard that geolocates the user, fetches a live forecast API, and renders 7-day charts with loading and error states.

Beginner6-10 hoursTypeScript

SkyCast is a browser-based weather dashboard that uses the Geolocation API to detect the user's coordinates, then calls the free Open-Meteo forecast API to retrieve a 7-day hourly and daily forecast. You will render temperature, precipitation, and wind speed trends as interactive charts using Recharts, all inside a clean Tailwind-styled layout. This project gives you hands-on practice with async data fetching, component state management, and graceful loading and error handling, skills that appear in virtually every real-world frontend role.

What you build

  • Automatically geolocates the user on page load and requests coordinates via the browser Geolocation API
  • Fetches a live 7-day weather forecast from Open-Meteo with no API key required
  • Displays current conditions (temperature, wind speed, precipitation probability) in a summary card
  • Renders daily high/low temperature trends as a responsive line chart using Recharts
  • Shows precipitation probability as a bar chart across the forecast window
  • Handles loading skeleton states and user-friendly error messages when geolocation or the network fails
  • Supports manual city search as a fallback using Open-Meteo geocoding endpoint

What it teaches

  • Consuming a REST JSON API with TypeScript-typed fetch and handling async state (loading, error, success) in React
  • Using the browser Geolocation API and managing permission states in a custom hook
  • Rendering data-driven charts with Recharts including responsive containers, tooltips, and legends
  • Structuring a Vite and React project with a clean separation of hooks, lib utilities, and UI components
  • Applying Tailwind CSS utility classes to build a responsive multi-column dashboard layout
  • Writing robust error boundaries and user-facing error messages for network and permission failures

How it works

  1. 1

    Geolocation API

    • Browser requests lat/lon
    • User grants or denies permission
  2. 2

    Open-Meteo Fetch

    • GET /v1/forecast?latitude=...&longitude=...
    • Returns JSON with daily and hourly arrays
  3. 3

    State Management

    • React state holds loading / error / data
    • Custom hook exposes typed forecast object
  4. 4

    Chart Rendering

    • Recharts LineChart for temperature
    • Recharts BarChart for precipitation
fig. 01 — data flow from browser to rendered chart

Sign in to open the build guide

Free account. Get the step-by-step build and every resource link.

Sign in to continue

Take it further

  • Add a unit toggle (Celsius / Fahrenheit) that converts values client-side without a new API call, persisting the preference to localStorage.
  • Integrate a UV index and sunrise/sunset display using the additional Open-Meteo daily fields, and animate the chart entry with Recharts animation props.
  • Cache the last successful forecast response in localStorage with a timestamp so the app shows stale data gracefully when the user is offline.

More like this

All projects