Skip to content

maro14/open-weather

Repository files navigation

Open Weather App

A modern, responsive weather application built with React, TypeScript, and Vite. Get real-time weather information for any city using the OpenWeatherMap API.

Features

  • 🌤 Real-time weather data
  • 🔍 City search functionality
  • 📱 Responsive design
  • 💾 Recent searches history
  • 🎨 Modern UI with animations
  • 🔄 Loading states
  • ⌨️ Keyboard navigation support

Tech Stack

  • React 18
  • TypeScript
  • Vite
  • Axios
  • OpenWeatherMap API
  • React Spinners

Getting Started

Prerequisites

  • Node.js (v14 or higher)
  • npm or yarn
  • OpenWeatherMap API key

Installation

  1. Clone the repository:
git clone https://github.com/maro14/weather-app.git
  1. Install dependencies:
pnpm install
  1. Create a .env file in the root directory and add your OpenWeatherMap API key:
VITE_WEATHER_API_KEY=your_api_key_here
  1. Start the development server:
pnpm run dev

Building for Production

To create a production build:

pnpm run build

To preview the production build:

pnpm run preview

Environment Variables

The following environment variables are required:

  • VITE_WEATHER_API_KEY: Your OpenWeatherMap API key

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

About

Weather app with react

Resources

Stars

Watchers

Forks

Contributors