{"id":13614914,"url":"https://github.com/akoufa/CoolWeather","last_synced_at":"2025-04-13T20:32:32.211Z","repository":{"id":84958653,"uuid":"91019494","full_name":"akoufa/CoolWeather","owner":"akoufa","description":"Weather App that uses Android best practices. Android Jetpack, clean architecture. Written in Kotlin","archived":false,"fork":false,"pushed_at":"2023-04-22T21:42:32.000Z","size":6958,"stargazers_count":195,"open_issues_count":3,"forks_count":20,"subscribers_count":10,"default_branch":"master","last_synced_at":"2024-11-07T17:02:32.923Z","etag":null,"topics":["android","android-app","android-architecture","android-development","architecture-components","clean-architecture","coroutines","databinding","glide","gradle","hilt","hilt-android","java","jetpack","kotlin","mvvm","retrofit2","room","viewmodel"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/akoufa.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2017-05-11T20:14:18.000Z","updated_at":"2024-09-24T17:11:10.000Z","dependencies_parsed_at":"2024-01-17T13:13:12.675Z","dependency_job_id":"0d10a2e7-e1ca-44aa-8224-c629cb26be42","html_url":"https://github.com/akoufa/CoolWeather","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akoufa%2FCoolWeather","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akoufa%2FCoolWeather/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akoufa%2FCoolWeather/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akoufa%2FCoolWeather/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/akoufa","download_url":"https://codeload.github.com/akoufa/CoolWeather/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223605485,"owners_count":17172496,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","android-app","android-architecture","android-development","architecture-components","clean-architecture","coroutines","databinding","glide","gradle","hilt","hilt-android","java","jetpack","kotlin","mvvm","retrofit2","room","viewmodel"],"created_at":"2024-08-01T20:01:07.008Z","updated_at":"2024-11-07T23:30:34.913Z","avatar_url":"https://github.com/akoufa.png","language":"Kotlin","funding_links":[],"categories":[":shamrock:  **Categories**",":art: Pattern"],"sub_categories":[":partly_sunny: Weather","MVVM"],"readme":"# CoolWeather\n\nAn Android Clean Architecture app written in Kotlin, using Kotlin Coroutines and Android Architecture Components using Hilt for Dependency Injection.\n\n### Presentation Layer\n\nThe presentation layer was implemented using:\n\nMVVM with ViewModels exposing LiveData that the Views consume. The ViewModel does not know anything about it's consumers.\nIt exposes a single source of truth as a LiveData that the consumers can observe to get the events emitted.\nThese events consist of entities, that are wrapped in a `Result` class that leverages the powerful Kotlin feature of sealed classes.\nThis enables us to express the different states of the application's individual screens in an concise an expressive manner.\n\n### Domain Layer\n\nThe domain layer contains the UseCases that encapsulate a single and very specific task that can be performed. This task is part of the business logic of the application. A UseCase exposes `suspend operator fun invoke` that returns\na `Result` after invocation. The ViewModels of the presentation layer use the UseCases to complete a business case. This layer also contains the Repository\ninterfaces and the domain entities. These are the basic building blocks of the application and the ones that are least likely to change when something external changes.\nThat also means that this layer should not depend on any other layer. The other layers must depend and reference the domain layer.\n\n### Data Layer\n\nThe data layer implements the repository interface that the domain layer defines. The components in this layer provide a single source of truth for data and hide the origin of the data.\nThis allows effective caching using a custom cache implementation or/and the Sqlite Db without polluting the other layers with the implementation details.\n\n## Clean architecture layers\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"images/rings.png\" alt=\"cleanrings\"/\u003e\n\u003c/p\u003e\n\n## Architecture overview and rules\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"images/architecture.png\" alt=\"architecture\"/\u003e\n\u003c/p\u003e\n\n### Build Instructions\n\nIn order to run this project, you'll need to setup several things beforehand:\n\n- This application uses the [OpenWeatherMap API](http://openweathermap.org) to obtain information about current weather and forecasts,\n  you'll need to register and obtain an API Key\n\n- You'll need to set the values found in the [gradle.properties](gradle.properties) file.\n  This involves the OpenWeatherMap Api Key (`apiToken`)\n\n### License\n\nSee LICENSE file\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakoufa%2FCoolWeather","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fakoufa%2FCoolWeather","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakoufa%2FCoolWeather/lists"}