A beautifully designed iOS app for discovering video games using the RAWG.io API. Built with VIPER architecture for scalability, testability, and maintainability.
| GameList | Details | Search |
|---|---|---|
![]() |
![]() |
![]() |
- 📋 GameList Screen - Browse 20 popular games with ratings and pull-to-refresh
- 🎮 GameDetail Screen - View comprehensive game info, ratings, platforms, and website link
- 🔍 Search Screen - Real-time search functionality with instant results
- 🏗️ VIPER Architecture - Complete separation of concerns with protocol-oriented design
- 🖼️ Image Caching - Efficient image loading and memory management
-
Clone the repository
git clone https://github.com/HasibNirjhar07/GameExplorer.git cd GameExplorer -
Get RAWG.io API Key
- Visit RAWG.io API
- Sign up and generate your free API key
-
Add API Key
- Open
NetworkManager.swift - Replace
"YOUR_API_KEY_HERE"with your actual key
- Open
-
Build and Run
- Open in Xcode, select iPhone 14+ simulator, press
Cmd + R
- Open in Xcode, select iPhone 14+ simulator, press
GameExplorer/
├── Models/
│ └── Game.swift
├── Networking/
│ └── NetworkManager.swift
├── GameList Module/
│ ├── GameListViewController.swift
│ ├── GameListPresenter.swift
│ ├── GameListInteractor.swift
│ └── GameListRouter.swift
├── GameDetail Module/
│ ├── GameDetailViewController.swift
│ ├── GameDetailPresenter.swift
│ ├── GameDetailInteractor.swift
│ └── GameDetailRouter.swift
└── Search Module/
├── SearchViewController.swift
├── SearchPresenter.swift
├── SearchInteractor.swift
└── SearchRouter.swift
Each module follows the VIPER pattern with clear separation of concerns:
- View - Display data, capture user input
- Interactor - Business logic, API calls
- Presenter - Bridge between View and Interactor
- Entity - Data models
- Router - Navigation and module creation
GET https://api.rawg.io/api/games?key=YOUR_KEY&page=1
GET https://api.rawg.io/api/games?key=YOUR_KEY&search=QUERY
GET https://api.rawg.io/api/games/{GAME_ID}?key=YOUR_KEY
- UIKit, URLSession, Codable
- Auto Layout, Protocol-Oriented Programming
- Dependency Injection, SafariServices
Each VIPER component is independently testable using mock objects. Example:
class GameListPresenterTests: XCTestCase {
func testViewDidLoadShowsLoading() {
presenter.viewDidLoad()
XCTAssertTrue(mockView.showLoadingCalled)
}
}- Failed to load games - Check API key and internet connection
- Images not loading - Verify Info.plist App Transport Security config
- Build errors - Ensure all 17 files added to target, Swift 5.0+
- Image caching with NSCache
- Pagination on scroll
- Favorites feature with Core Data
- Dark mode support
- Game reviews and screenshots
- Video previews and offline support
MIT License - See LICENSE file for details
- RAWG.io - Video game database
- Apple Developer Documentation
- Clean Swift/VIPER community


