Skip to content

alifu/TMDB-RIBs-iOS

Repository files navigation

🎬 TMDB-RIBs-iOS

Swift Platform Architecture

A modular iOS application powered by RIBs architecture, consuming The Movie Database (TMDB) API to showcase movie data — such as now playing, popular, top-rated, and more. This project demonstrates scalable, reactive, and maintainable iOS app architecture.

Preview


✨ Features

🎥 Core

  • Browse Now Playing, Up Coming, Popular, and Top Rated movies
  • Movie Detail View — overview, release info, rating, genres
  • Search movies by title with live updates
  • Watch List movies by clicked save button
  • Infinite Scroll & Pagination support
  • Error / Empty / Loading state handling

🧩 Architecture & Tech

  • RIBs (Router-Interactor-Builder) modular architecture
  • RxSwift for reactive data flow
  • Moya for TMDB API integration
  • SnapKit for programmatic Auto Layout
  • Kingfisher for efficient image caching
  • Clean navigation and dependency injection per feature

🧱 Architecture Overview

RIBs separates business logic, navigation, and view rendering into distinct units.

Root RIB
 ├── Home RIB (handle scrolling and pagination/load more)
 │      ├── Featured RIB (Trending movies by today)
 │      ├── Mini Tab RIB (tab inside page)
 │      └── Movie List RIB (Now Playing, Up Coming, Top Rated, Popular)
 ├── Search RIB (browse, search)
 ├── Watch List RIB (saved movies)
 └── Movie Detail RIB (backdrop, poster and movie info)
        ├── Carousel Movie RIB (backdrop and trailer)
        ├── Mini Tab RIB (tab inside page)
        └── Movie Detail Info RIB (overview, reviews, actors & crew)
Component Responsibility
Router Handles navigation and view hierarchy
Interactor Core business logic, handles user actions
Builder Assembles RIB components with dependencies
Presenter / ViewController Displays data & binds to Interactor

Communication between RIBs

One-way Two-way
drawing drawing

⚙️ Tech Stack

Library / Framework Purpose
RIBs Modular architecture framework
RxSwift Reactive programming
Moya API networking abstraction
Kingfisher Image loading & caching
SnapKit Programmatic Auto Layout
UIKit View rendering
Swift Package Manager Dependency management

🚀 Getting Started

Prerequisites

  • Xcode 26 or later
  • iOS 15.0+ target
  • Swift 5.9+
  • TMDB API key (get one here)

Installation

  1. Clone this repository:

    git clone https://github.com/alifu/TMDB-RIBs-iOS.git
    cd TMDB-RIBs-iOS
  2. Configure your API key
    Duplicate .env.example file and rename to .env or using this command in terminal:

    $ cp .env.example .env

    Then set all variable base on your account from here.

  3. Open the project:

    open TMDB-RIBs-iOS.xcodeproj
  4. Build & run the app:

    • Select a simulator or device
    • Press ⌘ + R

Swift Package Manager will automatically fetch dependencies on first build.


📂 Project Structure

TMDB-RIBs-iOS/
├── Module/
│   ├── Root/
│   ├── FeaturedMovie/
│   ├── MainTabbar/
│   ├── MiniTab/
│   ├── MovieDetail/
│   ├── CarouselMovie/
│   ├── MovieDetailInfo/
│   ├── MovieList/
│   ├── Search/
│   └── WatchList/
├── Data/               # Model and APIManager
│   └── Model/          # Data models (Movie, Genre, etc.)
├── Networking/         # TMDB API layer
├── ReusableView/       # Custom UI components
├── Extension/          # UIKit / RxSwift extensions
├── Utils/              # Color, fonts, etc.
└── App/                # AppDelegate, SceneDelegate, etc.

Each module is an isolated RIB to ensure independence and reusability.


🔌 API Integration

Using The Movie Database API, common endpoints include:

Endpoint Description
/trending/movie/day Today trending movies
/movie/now_playing Now playing movies
/movie/popular Popular movies
/movie/top_rated Top-rated movies
/movie/upcoming Top-rated movies
/movie/{id} Movie details
/movie/{id}/credits Cast & crew
/movie/{id}/review Movie reviews
/search/movie Search for movies
/movie/{id}/account_states Movie status that connected to account
/account/{accountID}/watchlist/movies Watch List movies
/movie/{id}/videos Trailer or marketing videos

Networking is handled through Moya for cleaner endpoint definitions and response mapping.


🔗 Deeplink

Status Deeplink Description
appworktmdb://search?query={query} Route to search page with query search
appworktmdb://movie/{movieID} Route to detail page based on movie ID
appworktmdb://home/tab/{type} Route to home page based on movie list (type: now_playing, up_coming, top_rated, popular)

🧪 Roadmap

Status Feature
Movie discovery (now playing, popular, top-rated, etc)
Movie search
Movie details (overview, rating, release year)
Modular navigation using RIBs
Cast and video sections
Caching support for images
Trailer
Deeplink
🚧 Offline cache support for APIs
🚧 Unit & UI tests
🚧 SwiftUI hybrid example

Design Canvas

graph


🧠 Learning Objectives

This project aims to demonstrate:

  • Clean modular architecture using RIBs
  • Reactive UI updates with RxSwift
  • Clear API abstraction using Moya
  • UI layout with SnapKit
  • Maintainable module boundaries for large-scale iOS apps
  • Implementation of Liquid Glass effect (iOS 26+) within UITabBarController

💧 Liquid Glass Tab Bar (iOS 26+)

Starting from iOS 26, UIKit introduces support for glass-like translucency using the new UIBlurEffect and UITabBarAppearance APIs.
This project includes an example of how to:

  • Enable Liquid Glass / Transparent Material effect in the UITabBarController
  • Support vibrancy and layered blur under iOS 26 and newer
  • Maintain fallback appearance for earlier iOS versions (≤ iOS 18)
  • Integrate the effect cleanly into a modular RIBs-based UI flow

The goal is to show how modern UI effects can coexist with a scalable architecture.


🪪 License

This project is licensed under the MIT License.


🙏 Acknowledgments


Built with passion for clean architecture and movies. 🎬
@alifu

About

This project is part of my iOS development portfolio

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages