Skip to content

AshazShaikh1/Klimate

Repository files navigation

<<<<<<< HEAD

🌀️ Eximate - Weather Dashboard

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.

✨ Features

  • 🌍 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

πŸ› οΈ Tech Stack

Frontend

  • 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

State Management & Data Fetching

  • TanStack Query (React Query) - Server state management and data fetching
  • React Context API - Theme and unit preferences

UI Components

  • Radix UI - Accessible component primitives
  • Lucide React - Beautiful icon library
  • Recharts - Composable charting library
  • Sonner - Toast notifications

Utilities

  • date-fns - Date formatting and manipulation
  • class-variance-authority - Component variant management
  • cmdk - Command palette component

πŸš€ Getting Started

=======

🌀️ Klimate - Weather Dashboard

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.

✨ Features

  • 🌍 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

πŸ› οΈ Tech Stack

Frontend

  • 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

State Management & Data Fetching

  • TanStack Query (React Query) - Server state management and data fetching
  • React Context API - Theme and unit preferences

UI Components

  • Radix UI - Accessible component primitives
  • Lucide React - Beautiful icon library
  • Recharts - Composable charting library
  • Sonner - Toast notifications

Utilities

  • date-fns - Date formatting and manipulation
  • class-variance-authority - Component variant management
  • cmdk - Command palette component

πŸš€ Getting Started

8ff0a90c6cc30daf9fc521b5014de228efc7fdb1

Prerequisites

  • Node.js 18+ and npm/yarn/pnpm
  • OpenWeatherMap API key (Get one here)

Installation

  1. Clone the repository

<<<<<<< HEAD git clone

git clone https://github.com/AshazShaikh1/Xemate/

8ff0a90c6cc30daf9fc521b5014de228efc7fdb1 cd Eximate


2. **Install dependencies**
```bash
npm install
# or
yarn install
# or
pnpm install
  1. Set up environment variables

    Create a .env file in the root directory:

    VITE_OPENWEATHER_API_KEY=your_openweathermap_api_key_here
  2. Start the development server

    npm run dev
    # or
    yarn dev
    # or
    pnpm dev
  3. Open your browser

    Navigate to http://localhost:5173 (or the port shown in terminal)

πŸ“– Usage

Viewing Current Weather

  1. Allow Location Access - The app will request your location to show local weather
  2. View Dashboard - See current conditions, hourly forecast, and detailed metrics
  3. Refresh Data - Click the refresh button to update weather information

Searching for Cities

  1. Click Search - Use the search bar in the header
  2. Type City Name - Start typing to see suggestions
  3. Select City - Click on a city to view its weather details

Managing Favorites

  1. Add to Favorites - Click the star icon on any city page
  2. View Favorites - See all favorite cities on the dashboard
  3. Remove Favorites - Click the X button on any favorite city card

Changing Units

  • Click the Β°C/Β°F button in the header to toggle between metric and imperial units

Theme Switching

  • Click the sun/moon icon in the header to switch between light and dark themes

πŸ“ Project Structure

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

πŸ—οΈ Build

Development Build

npm run dev

Production Build

npm run build

Preview Production Build

npm run preview

<<<<<<< HEAD

πŸš€ Deployment

Deploy to Vercel

The project is configured for easy deployment on Vercel.

Option 1: Deploy via Vercel CLI

  1. Install Vercel CLI

    npm i -g vercel
  2. Login to Vercel

    vercel login
  3. Deploy

    vercel
  4. Add Environment Variable

    • Go to your project settings on Vercel dashboard
    • Navigate to Environment Variables
    • Add VITE_OPENWEATHER_API_KEY with your API key
    • Redeploy the project

Option 2: Deploy via GitHub

  1. Push to GitHub

    git add .
    git commit -m "Ready for deployment"
    git push origin main
  2. Import to Vercel

    • Go to vercel.com
    • Click "New Project"
    • Import your GitHub repository
    • Add environment variable VITE_OPENWEATHER_API_KEY
    • Click "Deploy"
  3. Automatic Deployments

    • Every push to main branch will trigger a new deployment
    • Pull requests will create preview deployments

Environment Variables on Vercel

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

πŸ§ͺ Scripts

  • npm run dev - Start development server
  • npm run build - Build for production
  • npm run preview - Preview production build
  • npm run lint - Run ESLint

πŸ”§ Configuration

API Configuration

The app uses OpenWeatherMap API. Make sure to:

  1. Sign up at OpenWeatherMap
  2. Get your API key
  3. Add it to .env file as VITE_OPENWEATHER_API_KEY

Environment Variables

VITE_OPENWEATHER_API_KEY=your_api_key_here

πŸ“± Browser Support

  • Chrome (latest)
  • Firefox (latest)
  • Safari (latest)
  • Edge (latest)

🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

πŸ“ License

This project is open source and available under the MIT License.

πŸ‘€ Author

Ashaz Shaikh

  • Made with ❀️

πŸ™ Acknowledgments


⭐ If you like this project, give it a star!

About

Klimete - Weather Dashboard 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.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages