Skip to content

GuilhermeLuan/Weather-API

Repository files navigation

Weather API 🌦️

A lightweight RESTful API built with Spring Boot to fetch current weather data for any location. Designed with simplicity and efficiency in mind, this project demonstrates:

  • Integration with external weather data providers (Visual Crossing)
  • Caching for improved performance
  • Integration tests using WireMock

🚀 Features

  • Get today's weather by location
  • Caching via Redis for faster responses
  • Contract testing with WireMock
  • Full Docker setup (Redis included)

⚙️ Tech Stack

Java
Spring Boot
Docker
Redis
Feign

🚀 Deploy

Prerequisites

Cloning

git clone https://github.com/GuilhermeLuan/Weather-API

Starting

cd Weather-API
docker compose up
./mvnw clean install
./mvnw spring-boot:run

🌐 API Example

GET /v1/weather/Brazil

{
    "datetime": "2025-03-03",
    "address": "Brasil",
    "timezone": "America/Sao_Paulo",
    "description": "Similar temperatures continuing with no rain expected.",
    "temp": 23.4,
    "tempMax": 29.2,
    "tempMin": 20.0,
    "feelsLike": 23.3
}

📚 API Documentation

About

Java REST API using Spring Boot, Feign Client, Docker and Redis Cache to consume Visual Crossing's weather data.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages