Skip to content

HasibNirjhar07/GameExplorer

Repository files navigation

🎮 GameExplorer - iOS Game Discovery App

Swift iOS Architecture License

A beautifully designed iOS app for discovering video games using the RAWG.io API. Built with VIPER architecture for scalability, testability, and maintainability.

📸 Screenshots

GameList Details Search
GameList Details Search

✨ Features

  • 📋 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

🚀 Quick Start

  1. Clone the repository

    git clone https://github.com/HasibNirjhar07/GameExplorer.git
    cd GameExplorer
  2. Get RAWG.io API Key

    • Visit RAWG.io API
    • Sign up and generate your free API key
  3. Add API Key

    • Open NetworkManager.swift
    • Replace "YOUR_API_KEY_HERE" with your actual key
  4. Build and Run

    • Open in Xcode, select iPhone 14+ simulator, press Cmd + R

📁 Project Structure

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

🏛️ VIPER Architecture

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

🔌 API Endpoints

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

📚 Technologies

  • UIKit, URLSession, Codable
  • Auto Layout, Protocol-Oriented Programming
  • Dependency Injection, SafariServices

🧪 Testing

Each VIPER component is independently testable using mock objects. Example:

class GameListPresenterTests: XCTestCase {
    func testViewDidLoadShowsLoading() {
        presenter.viewDidLoad()
        XCTAssertTrue(mockView.showLoadingCalled)
    }
}

🐛 Troubleshooting

  • 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+

🚀 Future Enhancements

  • Image caching with NSCache
  • Pagination on scroll
  • Favorites feature with Core Data
  • Dark mode support
  • Game reviews and screenshots
  • Video previews and offline support

📄 License

MIT License - See LICENSE file for details

🙏 Acknowledgments

About

An iOS application for Game Description and Searching

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages