Back to rankings

kudoleh/iOS-Clean-Architecture-MVVM

Swifttech.olx.com/clean-architecture-and-mvvm-on-ios-c9d167d9f5b3

Template iOS app using Clean Architecture and MVVM. Includes DIContainer, FlowCoordinator, DTO, Response Caching and one of the views in SwiftUI

clean-architectureios-swiftswiftuimvvm-iosmvvm-architectureviewmodelmvvmxcodearchitectureviewmodels
Star Growth
Stars
4.4k
Forks
730
Weekly Growth
Issues
4
2k4k
Jan 2023Mar 2024May 2025Jul 2026
README

Template iOS App using Clean Architecture and MVVM

iOS Project implemented with Clean Layered Architecture and MVVM. (Can be used as Template project by replacing item name “Movie”). More information in medium post: Medium Post about Clean Architecture + MVVM

Alt text

Layers

  • Domain Layer = Entities + Use Cases + Repositories Interfaces
  • Data Repositories Layer = Repositories Implementations + API (Network) + Persistence DB
  • Presentation Layer (MVVM) = ViewModels + Views

Dependency Direction

Alt text

Note: Domain Layer should not include anything from other layers(e.g Presentation — UIKit or SwiftUI or Data Layer — Mapping Codable)

Architecture concepts used here

Includes

  • Pagination
  • Unit Tests for Use Cases(Domain Layer), ViewModels(Presentation Layer), NetworkService(Infrastructure Layer)
  • Dark Mode
  • Size Classes and UIStackView in Detail view
  • SwiftUI example, demostration that presentation layer does not change, only UI (at least Xcode 11 required)

Networking

If you would like to reuse Networking from this example project as repository I made it availabe here

Views in Code vs Storyboard

This repository uses Storyboards (except one view written in SwiftUI). There is another similar repository but instead of using Storyboards, all Views are written in Code. It also uses UITableViewDiffableDataSource: iOS-Clean-Architecture-MVVM-Views-In-Code

How to use app

To search a movie, write a name of a movie inside searchbar and hit search button. There are two network calls: request movies and request poster images. Every successful search query is stored persistently.

https://user-images.githubusercontent.com/6785311/236615779-153ef846-ae0b-4ce8-908a-57fca7158b9d.mp4

Requirements

  • Xcode Version 11.2.1+ Swift 5.0+
Related repositories
ryanmcdermott/clean-code-javascript

Clean Code concepts adapted for JavaScript

JavaScriptnpmMIT Licensejavascriptprinciples
94.7k12.5k
jasontaylordev/CleanArchitecture

Clean Architecture Solution Template for ASP.NET Core

C#MIT Licenseclean-architecturetemplate
cleanarchitecture.jasontaylor.dev
20.3k4.2k
ardalis/CleanArchitecture

Clean Architecture Solution Template: A proven Clean Architecture Template for ASP.NET Core 10

C#MIT Licenseclean-architecturearchitecture
18.3k3.1k
Sairyss/domain-driven-hexagon

Learn Domain-Driven Design, software architecture, design patterns, best practices. Code examples included

TypeScriptnpmMIT Licensedomain-driven-designhexagonal-architecture
14.8k1.6k
kgrzybek/modular-monolith-with-ddd

Full Modular Monolith application with Domain-Driven Design approach.

C#MIT Licensedddddd-architecture
13.9k2.2k
mehdihadeli/awesome-software-architecture

📚 A curated list of awesome articles, videos, and other resources to learn and practice software architecture, patterns, and principles.

Creative Commons Zero v1.0 Universalarchitectureddd
awesome-architecture.com
11.4k993
dotnet-architecture/eShopOnWeb

Sample ASP.NET Core 8.0 reference application, now community supported: https://github.com/NimblePros/eShopOnWeb

C#MIT Licenseasp-net-coreasp-net-core-mvc
10.7k6k
bxcodec/go-clean-arch

Go (Golang) Clean Architecture based on Reading Uncle Bob's Clean Architecture

GoGo ModulesMIT Licensearchitecturegolang
10.1k1.3k
labs42io/clean-code-typescript

Clean Code concepts adapted for TypeScript

TypeScriptnpmMIT Licenseclean-codetypescript
labs42io.github.io/clean-code-typescript
9.8k1.2k
thangchung/clean-code-dotnet

:bathtub: Clean Code concepts and tools adapted for .NET

C#MIT Licenseawesomeaspnet
7.7k1.1k
evrone/go-clean-template

Clean Architecture template for Golang services

GoGo ModulesMIT Licenseclean-architecturego
7.6k658
igorwojda/android-showcase

💎 Android application following best practices: Kotlin, Coroutines, JetPack, Clean Architecture, Feature Modules, Tests, MVVM, DI, Static Analysis...

KotlinMIT Licensekotlinandroid
6.8k908