Git Product home page Git Product logo

traczoskar / ai_weather_app Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 32.98 MB

๐ŸŒค๏ธ A sleek weather app leveraging OpenWeather API and OpenAI's ChatGPT ๐Ÿค– for real-time weather updates and personalized suggestions on activities, attire, food, places to visit etc. based on weather data and location. Built with React โš›๏ธ, TypeScript, TanStack Query, Tailwind and Redux for a responsive, user-friendly experience. ๐ŸŒ๐Ÿ’ก

Home Page: https://traczoskar.github.io/ai_weather_app/

License: MIT License

JavaScript 0.99% HTML 1.86% CSS 0.74% TypeScript 96.40%
chatgpt chatgpt-api openai react redux redux-saga redux-toolkit typescript vite framer-motion lottie-animation openweathermap-api tailwindcss tanstack-query tanstack-react-query make

ai_weather_app's Introduction

๐ŸŒค WeatherWise.ai

Header

Step into a smarter way to plan your day with WeatherWise.ai. This app connects to the OpenWeather API to provide current weather data tailored to your location. It integrates with OpenAI's ChatGPT for personalized activity suggestions and attire recommendations, ensuring you're perfectly prepared, no matter the weather.

๐Ÿ‘จ๐Ÿปโ€๐Ÿ’ป Check out Demo

Click Here ๐Ÿ‘ˆ

Data fetching

๐Ÿ›  Tech Stack

React OpenAI TypeScript JavaScript ES6+ HTML5 CSS3 TailwindCSS Redux React Router TanStack Query Vite NPM Make

E2E testing: Cypress

โœ… Features

๐Ÿ“ Weather Data: Get real-time weather data based on your geolocation, ensuring you're always aware of what's outside.

๐Ÿค– ChatGPT Integration: Receive tailored activity suggestions and dressing advice etc. from ChatGPT, customized to the current weather conditions.

๐ŸŒ Global Reach: Whether you're in your hometown or traveling abroad, WeatherWise.ai delivers accurate weather forecasts wherever you are.

๐ŸŒ Responsive Design: Enjoy a seamless experience on any device, thanks to a responsive interface powered by Tailwindcss and Vite.

๐Ÿ”„ Dynamic Updates: Weather data is constantly refreshed to provide the most current information, powered by TanStack Query (React Query) for efficient data management.

๐Ÿ“ฑ User-Friendly Interface: Navigate easily through a clean, modern UI that makes weather checking intuitive and quick.

๐ŸŒซ๏ธ Air Quality Index: Monitor air quality and the presence of harmful pollutants in the air.

๐Ÿ“… 5-Day Forecast: Plan ahead with a detailed 5-day weather forecast.

๐ŸŒ— Theme Switch: Choose between dark or light mode of UI. By default the app will switch to the preferences set up by your system or your browsers settings.

๐Ÿš€ Integration Details

OpenAI Integration ย ๐Ÿฆพ

WeatherWise.ai leverages the power of OpenAI's ChatGPT to provide personalized suggestions. The integration is managed through custom endpoints and webhooks configured in Make.com, ensuring seamless communication and data processing.

AI Integration

Weather Data from OpenWeatherMap ย ๐ŸŒฆ

The application fetches real-time weather data from the OpenWeatherMap API. Based on the user's geolocation or browser coordinates, it provides accurate and up-to-date weather information.

Air Quality Monitoring ย ๐ŸŒฌ

In addition to weather data, WeatherWise.ai includes an air quality index feature. This provides users with information about the levels of various pollutants, helping them make informed decisions about outdoor activities. This data is also fetched from OpenWeatherMap API.

Theme Switch ย ๐ŸŒ—

WeatherWise.ai reads your system or browser theme preferences and adapts to it. In every moment you can switch between dark and light mode by using dedicated intuitive button placed in the header section (just right to main logo of the app).

Theme Switch

๐Ÿ“– How to Use

  1. Clone the Repository:

    git clone https://github.com/traczoskar/ai_weather_app.git
    cd ai_weather_app
  2. Install Dependencies:

    npm install
  3. Set Up Webhook with Make.com

  4. Set Up Environment Variables:

    • Create a .env file in the root directory.
    • Add your OpenWeatherMap API key:
      VITE_API_KEY=your_api_key
    • Add your Make.com WebHook URL:
      VITE_MAKE_API_URL=your_webhook_url
  5. Run the Application:

    npm start
  6. To run E2E tests use the command below:

    npx cypress open
    • And select E2E tests to open in Chrome Browser.

To integrate OpenAI responses using Make.com, follow these steps to create a webhook:

Creating a Webhook in Make.com

  1. Log in to Make.com: Go to Make.com and log in to your account.

  2. Create a New Scenario:

    • Click the Create a new scenario button.
    • Click the + button to add a new module.
    • Select Webhooks from the list of applications.
    • Choose Custom webhook as the triggering event.
    • Click Add to create a new webhook.
    • Enter a name for the webhook and click Save.
    • Copy the generated webhook URL to your clipboard.
  3. Configure the Webhook:

    • In the webhook settings, specify the data structure if needed.
    • Optionally, add validation for incoming data.
  4. Integrate with OpenAI:

    • Add another module to your scenario for OpenAI.
    • Configure the OpenAI module to process the incoming data and generate a response.
    • Add a Webhook Response module to send the response back to the caller.
  5. Test the Webhook:

    • Run the scenario and trigger the webhook by sending a request to the copied URL.
    • Ensure that the scenario processes the request and returns the expected response.

๐Ÿ“ฌ Feedback

I'd love to hear your thoughts and suggestions! Feel free to open an issue or submit a pull request.

ai_weather_app's People

Contributors

traczoskar avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.