<<<<<<< HEAD
A modern, responsive weather application built with React and TypeScript. Get real-time weather information, forecasts, air quality data, and historical weather trends for any location worldwide.
- π Real-time Weather Data - Current conditions, temperature, humidity, wind speed, and more
- π 5-Day Forecast - Detailed weather predictions for the upcoming week
- π Hourly Temperature Charts - Visual representation of temperature trends
- π Historical Data - 7-day historical temperature analysis
- π¬οΈ Air Quality Index - Real-time AQI with pollutant breakdown
- β Favorite Cities - Save and quickly access your favorite locations
- π City Search - Search and navigate to any city worldwide
- π Dark/Light Mode - Beautiful theme switching with smooth animations
- π‘οΈ Unit Toggle - Switch between Celsius and Fahrenheit
- π± Responsive Design - Works seamlessly on desktop, tablet, and mobile devices
- π¨ Modern UI/UX - Smooth animations and micro-interactions
- React 19 - Modern React with latest features
- TypeScript - Type-safe development
- Vite - Fast build tool and dev server
- Tailwind CSS 4 - Utility-first CSS framework
- React Router - Client-side routing
- TanStack Query (React Query) - Server state management and data fetching
- React Context API - Theme and unit preferences
- Radix UI - Accessible component primitives
- Lucide React - Beautiful icon library
- Recharts - Composable charting library
- Sonner - Toast notifications
- date-fns - Date formatting and manipulation
- class-variance-authority - Component variant management
- cmdk - Command palette component
=======
A modern, responsive weather application built with React and TypeScript. Get real-time weather information, forecasts, air quality data, and historical weather trends for any location worldwide.
- π Real-time Weather Data - Current conditions, temperature, humidity, wind speed, and more
- π 5-Day Forecast - Detailed weather predictions for the upcoming week
- π Hourly Temperature Charts - Visual representation of temperature trends
- π Historical Data - 7-day historical temperature analysis
- π¬οΈ Air Quality Index - Real-time AQI with pollutant breakdown
- β Favorite Cities - Save and quickly access your favorite locations
- π City Search - Search and navigate to any city worldwide
- π Dark/Light Mode - Beautiful theme switching with smooth animations
- π‘οΈ Unit Toggle - Switch between Celsius and Fahrenheit
- π± Responsive Design - Works seamlessly on desktop, tablet, and mobile devices
- π¨ Modern UI/UX - Smooth animations and micro-interactions
- React 19 - Modern React with latest features
- TypeScript - Type-safe development
- Vite - Fast build tool and dev server
- Tailwind CSS 4 - Utility-first CSS framework
- React Router - Client-side routing
- TanStack Query (React Query) - Server state management and data fetching
- React Context API - Theme and unit preferences
- Radix UI - Accessible component primitives
- Lucide React - Beautiful icon library
- Recharts - Composable charting library
- Sonner - Toast notifications
- date-fns - Date formatting and manipulation
- class-variance-authority - Component variant management
- cmdk - Command palette component
8ff0a90c6cc30daf9fc521b5014de228efc7fdb1
- Node.js 18+ and npm/yarn/pnpm
- OpenWeatherMap API key (Get one here)
- Clone the repository
git clone https://github.com/AshazShaikh1/Xemate/
8ff0a90c6cc30daf9fc521b5014de228efc7fdb1 cd Eximate
2. **Install dependencies**
```bash
npm install
# or
yarn install
# or
pnpm install
-
Set up environment variables
Create a
.envfile in the root directory:VITE_OPENWEATHER_API_KEY=your_openweathermap_api_key_here
-
Start the development server
npm run dev # or yarn dev # or pnpm dev
-
Open your browser
Navigate to
http://localhost:5173(or the port shown in terminal)
- Allow Location Access - The app will request your location to show local weather
- View Dashboard - See current conditions, hourly forecast, and detailed metrics
- Refresh Data - Click the refresh button to update weather information
- Click Search - Use the search bar in the header
- Type City Name - Start typing to see suggestions
- Select City - Click on a city to view its weather details
- Add to Favorites - Click the star icon on any city page
- View Favorites - See all favorite cities on the dashboard
- Remove Favorites - Click the X button on any favorite city card
- Click the Β°C/Β°F button in the header to toggle between metric and imperial units
- Click the sun/moon icon in the header to switch between light and dark themes
src/
βββ api/ # API configuration and types
β βββ config.ts # API configuration
β βββ types.ts # TypeScript type definitions
β βββ weather.ts # Weather API functions
βββ components/
β βββ weather/ # Weather-specific components
β β βββ current-weather.tsx
β β βββ air-quality.tsx
β β βββ weather-forecast.tsx
β β βββ weather-details.tsx
β β βββ hourly-temperature.tsx
β β βββ historical-chart.tsx
β β βββ favorite-cities.tsx
β β βββ favorite-button.tsx
β βββ ui/ # Reusable UI components
β β βββ button.tsx
β β βββ card.tsx
β β βββ alert.tsx
β β βββ header.tsx
β β βββ city-search.tsx
β β βββ ...
β βββ layout.tsx # Main layout component
β βββ loading-skeleton.tsx
βββ context/ # React contexts
β βββ theme-provider.tsx
β βββ unit-provider.tsx
βββ hooks/ # Custom React hooks
β βββ use-geolocation.tsx
β βββ use-weather.ts
β βββ use-favorite.tsx
β βββ ...
βββ pages/ # Page components
β βββ weather-dashboard.tsx
β βββ city.tsx
βββ lib/ # Utility functions
β βββ utils.ts
βββ App.tsx # Main app component
βββ main.tsx # Entry point
npm run devnpm run buildnpm run preview<<<<<<< HEAD
The project is configured for easy deployment on Vercel.
-
Install Vercel CLI
npm i -g vercel
-
Login to Vercel
vercel login
-
Deploy
vercel
-
Add Environment Variable
- Go to your project settings on Vercel dashboard
- Navigate to Environment Variables
- Add
VITE_OPENWEATHER_API_KEYwith your API key - Redeploy the project
-
Push to GitHub
git add . git commit -m "Ready for deployment" git push origin main
-
Import to Vercel
- Go to vercel.com
- Click "New Project"
- Import your GitHub repository
- Add environment variable
VITE_OPENWEATHER_API_KEY - Click "Deploy"
-
Automatic Deployments
- Every push to
mainbranch will trigger a new deployment - Pull requests will create preview deployments
- Every push to
Make sure to add the following environment variable in your Vercel project settings:
- Variable Name:
VITE_OPENWEATHER_API_KEY - Value: Your OpenWeatherMap API key
The app will automatically use these environment variables during build time.
=======
8ff0a90c6cc30daf9fc521b5014de228efc7fdb1
npm run dev- Start development servernpm run build- Build for productionnpm run preview- Preview production buildnpm run lint- Run ESLint
The app uses OpenWeatherMap API. Make sure to:
- Sign up at OpenWeatherMap
- Get your API key
- Add it to
.envfile asVITE_OPENWEATHER_API_KEY
VITE_OPENWEATHER_API_KEY=your_api_key_here- Chrome (latest)
- Firefox (latest)
- Safari (latest)
- Edge (latest)
Contributions are welcome! Please feel free to submit a Pull Request.
This project is open source and available under the MIT License.
Ashaz Shaikh
- Made with β€οΈ
- OpenWeatherMap for weather data API
- Radix UI for accessible components
- Lucide for beautiful icons
- Recharts for charting capabilities
β If you like this project, give it a star!