Skip to content

josevictor1/GitHubFollowersApp

Repository files navigation

GitHubFollowersApp

CI codecov

Demo

Description 🗒

The GitHubFollowersApp is a portfolio based on the GitHub API.

Architecture 📐

The architecture was based on MVC(Model-View-Controller) that provides a separation of concerns between the existing layers. This particular implementation adds more elements on the Controller layer, creating an additional element LogicController, that is responsible to control all the business logic and the communication with the Model layer.

To manage the routing a Coordinator was added to each module where every scene accessed the coordinator to navigate in the flow. This way the navigation logic was moved from ViewController to the Coordinator.

These changes resulted in a more concise ViewController implementation, reducing its responsibility to control the controller and format data to implementation.

The image bellow ilustrates tbe implementation:

This architectural changes on MVC were based on three articles:

Modules 📦

The modules were created to separate reusable aiming to be used as libraries in another project and also to improve the isolation of each feature allowing new features to be built and added as libraries and handling these features as small apps.

The app is composed of 10 modules (Frameworks) grouped by folders accordingly to the usage:

  • App: The folder that contains only the main module.
    • GitHub: The main project module that groups the usage of all other modules.
  • Features: The folder that contains all feature modules in the app.
    • FavoriteProfiles: The feature that shows up the favorited profiles.
    • GetFollowers: The App first screen, where the user enters with the GitHub username and show up all its followers.
    • UserInformation: The feature that shows up the GitHub information for a specific user.
  • In-House Frameworks: Contains frameworks that are used as tools in the app.
    • ImageDownloader: Responsible to download and caching images.
    • Networking: As the name says is that module that provides an interface with the URL session.
    • UIComponents: Centralize all custom reusable components.
    • Core: This contains the central and the common code used by all the modules.
    • Commons: Centralize common code tools used in the app.
  • Services: Layer that holds that communication interface between app and service.
    • Data Store: Responsible to cache long-term data.
    • GitHub services: Centralize the service interfaces used in the app by one or more screens.

The image bellow illustrates it:

Stack 📚

  • Swift 5
  • UIKit
  • Core Data
  • Modularization
  • NSCache
  • Diffable DataSource
  • Dynamic Type
  • System Theme
  • Unit Tests

Minimum Requirements 💻

  • Xcode 14

How to run it 📲

  • This project doesn’t contain any particularity. You can open the GitHub.xcworkspace, tap on the play button, or type command+R.

How to use it 🧐

The app is really simple to use once it works as a gallery. To see the items in the galley you can select a github profile.