{"id":45000388,"url":"https://github.com/denizak/openweather","last_synced_at":"2026-02-18T22:32:26.714Z","repository":{"id":191721633,"uuid":"683699206","full_name":"denizak/openweather","owner":"denizak","description":"implementation of open weather api using Clean Architecture","archived":false,"fork":false,"pushed_at":"2023-09-03T20:13:18.000Z","size":241,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-01-26T09:19:32.298Z","etag":null,"topics":["clean-architecture","functional-programming","tdd","test-first"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/denizak.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-08-27T12:28:11.000Z","updated_at":"2023-09-02T23:04:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"790a4020-00c4-496f-aa79-bf9ac2581045","html_url":"https://github.com/denizak/openweather","commit_stats":{"total_commits":25,"total_committers":1,"mean_commits":25.0,"dds":0.0,"last_synced_commit":"eb62fd2b030e1d988559ded0c1a9300ffe49cd27"},"previous_names":["denizak/openweather"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/denizak/openweather","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denizak%2Fopenweather","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denizak%2Fopenweather/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denizak%2Fopenweather/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denizak%2Fopenweather/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/denizak","download_url":"https://codeload.github.com/denizak/openweather/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denizak%2Fopenweather/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29597063,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-18T22:25:43.180Z","status":"ssl_error","status_checked_at":"2026-02-18T22:25:42.766Z","response_time":162,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["clean-architecture","functional-programming","tdd","test-first"],"created_at":"2026-02-18T22:32:26.179Z","updated_at":"2026-02-18T22:32:26.706Z","avatar_url":"https://github.com/denizak.png","language":"Swift","readme":"#  iOS Weather App architecture\n\nThis app is created using Onion Architecture / Clean Architecture to provide testability and modularity. It enables us to having an isolated component and trivial test.\nWe have our domain layer that responsible to model our app that its business case is asking for a weather information based on its current location or user input location.\nThus the infrastructure layer will only act as an I/O to the GUI(using UIKit), Network request(using URLSession) and LocationServices(using CoreLocation).\nEach component is being develop by using Test-First development. It enables us to have a test as our documentation about how every module works.\nWe use Factory pattern to inject dependency by filling in the functions that is needed for each module to work correctly. Later on we could use DI library as [Swinject](https://github.com/Swinject/Swinject) to automate the process.\n\n![architecture](onion_arch.png)\n\nWe also have an example on how a GetLocationWeather class is a Decorator that hide GetActualLocationWeather that enables the app to ask for user location from Location Services.\nIt makes the ViewModel has no information about the internal behavior of the use case.\n\n![decorator](decorator.png)\n\nWhen you check the test cases. We have several target tests.\n- weatherappIntegrationTests\n- weatherappTests\n- weatherappUITests\n\n### weatherappIntegrationTests\nthis test target consists of several test cases for each api class that requesting our API server. It can be execute daily to check if our API server still respond with the same expected responses.\n\n### weatherappTests\nit consists of Unit tests for our domain and can be executed every time we are doing development. It has to be fast and we could have fast feedback and check if business case is still in good shape.\n\n### weatherappUITests\nIt is created as our Acceptance test to check every feature is working correctly and integrated in the app. \n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdenizak%2Fopenweather","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdenizak%2Fopenweather","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdenizak%2Fopenweather/lists"}