{"id":19625949,"url":"https://github.com/leoando/swiftuiunsplashapp","last_synced_at":"2026-05-12T21:10:17.716Z","repository":{"id":40650419,"uuid":"467079757","full_name":"LeoAndo/SwiftUIUnsplashApp","owner":"LeoAndo","description":null,"archived":false,"fork":false,"pushed_at":"2023-03-05T10:36:57.000Z","size":2109,"stargazers_count":2,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-26T20:12:30.300Z","etag":null,"topics":["architecture","ios15","mvvm-ios","resolver","swiftui","unsplash-api"],"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/LeoAndo.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-03-07T12:13:40.000Z","updated_at":"2023-07-30T09:48:38.000Z","dependencies_parsed_at":"2024-11-11T11:51:00.711Z","dependency_job_id":"a579d778-00a7-433e-81fa-cebbc6718131","html_url":"https://github.com/LeoAndo/SwiftUIUnsplashApp","commit_stats":null,"previous_names":["leoando/swiftuiunsplashapp"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LeoAndo%2FSwiftUIUnsplashApp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LeoAndo%2FSwiftUIUnsplashApp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LeoAndo%2FSwiftUIUnsplashApp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LeoAndo%2FSwiftUIUnsplashApp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LeoAndo","download_url":"https://codeload.github.com/LeoAndo/SwiftUIUnsplashApp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240926397,"owners_count":19879737,"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":["architecture","ios15","mvvm-ios","resolver","swiftui","unsplash-api"],"created_at":"2024-11-11T11:44:13.700Z","updated_at":"2026-05-12T21:10:17.678Z","avatar_url":"https://github.com/LeoAndo.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# development environment\n\n\u003cimg width=\"526\" alt=\"スクリーンショット 2022-03-09 16 08 32\" src=\"https://user-images.githubusercontent.com/16476224/157390357-2b65b083-7189-4870-a8ff-07899d636695.png\"\u003e\n\n# App architecture\n\n- MVVM(Model-View-ViewModel(State Holder))\n\u003cimg width=\"582\" alt=\"スクリーンショット 2021-12-20 15 58 59\" src=\"https://user-images.githubusercontent.com/16476224/146725205-ac598f5f-c5a6-4cc4-8d38-559ca50bdf77.png\"\u003e\n\n# implementation Rules\n\n- ui layer\n  - [Allows preview by state by taking uiState as an argument](https://github.com/LeoAndo/ios-app-templates/blob/main/BasicApp/Views/Home/HomeView.swift#L60:L67)\n  - The file named ViewModel is a StateHolder.\n  - If simple logic, Call Repository (Interface) directly from ViewModel.\n  - Any work performed in a ViewModel should be main-safe—safe to call from the main thread.\n  - use uistate\n    - https://github.com/LeoAndo/ios-app-templates/blob/main/BasicApp/Views/Home/HomeUiState.swift\n    - https://github.com/LeoAndo/ios-app-templates/blob/main/BasicApp/Views/Home/HomeViewModel.swift#L12\n  - ViewModel used `@MainActor` because Fix below error Log\n    ```\n    Fix: [SwiftUI] Publishing changes from background threads is not allowed; make sure to publish values from the main thread (via operators like receive(on:)) on model updates.  \n    ```\n- domain layer\n  - Pure Swift.\n  - Any work performed in a usecase should be main-safe—safe to call from the main thread.\n- data layer\n  - Error handling and returning a custom Response object\n  - Any work performed in a call local/remote data should be io thread.\n\n- Features\n  - UI\n    - SwiftUI\n    - [AsyncImage](https://developer.apple.com/documentation/swiftui/asyncimage)\n      - target of iOS 15+\n  - DI\n    - [Resolver](https://github.com/hmlongco/Resolver)\n  - Unit Test\n    - It is being implemented.\n  - Network\n    - [async /await](https://developer.apple.com/videos/play/wwdc2021/10132)\n      - target of iOS 15+\n    - ~~[Alamofire](https://github.com/Alamofire/Alamofire)~~\n  - local\n    - It is being implemented.\n  - Web API \n    - ([Unsplash](https://unsplash.com/documentation)) \n  - app architecture\n    - MVVM + SwiftUI\n\n| iPhone 13 Pro OS 15.2 |\n|:---|\n|\u003cimg src=\"https://github.com/LeoAndo/ios-app-templates/blob/main/capture_basicapp.png\" width=320 /\u003e |\n\n# refs\nhttps://gist.github.com/ollieatkinson/322338df8a5220d649ac01ff11e7de12\u003cbr\u003e\nhttps://github.com/Alamofire/Alamofire/blob/master/Source/HTTPMethod.swift\u003cbr\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleoando%2Fswiftuiunsplashapp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleoando%2Fswiftuiunsplashapp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleoando%2Fswiftuiunsplashapp/lists"}