almohajer / swiftui-mvvm-di

A Modular SwiftUI iOS app with MVVM architecture utilizing IoC and DI

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SwiftUI+MVVM+DI Demo

Light Dark
Light.mp4
Dark.mp4

High-level Design

Requirements:

Functional:

  • Fetching and parsing data from API.
  • Listing Data.
  • Searching.
  • Search suggestions.
  • Navigation to Details view.
  • Dark mode.

Non-Functional:

  • Performance:

    • Caching images.
  • Scalability:

    • Modularity.
  • Reliability:

    • Unit tests.

Design Decisions

  • UI:

    • SwiftUI
    • MVVM Architecture
  • Principals and Patterns:

    • SOLID conformance:
      • Features are separated into modules.
      • UseCases for business logic.
    • Utilizing IoC and DI.
    • Coordinator pattern for navigation.
  • Dependency Manager:

    • Swift Package Manager
  • Dependencies:

    • Swinject: Dependency injection framework.
    • Kingfisher: Downloading and caching images from the web.

What could be improved

  • Use Repository pattern if local data storage is needed in the future.

About

A Modular SwiftUI iOS app with MVVM architecture utilizing IoC and DI


Languages

Language:Swift 100.0%