Meteo Vision is a full-stack application designed to retrieve and display historical weather data for any specified location and date range. This application utilizes a robust server-side architecture built with Ruby on Rails and a dynamic front-end interface developed using React.
- Set up a Ruby project with a server-side framework like Ruby on Rails or Sinatra.
- Implement an API endpoint that receives parameters for location (example: Lisbon, Berlin) , start date, and end date.
- Create a weather service class that interacts with the Open-Meteo API. Make an HTTP requests to the API and retrieve historical weather information for the given location and date range.
- Define a data model for storing the historical weather information. The model should include attributes such as location, date, temperature, humidity, etc.
- Implement the API endpoint to fetch historical weather data for the specified location and date range. If the data was previously stored, return it directly; otherwise, fetch it from the Open-Meteo API.
- Create a React App.
- Design a user interface with input fields for location (example: Lisbon), start date, and end date.
- Implement a client-side function that sends a request to the server API when a button is clicked, passing the entered location, start date, and end date as parameters.
- Handle the API response and display the historical weather information on the frontend with a chart library and on table format.
Meteo-Vision.Demo.mp4
To prepare your computer for development you need to install Docker Desktop.
- Clone the repository
git clone https://github.com/FabioMiguel2000/Meteo-Vision.git
- Head inside the project directory
/Meteo-Vision
:
cd /Meteo-Vision
- There is a docker-compose file that builds and runs 2 containers, the Ruby on Rails server, and the React.JS client:
docker-compose up -d
- Run the Ruby on Rails server's migration:
docker exec -it server bin/rails db:migrate
- You should be able to run the application on:
http://localhost:3000/
This project is licensed under the Apache License, Version 2.0.
For the complete text of the Apache License, please refer to the .