/swiftui-mvvm-di

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

Primary LanguageSwift

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.