Skip to content

Show current weather and 5 day forecast based on user location with open weather api

Notifications You must be signed in to change notification settings

valentineRutto/Weather

Repository files navigation

Weather

Show current weather and 5 day forecast based on user location with open weather api

Tech Stack

-Kotlin- a cross-platform, statically typed, general-purpose programming language with type inference.
-Coroutines - perform background operations.
-KOIN - a pragmatic lightweight dependency injection framework.
-ROOM - persistence library providing an abstraction over SQL .
Jetpack -
-Retrofit - A type-safe HTTP client for Android.

Pre-requisite 📝

In your local.properties you will need to add your Open Weather API key and copy the urls in.

OPEN_WEATHER_API_KEY = YOUR KEY
OPEN_WEATHER_BASE_URL=https://api.openweathermap.org
OPEN_WEATHER_ICONS_URL= http://openweathermap.org/img/wn/

Check for one under Api Keys

Environment

  • Built on A.S Hedgehog
  • JDK 17 -minSDK 26

Architecture

The app follows MVVM Architecture and contains these packages:

Data

  • data-remote

Handles data interacting with the network and is later serverd up to the presentation layer through domain object

  • data-local

Handles persistence of object with Room ORM from.This module is responsible for handling all local related logic and serves up data to and from the presentation layer through domain objects.

With this separation we can easily swap in new or replace the database being used without causeing major ripples across the codebase.

Repository

Gets data from api and room and distributes it to the rest of the app

DI

Koin handles dependency injection on components making it easier to reuse

util

This package contains utility functions like networkresult which are used throughtout the application

ui

contains views that are shown to the user

Installation

Clone the repo and run on emulator or phone or download the apk file

ScreenShot

location List Weather

Releases

No releases published

Packages

No packages published

Languages