Medium Thomas Ricouard Apr 26, 2022

Evolution of the Medium iOS app architecture

Article Summary

Medium's iOS team ditched their monolith for Swift packages and SwiftUI. A year later, they're shipping features faster than ever.

Thomas Ricouard from Medium Engineering shares how they transitioned from a monolithic iOS architecture to a package-based system. This follow-up details what worked, what didn't, and how the team structures features today.

Key Takeaways

Critical Insight

Medium's modular architecture with Swift packages and SwiftUI dramatically improved iteration speed, though the transition took over a year of incremental work.

Their approach to handling GraphQL at the feature level solves a problem most teams struggle with when breaking up monoliths.

About This Article

Problem

Medium's iOS codebase was monolithic, which made debugging tedious and slowed down how quickly teams could iterate on UI-heavy features. Everything was tightly coupled, so changes required coordination across multiple components.

Solution

Thomas Ricouard's team restructured the codebase by splitting it into Model and Features Swift packages. GraphQL queries and protocol extensions moved to the feature level instead of living in shared code.

Impact

Build and debug cycles got noticeably faster. The team could now swap out entire UI implementations in seconds using SwiftUI, whereas UIKit transitions used to take minutes.