Coder Social home page Coder Social logo

weather's Introduction

# Weather Application

The Weather Application is a Spring Boot application that provides weather information for various cities using 
a third-party weather service. It is built with Java 17 and follows the Hexagonal Architecture pattern for
 modularity and maintainability. The application integrates with OpenMeteo Weather API and IP Geolocation 
 API to retrieve weather data and geolocation information. The project is Dockerized and includes multistage builds
 for efficient containerization.

## Features

- Retrieves weather information for geolocation info retrieved by IP addres
- Utilizes OpenMeteo Weather API as the data source
- Integrates with IP Geolocation API for geolocation information
- Uses Spring Open Feign for API communication
- Implements Mapstruct for object mapping
- Applies Liquibase for database schema management
- Provides OpenAPI documentation for API endpoints
- Includes integration tests for comprehensive testing
- Dockerized with multistage builds for efficient containerization

## Technologies Used

- Java 17
- Spring Boot
- Spring Open Feign
- Liquibase
- Open API
- Mapstruct
- Hexagonal Architecture
- Integration Testing
- Docker

## Getting Started

Follow these instructions to build and run the project using Docker Compose:

### Prerequisites

- Docker
- Docker Compose

### Installation

1. Navigate to the project directory:

cd weather


3. Build the Docker images and set up the containers using Docker Compose:

docker-compose build docker-compose up


### Usage

Explore the OpenAPI documentation:

   - Access the Swagger UI at `http://localhost:9094/api/v1/swagger-ui/index.html#/`.

### How to make request
1. GET http://localhost:8080/weather
2. Request should contain 2 headers: 
   * X-Forwarded-For (your external IP address)
   * X-API-KEY (auth api key, default = `M2ZjNDZmOWItMzJmMC00YzhlLWE3ZTctNDY3YzQ2YzAzZjli`)
Example:

curl --location 'http://localhost:9094/api/v1/weather'
--header 'X-Forwarded-For: 81.198.20.21'
--header 'X-API-KEY: M2ZjNDZmOWItMzJmMC00YzhlLWE3ZTctNDY3YzQ2YzAzZjli'

weather's People

Stargazers

Samir Aghayarov avatar

Watchers

Samir Aghayarov 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.