A modern, responsive weather application built with React, TypeScript, and Tailwind CSS. Get real-time weather information for any location worldwide with an intuitive and beautiful interface.
- Current Location Weather: Automatic geolocation-based weather display
- Detailed Weather Information: Temperature, humidity, wind speed, pressure, and more
- Hourly Temperature Chart: Interactive temperature trends for the next 24 hours
- 5-Day Forecast: Extended weather outlook with daily highs/lows
- Real-time Search: Search for cities worldwide with auto-suggestions
- Search History: Keep track of recently searched locations
- Favorites System: Save and quickly access your favorite cities
- Advanced Command Dialog: Intuitive search interface with keyboard navigation
- Dark/Light Theme: Seamless theme switching with system preference detection
- Responsive Design: Optimized for desktop, tablet, and mobile devices
- Loading States: Smooth loading animations and skeleton screens
- Error Handling: Graceful error handling with user-friendly messages
- Interactive Charts: Temperature trends using Recharts
- Weather Icons: Dynamic weather condition icons from OpenWeatherMap
- Gradient Backgrounds: Beautiful weather-themed gradients
- React 19 - Modern React with latest features
- TypeScript - Type-safe development
- Vite - Lightning-fast build tool
- React Router - Client-side routing
- Tailwind CSS 4 - Utility-first CSS framework
- Radix UI - Headless UI components
- Lucide React - Beautiful SVG icons
- shadcn/ui - Component library built on Radix UI
- TanStack Query (React Query) - Powerful data synchronization
- Local Storage - Persistent favorites and search history
- Recharts - Composable charting library
- date-fns - Date utility library
- ESLint - Code linting
- TypeScript - Static type checking
- Prettier - Code formatting
-
Clone the repository
git clone https://github.com/Yukikaze-coder/Global-Weather.git cd Global-Weather
-
Install dependencies
npm install
-
Set up environment variables
cp .env.example .env
Add your OpenWeatherMap API key to
.env
:VITE_OPENWEATHER_API_KEY=your_api_key_here
-
Start the development server
npm run dev
-
Open your browser Navigate to
http://localhost:5173
- Visit OpenWeatherMap
- Sign up for a free account
- Navigate to API keys section
- Copy your API key to the
.env
file
# Development
npm run dev # Start development server
# Production
npm run build # Build for production
npm run preview # Preview production build
# Code Quality
npm run lint # Run ESLint
src/
βββ api/ # API configuration and services
β βββ config.ts # API endpoints and configuration
β βββ types.ts # TypeScript type definitions
β βββ weather.ts # Weather API service
βββ components/ # Reusable UI components
β βββ ui/ # UI component library
βββ context/ # React context providers
βββ hooks/ # Custom React hooks
βββ lib/ # Utility functions
βββ pages/ # Page components
- Automatic location detection using browser's geolocation API
- Fallback options for users who deny location access
- Reverse geocoding to display location names
- Add/remove cities to favorites
- Persistent storage using localStorage
- Quick access from search dialog
- Real-time weather data for favorite cities
- Tracks recently searched locations
- Persistent across browser sessions
- Easy clearing of search history
- Timestamps for search entries
- Current weather conditions
- 5-day forecast
- Hourly temperature trends
- Detailed metrics (humidity, pressure, wind, etc.)
- Sunrise/sunset times
- Support for light and dark themes
- Consistent color palette
- Weather condition-specific colors
- Clean, readable fonts
- Consistent sizing scale
- Proper contrast ratios
- Modular, reusable components
- Consistent styling with Tailwind CSS
- Responsive design patterns
- Current weather data
- 5-day weather forecast
- Geocoding for city search
- Reverse geocoding for coordinates
/weather
- Current weather/forecast
- 5-day forecast/geo/direct
- Forward geocoding/geo/reverse
- Reverse geocoding
- Mobile First: Optimized for mobile devices
- Tablet Support: Adapted layouts for tablets
- Desktop: Full-featured desktop experience
- Touch Friendly: Large touch targets for mobile
VITE_OPENWEATHER_API_KEY=your_api_key_here
Custom configuration for:
- Color scheme
- Spacing system
- Component variants
- Dark mode support
This project is licensed under the MIT License - see the LICENSE file for details.
Morandini Luigi
- GitHub: @Yukikaze-coder
- OpenWeatherMap for weather data
- Tailwind CSS for styling
- Radix UI for accessible components
- Lucide for beautiful icons
- Recharts for data visualization
Made with β€οΈ by Morandini Luigi Β© 2025