This project is a Spring Boot application that exposes a RESTful API for retrieving weather forecasts. It utilizes the WeatherAPI service to fetch weather data and presents the forecast.
This project was developed as a business task for a recruitment process at Volvo Group.
- Weather Forecast: Provides weather forecast for specific location for the next 3 days*.
- Major Cities in Poland: Includes forecasts for the 5 biggest cities in Poland for the next 3 days*.
More details can be found in the Swagger documentation.
Swagger documentation is available once the application is running. You can view the API documentation by navigating to:
http://localhost:8080/swagger-ui/index.html
git clone https://github.com/Flop3r/WeatherForecastAPI
cd WeatherForecastAPI
Run Docker Daemon or Docker Desktop
A Dockerfile is provided for containerized deployment. To build and run the Docker container:
docker build -t weather-forecast-api .
docker run -p 8080:8080 weather-forecast-api
Alternatively, you can use docker-compose for building and running the application:
docker-compose up --build
You can use the Makefile to build and run the application in Docker container:
make docker
To build the project, use the Maven wrapper included in the repository:
./mvnw clean install
Run the application:
./mvnw spring-boot:run
You can also use the Makefile to build and run the application:
make maven
For deployment, a deploy.sh
script is provided. This script will build and deploy the application using Docker:
./deploy.sh
For presentation purposes, you can omit the process; the latest version of this repository does not require your own API key.
The application requires an API key from WeatherAPI to fetch weather data. You can configure the API key in application.properties
:
weatherapi.key=YOUR_API_KEY
- Java 17
- Maven
- Docker (optional, for containerized deployment)
This project is licensed under the MIT License.