A modern, responsive weather dashboard built with React, TypeScript, and Tailwind CSS. Get real-time weather data and 5-day forecasts for any city worldwide.
- 🌤️ Real-time weather data for any city
- 📅 5-day weather forecast
- 🎨 Beautiful, responsive design with Tailwind CSS
- 🔍 Smart city search with autocomplete suggestions
- 🌡️ Detailed weather metrics (temperature, humidity, wind speed, visibility)
- 📱 Mobile-friendly interface
- ⚡ Fast loading with Vite
npm install- Visit OpenWeatherMap API
- Sign up for a free account
- Navigate to your API keys section
- Generate a new API key (free tier allows 1000 calls/day)
- Edit the
.envfile in the project root - Replace
your_api_key_herewith your actual API key:
VITE_OPENWEATHER_API_KEY=your_actual_api_key_herenpm run devThe app will be available at http://localhost:5173
- Search: Type any city name in the search bar and press Enter or click Search
- Quick Access: Click on popular city buttons for instant weather data
- Details: View comprehensive weather information including feels-like temperature, wind speed, humidity, and visibility
- Forecast: See the 5-day weather forecast with daily highs, lows, and conditions
The app supports weather data for thousands of cities worldwide. Some examples:
- Major cities: London, Paris, Tokyo, New York, Sydney
- Regional cities: Mumbai, Dubai, Berlin, Toronto, Singapore
- Any city recognized by OpenWeatherMap's database
This app uses the OpenWeatherMap API to fetch:
- Current weather conditions
- 5-day weather forecasts
- Weather icons and descriptions
- Detailed meteorological data
- React 19 - Modern React with hooks
- TypeScript - Type-safe development
- Tailwind CSS - Utility-first CSS framework
- Vite - Fast build tool and dev server
- Lucide React - Beautiful weather icons
- OpenWeatherMap API - Real-time weather data
├── public/
├── src/
├── .gitignore
├── README.md
├── eslint.config.js
├── index.html
├── package-lock.json
├── package.json
├── postcss.config.cjs
├── tailwind.config.js
├── tsconfig.json
├── tsconfig.app.json
├── tsconfig.node.json
└── vite.config.ts
- ⚛️ React
- ⚡ Vite
- 🎨 Tailwind CSS v3
- 🟦 TypeScript
https://github.com/dharshan-kumarj/React_CSS_Frameworks_Starter/tree/Tailwind
cd React_CSS_Frameworks_Starter
git checkout Tailwind
npm install
npm run dev
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
"./index.html",
"./src/**/*.{js,ts,jsx,tsx}"
],
theme: {
extend: {},
},
plugins: [],
}module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
}@tailwind base;
@tailwind components;
@tailwind utilities;To check if Tailwind is working:
-
Go to
src/App.tsx -
Add a class like
bg-blue-600 text-white p-4 rounded -
Run the app and see the changes
npm run build
Then preview using:
npm run preview