Work / Rorty
Personal project · case study · 2022 · 4 stacks
Rorty: one app, four stacks
I wrote one app on four stacks, Android Views, Jetpack Compose, Flutter and SwiftUI, on the same Clean Architecture layers, as open-source references for apps that have to last. Its five repositories have 676 stars on GitHub.
- Role
- Designer and sole author
- Period
- 2022 · January to June; the Flutter app updated until 2024
- Platforms
- Android and iOS; the Flutter app on the web and macOS too
- Stacks
- Kotlin with Views and with Compose, Dart with Flutter, Swift with SwiftUI
- Source
- Public, five repositories on GitHub
- Outcome
- 676 stars, 121 forks
Context
Rorty is one small app: Rick and Morty’s characters, episodes and locations from a public API, cached on the device. I wrote it on each stack I worked with, with the same architecture.
The problem
A sample that fits in one file teaches nothing about an app that lives for years with a team. These references had to carry what a larger app needs, modules, layers, tests and static analysis, and stay small enough to read in an evening.
My role
A personal project, outside work. I designed the architecture once and wrote it on each stack, and wrote about the Compose version on Medium.
Decisions
01 One app on every stack
- Options
- A different sample per stack · the same app on each
- Chosen
- Rick and Morty’s characters, episodes and locations in Views, Compose, Flutter and SwiftUI
- Why
- The stacks compare like for like: the same screens, the same data, the same edge cases.
- Cost
- Five codebases to keep up, each with its own libraries.
02 The same layers everywhere
- Options
- Each stack’s own habits · one architecture in each stack’s tools
- Chosen
- Data, domain and presentation on every stack: a repository over the API and a local cache, use cases, MVVM
- Why
- One design, read in four languages; only the tools change: Room, Floor or Core Data; Retrofit, Dio or Combine.
- Cost
- On a small screen the layers are more ceremony than it needs.
03 Modules for a team, not a sample
- Options
- One module · modules by layer and by feature
- Chosen
- buildSrc for the dependencies, common for the theme and components, libraries for the framework and the test helpers, then data, domain and the features
- Why
- The structure a larger app grows into, shown while it is still small.
- Cost
- More setup than a five-screen app needs.
04 Checks in a sample too
- Options
- The code alone · the code with its tests and rules
- Chosen
- Unit tests on Android with Robolectric, MockK, Turbine and Truth; ktlint, Spotless and detekt; SwiftLint; Flutter’s lints
- Why
- A reference people copy should hand them its checks too.
- Cost
- Tests and rules to keep current on every stack.
Architecture
Rorty’s layers: four stacks draw the same screens over one domain and one data layer, which reads the API and keeps a local cache.
- Views: ViewBinding, Paging 3, Hilt
- Compose: Navigation, Paging 3, Hilt
- Flutter: Stacked MVVM, GetIt, go_router
- SwiftUI: MVVM, Resolver
- domain: use cases, one action each
- data: repositories for the domain
- remote: Retrofit · Dio · Combine
- local: Room · Floor · Core Data
- model: DTOs between the API, the cache and the domain
Views → domain · Compose → domain · Flutter → domain · SwiftUI → domain · domain → data · data → remote · data → local · data → model
Each stack draws the same screens over the same layers; only the libraries change.
Outcomes
- 676 Stars: across five repositories
- 121 Forks: on GitHub
- 4 Stacks: Views, Compose, Flutter, SwiftUI
- 253 JetRorty: stars, the Compose version
From GitHub, November 2026.
Looking back
Four codebases for one app showed what it costs to draw it four times: every screen, theme and fix written once for each stack. Pantrix UI, Formatico and this site answer that with one Kotlin codebase for every platform, and the same rules in the build.