This is Github user search demo app that made with MVVM design pattern.
Search Github user and show user result list
- SearchViewModel
- SearchViewDataSource <- Adapt UITableViewDataSource and UITableViewDelegate
Show local on memory favorite repositories
- FavoriteViewModel
- FavoriteViewDataSource <- Adapt UITableViewDataSource and UITableViewDelegate
Show Github user's repositories
- UserRepositoryViewModel
- UserRepositoryViewDataSource <- Adapt UITableViewDataSource and UITableViewDelegate
Show a repository and add / remove local on memory favorites
You can add / remove favorite repositories in RepositoryViewController, but an Array of favorite repository is hold by FavoriteViewController.
You need to set Github Personal Access Token like this.
extension ApiSession {
static let shared: ApiSession = {
let token = "" // <- Your Github Personal Access Token
return ApiSession(injectToken: { InjectableToken(token: token) })
}()
}- Xcode 12 or later
- iOS 13 or later
- Swift 5 or later
marty-suzuki, [email protected]
iOSDesignPatternSamples is available under the MIT license. See the LICENSE file for more info.




