A lightweight SwiftUI app to browse GitHub users and their repositories using GitHub's public API.
The project follows a clean architecture approach with:
- UI Layer: SwiftUI with MVVM architecture
- Networking: Native async/await API calls
- Image Handling: Efficient local caching using NSCache
- State Management: Native SwiftUI state tools (@State, @StateObject, etc.)
- Dependency Injection: Protocol-based DI for flexibility & testability
- Testing: Unit tests with dependency injection
- GitHub user search and profile viewer
- Public repository listing with sorting options
- In-app WebView to preview GitHub user profiles and repositories
- Full support for Dark Mode
- Fast image loading with local cache
- Secure access token handling via .xcconfig
- Comprehensive unit & UI test coverage
GithubClient/ ├── Core/ # Core application logic ├── Components/ # Reusable UI components ├── Extensions/ # Swift extensions ├── Models/ # Data models ├── Mock/ # Mock data for testing ├── Networking/ # Network layer, API endpoints, environment configs ├── Resources/ # Assets: colors, fonts, icons ├── Services/ # API services └── Utility/ # Helpers and utilities - iOS 18.0+
- Xcode 16.0+
- Swift 5
- GitHub personal access token
- Clone the repository:
git clone https://github.com/AungHtooMyatKhaing/GithubClientApp.git-
Open
GithubClient.xcodeprojin Xcode -
Create a
Secrets.xcconfigfile with your GitHub API credentials:
GITHUB_ACCESS_TOKEN = your_github_access_token - Build and run the project
The project includes both unit tests and UI tests:
- Unit tests are located in
GithubClientTests/ - UI tests are located in
GithubClientUITests/
Run tests using Cmd+U in Xcode or through the Test navigator.
- GitHub API
