Skip to content

A simple Kotlin Mutliplatform app to fetch weather forecast from open-meteo. It targets iOS and Android platforms.

Notifications You must be signed in to change notification settings

kibettheophilus/hali

Repository files navigation

Hali

A simple app to fetch weather forecast from open-meteo, built using Kotlin Multiplatform. It targets iOS and Android platforms.

Prerequisites

To run the app, you will need:

  • Android Studio - to run the android app
  • Xcode - to be able to run the iOS app

Architecture

The app has been built using a modularized layered architecture. The app has the following modules:

  • composeApp - contains the shared logic and the android app
  • iosApp - contains the setup for the iOS app

Screenshots

android

Home Details

ios

Home Details

Libraries and tech stack

  • Kotlin - programming language
  • Kotlin Multiplatform - Multiplaform framework
  • Compose Multiplatform - Declarative framework for sharing UIs across multiple platforms. Based on Kotlin and Jetpack Compose.
  • Koin - a pragmatic lightweight dependency injection framework for Kotlin & Kotlin Multiplatform.
  • Ktor Client - networking client framework
  • KotlinX Serialization - Serialization/Desirialization of JSON response from network.
  • KtLint - An anti-bikeshedding Kotlin linter with built-in formatter

CI/CD

  • Github Actions - to run tests, run lint checks and assemble apk. The deployment workflows are WIP.

Improvements

Given enough time, I would have loved to:

  • UI/UX - improve the design of the app.
  • Pick user location - currently the location(longitude/latitude) is static and timezone is Asia/Tokyo, the app should pick user's location when they open and show them weather forecast based on their current location.
  • Allow user to search - linked to above, let users search and view forecast for other places other than their current location
  • Improve test coverage.

Issues Faced

  1. iOS compilation fails with IllegalStateException
  • Fixed by adding kotlin.native.cacheKind=none to gradle.properties
  • Read more here
  1.  Constructor 'CupertinoScrollDecayAnimationSpec.<init>' can not be called: No constructor found for symbol 'androidx.compose.animation.core.cupertino/CupertinoScrollDecayAnimationSpec.<init>|<init>(kotlin.Float){}[0]'
    
    • Fixed by downgrading compose-navigation version to 2.8.0-alpha12
    • Read more here

About

A simple Kotlin Mutliplatform app to fetch weather forecast from open-meteo. It targets iOS and Android platforms.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published