SwiftHub is an iOS app to browse the most popular Swift repositories on GitHub. You can tap a repository to see its Pull Requests (PRs), filter them by Todos, Aberto, Fechado, and Mesclado, and open each PR in a modal web view. The app uses GitHub APIs to get the data.
The app supports theming for both light and dark modes:
- Browse the most popular Swift repositories.
- Infinite scrolling on the Home screen to load more repositories as you scroll.
- View Pull Requests for each repository.
- Infinite scrolling on the Pull Requests screen to load more PRs dynamically.
- Filter PRs by status: Todos (All), Aberto (Open), Fechado (Closed), Mesclado (Merged).
- Open PRs in a modal web view.
- Light and Dark mode support.
- Fully modular architecture with reusability in mind.
- Memory management validated using Debug Memory Graph.
SwiftHub is built with Swift, using MVVM, Coordinator Pattern, Clean Architecture, and modularization via Swift Package Manager (SPM).
Key technologies:
- UIKit – Core UI framework.
- RxSwift – Reactive programming for data binding and event handling.
- Swinject – Dependency injection for better decoupling and testability.
- Kingfisher - Loads and cache images.
- Swift Testing – Unit tests with 100% coverage for:
- ViewModels
- Mappers
- Domains (UseCases)
- Data layer (Repositories, DataSources, DTOs)
- Fastlane – Automates tests.
- GitHub Actions – Runs automated unit tests on every Pull Request to ensure code quality.
SwiftHub is divided into the following modules for maximum reusability and separation of concerns:
- Shared logic and rules.
- Entities, models, and protocols for communication between layers.
- Clean Architecture layers:
- Domain: UseCases.
- Data: Repositories, DataSources, DTOs.
- Network: API clients and remote data handling.
- Feature module for the main home screen.
- Supports infinite scrolling to load more repositories.
- Contains ViewController, ViewModels, UI components, and models.
- Feature module for Pull Requests screen.
- Supports infinite scrolling to load more PRs.
- Contains ViewController, ViewModels, UI components, and models.
- Shared UI components, extensions, and utilities.
- Highly decoupled: Each module is independent, making maintenance and updates easier.
- Reusability: Modules can be reused in other apps without modification.
- Testability: MVVM + Clean Architecture allows unit tests for all layers.
- Scalability: Adding new features or screens is straightforward due to modular design.
- Maintainability: Clear separation between layers and reduces dependencies.
- Clone the repository:
git clone https://github.com/williamtdepaula/SwiftHub.git- Open the project in Xcode and resolve Swift Packages.
- Run the app on a simulator or device.

