Skip to content

Java and Spring-powered weather web app fetching real-time data from the Turkish State Meteorological Service (MGM) for accurate updates. Seamlessly integrates with external APIs and utilizes Spring Boot and PostgreSQL for efficient data handling and enhanced user experience.

License

Notifications You must be signed in to change notification settings

Damples06/turkish-weather-hub-spring-boot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Turkey Weather Hub

Turkey Weather Hub is an innovative Spring Boot application designed to offer up-to-date weather information for cities in Turkey. It seamlessly combines the power of Spring Data JPA for efficient data storage with integration capabilities for the MGM (Turkish State Meteorological Service). This integration allows the application to fetch and deliver real-time weather data, providing users with accurate and timely information.

Table of Contents

Project Motivation

The motivation behind this project was to address the lack of documentation for the MGM (Turkish State Meteorological Service) API. Faced with the absence of clear guidelines, the project emerged as a solution by utilizing the available data through the service. The aim was to create a clean, readable version of the weather information, regulating and enhancing the data retrieved from the service for a better user experience.

Features

  • Area Details: Obtain comprehensive information about an area, encompassing its geographical location, daily weather updates, and more.
  • Real-time Data: Utilize the MGM (Turkish State Meteorological Service) as an external API, ensuring the retrieval of current and precise weather information.
  • Data Persistence: Seamlessly store area-specific data in a PostgreSQL database leveraging the capabilities of Spring Data JPA.
  • RESTful Endpoints: Facilitate effortless integration with other applications by exposing RESTful endpoints.

Technologies Used

  • Java
  • Spring Boot
  • Spring Data JPA
  • PostgreSQL
  • Lombok

Getting Started

  1. Clone the Repository:

    git clone https://github.com/Damples06/turkish-weather-hub-spring-boot.git
    cd TurkeyWeatherHub
  2. Build and Run:

    ./mvnw clean install
    ./mvnw spring-boot:run
  3. Access the Application:

    Open your web browser and go to http://localhost:8686.

Usage

Area Details

To retrieve details for a specific area, use the following endpoint:

   GET /area?province={province}&district={district}

Hourly Weather Data

To get the hourly weather data for an area, use the following endpoints:

  • Get All Hourly Data
   GET /hourly/all?province={province}
  • Get Single Hourly Data
   GET /hourly/{i}?province={province}

Daily Weather Data

To get the daily weather data for an area, use the following endpoints:

  • Get All Daily Data
   GET /daily/all?province={province}&district={district}
  • Get Single Daily Data
   GET /daily/{i}?province={province}&district={district}

Forecast Data

To get the forecast data for an area, use the following endpoint:

   GET /forecast?province={province}&district={district}

Configuration

Configure the application properties in application.yml for database connection and external API integration.

   server:
     port: 8686
   spring:
     datasource:
       url: jdbc:postgresql://localhost:5432/city
       username: postgres
       password: postgres
       driver-class-name: org.postgresql.Driver
     jpa:
       hibernate:
         ddl-auto: update
       open-in-view: false

Contributing

Contributions are welcome! Feel free to open issues and pull requests.

About

Java and Spring-powered weather web app fetching real-time data from the Turkish State Meteorological Service (MGM) for accurate updates. Seamlessly integrates with external APIs and utilizes Spring Boot and PostgreSQL for efficient data handling and enhanced user experience.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages