PhyoMyanmarKyaw /
SwiftUI-CleanArchitecture-sample
iOS demo app built with SwiftUI + Clean Architecture
27/100 healthLoading repository data…
MianMHaroon / repository
SwiftUI sample app demonstrating Clean Architecture, MVVM, use cases, FactoryKit DI, and GitHub REST API integration on iOS.
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
A production-style iOS sample app that explores GitHub repositories while demonstrating Clean Architecture, MVVM, and SwiftUI best practices.
Built as a reference project for scalable iOS apps — with clear layer separation, protocol-driven design, dependency injection, and a reusable presentation layer.
| Discover | Trending | Favorites | Settings |
|---|---|---|---|
| Search GitHub repos | Browse by topic | Save & manage favorites | App info & cache |
The project follows Clean Architecture with unidirectional data flow:
Presentation → Domain → Data → GitHub API
(Views / VM) (Use Cases) (Repos / DTOs)
flowchart TB
subgraph Presentation
Views[SwiftUI Views]
VM[ViewModels]
Coord[AppCoordinator]
DS[Design System]
end
subgraph Domain
UC[Use Cases]
Entities[Entities]
RepoIF[Repository Protocols]
end
subgraph Data
RepoImpl[Repository Implementations]
Remote[Remote Data Source]
Mapper[DTO Mappers]
Local[UserDefaults Store]
end
subgraph Infrastructure
API[APIClient]
Net[NetworkMonitor]
end
Views --> VM
VM --> UC
UC --> RepoIF
RepoImpl --> RepoIF
RepoImpl --> Remote
RepoImpl --> Local
Remote --> API
API --> GitHub[(GitHub REST API)]
| Layer | Role |
|---|
Selected from shared topics, language and repository description—not editorial ratings.
PhyoMyanmarKyaw /
iOS demo app built with SwiftUI + Clean Architecture
27/100 health| Presentation | SwiftUI views, view models, navigation, reusable UI components |
| Domain | Business rules, entities, use case protocols — no UI or networking |
| Data | Repository implementations, DTOs, mappers, remote & local data sources |
| Infrastructure | Networking, persistence helpers, constants, localization |
| App | Entry point, global state, DI container, routing |
BaseViewModel centralizes loading, errors, and toasts via AppStateidle, loading, loaded, empty, errorContainer+Dependencies.swiftAppCoordinator owns per-tab NavigationPath and modal presentationSwiftUI_CleanArchitecture_Demo/
├── App/
│ ├── DI/ # FactoryKit dependency registration
│ ├── Main/ # App entry point & root tab view
│ ├── Navigation/ # Routes & coordinator
│ └── State/ # Global app state
├── Domain/
│ ├── Entities/ # RepositoryEntity, OwnerEntity
│ ├── Interfaces/ # Repository contracts
│ └── UseCases/ # Search, trending, favorites
├── Data/
│ ├── DTOs/ # API response models
│ ├── Mappers/ # DTO → Entity mapping
│ ├── Remote/ # GitHub remote data source
│ ├── Local/ # Favorites local data source
│ └── Repositories/ # Repository implementations
├── Presentation/
│ ├── Common/ # Components, design system, extensions
│ └── Features/ # Discover, Favorites, Trending, Settings
└── Infrastructure/
├── Constants/
├── Localization/
├── Network/ # APIClient & error handling
├── Persistence/ # UserDefaults wrapper
├── Resources/ # Assets & colors
└── Utilities/ # NetworkMonitor
async/await)git clone https://github.com/MianMHaroon/SwiftUI_CleanArchitecture_Demo.git
cd SwiftUI_CleanArchitecture_Demo
Open SwiftUI_CleanArchitecture_Demo.xcodeproj (or .xcworkspace if you use one).
If prompted, allow Xcode to resolve Swift Package Manager dependencies (FactoryKit).
Select an iPhone simulator and press ⌘R.
Note: No API key is required for basic GitHub search. Unauthenticated requests are subject to GitHub rate limits.
Search public GitHub repositories. Results open a detail screen with stars, forks, language, owner info, and a favorite action.
Curated topic sections (Swift, SwiftUI, AI, iOS) load top search results per topic.
Star repositories from the detail screen. Manage saved items locally; clear the cache from Settings.
View app version, network status, link to GitHub API docs, and clear favorites cache.
The codebase includes accessibilityIdentifiers on primary screens and controls to support UI tests. Extend with unit tests for use cases and repository mocks as needed.
Muhammad Haroon
This project is licensed under the MIT License — see the LICENSE file for details.