Code Monkey home page Code Monkey logo

weather_compose_clean_architecture's Introduction

Weapose - Weather ❤️ Compose

This is an example for show current weather from any location. The Weapose is builted by Android Jetpack Compose, MVVM, Clean Architecture, etc.

🙆‍♀️ Firstly

This app is inspired by:

I want to say thanks for those people to help me to make this app.

🎉 Ready on Google Play

Now, you can download it on Google Play Store. Install it and give me your feedback!

"Get it on Google Play"

🔨 How to build app

  • Using the newest version of Android Studio Canary.

  • You must add BASE_URL, API_KEY and MAPS_API_KEY inside local.properties to build and run Weapose app, like the code below:

    BASE_URL=https://api.openweathermap.org/data/2.5/
    API_KEY=API_KEY // Fill your open weather api key in here
    MAPS_API_KEY=GOOGLE_MAPS_API_KEY // Fill your google maps api key in here

📷 Screenshots

Light mode Dark mode
Home Light Home Dark
Seven Days Light Seven Days Light
Search By Map Light Search By Map Dark
Drawer Light Drawer Dark
Search By Text Light Search By Text Dark

📘 Features

  • Show the current weather by location or name.
  • Show the seven days weather by location or name.
  • Choice the location you want by using Google Map.
  • Search location by address name by using Google Places.
  • Support dark mode.
  • Support dynamic material from Android 13 and above.
  • Support English and Vietnamese.
  • Upcomming ….

📂 Module

Weapose is built according to the Clean Architecture model combined with the MVVM design pattern. To learn more, refer to the links below.

  • Guild to app architecture by Google Android.
  • Clean architectur by Uncle Bob.

🔎 Unit test

  • Using MockK to write unit test.
  • Using Kotlin Reflection to access the private method, private property, etc.
  • Using Kotlin Kover to generate the test coverage. To generate, you just run command ./gradlew koverHtmlReport.

🚊 Data flow

Weapose is supported by Flow and suspend for data stream flow in app.

Data flow

❌ Error flow

In data module, when data is returned error, I will transform the error to ResponseException. And then in domain and presentation, I transform the error from ResponseException to WeatherException to show the error to UI.

Error flow

🔔 Notes

If you have any issues with the project, don't hesitate to create an issue. Also I'm glad you can contribute to my project.

Let's develop together to create quality and beautiful Android Jetpack Compose applications!

☕ Buy me a coffee

Welcome to my github! 👋

Don't forget to buy me a coffee so that I have more motivation to improve the project! 🔥

"Buy Me A Coffee"

License

Copyright 2022 The Android Open Source Project

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

weather_compose_clean_architecture's People

Contributors

hide-your-code 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.