Skip to content

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

Notifications You must be signed in to change notification settings

MostafaNafie/swiftui-mvvm-di

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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.