DEV Community

Shiva Thapa
Shiva Thapa

Posted on Originally published at Medium on

One Codebase, Six Apps on the Play Store: An Architecture Deep Dive

How a Kotlin Multiplatform monorepo ships an entire app portfolio — features as libraries, apps as thin shells — and what that actually costs to run.

Six of my apps ship to Google Play: a score-keeping toolbox, a chess clock, a tally counter, a spin-the-bottle game, a Call Break scorer, and a Truth or Dare game. Six separate listings, six package names, six signing keys, six independent release streams, six sets of store screenshots.

They are also one Git repository. One Gradle sync. Any of the six release bundles is a single ./gradlew invocation away, and the iOS builds of the same apps come out of the same tree - the App Store versions are next.

This article is a tour of the architecture that makes that sustainable for a solo developer: the module topology, the small set of rules everything else follows from, the release pipeline that gives every app its own version stream, and — because any honest write-up owes you this — the parts that hurt.

Why six apps at all

The flagship app, Tallyo , is a game-night toolbox: a generic round-based score calculator, a Call Break scorer, a chess timer, a multi-counter tally, a stopwatch, a dice roller, a coin flip, a spinner wheel, spin the bottle, truth or dare, and a few more party utilities behind one home screen.

The product insight that produced the other five is simple: app-store search is tool-shaped. Somebody who needs a chess clock types “chess clock” into the store. They will not install a party toolbox to get one, and the store’s ranking will not show them one. So the tools that can stand on their own get listings of their own, five of them so far:

  • Tallyo — com.tallyo.tallyo, built from everything
  • Chess Clock — com.tallyo.chess, built from :feature:chesstimer:*
  • Tally Counter — com.tallyo.counter, built from :feature:counter:*
  • Spin the Bottle — com.tallyo.spinbottle, built from :feature:spinbottle:*
  • Call Break Scorer — com.tallyo.callbreak, built from :feature:callbreak:*
  • Truth or Dare — com.tallyo.truthordare, built from :feature:truthordare

The naive reading of that list is “sixfold maintenance.” The entire point of the architecture is that it isn’t. Each standalone app is a thin shell (three small Gradle modules and an Xcode project, plus store assets and a keystore) around feature code that already existed. Counter, Call Break, and Truth or Dare all began life as screens inside the flagship and were then promoted to their own listings. Two of those promotions changed no feature code at all ; the third added one optional slot to Call Break’s settings screen. That promotion path is the proof that the architecture works, and the rest of this article explains what makes it possible.

The one rule everything follows from

Features are libraries. Apps are shells.

A feature module knows nothing about which app is hosting it. It exposes screens, a navigation graph fragment, a dependency-injection module, and (if it needs them) its own database and settings store. It does not know its application ID, its theme defaults, whether ads exist, or whether it is one tool among ten or the only tool in the app.

An app shell owns identity and assembly, and nothing else: the application ID, the icon, the splash screen, the navigation graph it composes out of feature fragments, the DI tree it assembles, the monetization configuration, and the signing setup.

Even the flagship follows this rule. :composeApp, Tallyo's shared entry point, has no privileged status; it is simply the largest shell in the repository. Once that is true, "ship this feature as its own app" stops being a project and becomes an afternoon of shell wiring.

The topology

The repository is currently 99 Gradle modules , organized in three strict layers plus the build logic that configures them:

build-logic/ convention plugins (the boilerplate killer)
│
core/ 15 modules - shared platform
│ ui, resources, presentation, platformSpecific, permission,
│ datastore, utils, logger, observability, review,
│ billing, ads, adsui, adsremoteconfig,
│ appshell (Android only: the base Application and Activity)
│
feature/ 21 feature roots - nearly every screen in the portfolio
│ scoreCalculator/ callbreak/ counter/ (split features)
│ chesstimer/ spinbottle/ diceroller/ stopwatch/ (lighter split features)
│ flipacoin magic8ball truthordare spinnerwheel … (single-module)
│ rewards devmessage donate settings/
│
composeApp/ + androidApp/ the flagship shell (Tallyo)
baselineprofile/ the flagship's baseline-profile generator
apps/
    chess/ composeApp + androidApp + baselineprofile
    counter/ 〃
    spinbottle/ 〃
    callbreak/ 〃
    truthordare/ 〃
    shared/ About + Theme & Colors, shared by the five standalone apps
Enter fullscreen mode Exit fullscreen mode

The dependency direction is non-negotiable: apps → features → core , never sideways, never up. A feature’s screen modules may depend on that same feature’s domain/database/datastore modules, and everything may depend on :core:*. Nothing in feature/ may reference another feature, and nothing in core/ or feature/ may reference a shell.

Two modules are Android-only by design: :core:appshell, which only the six app shells link, and :feature:counter:widget, the Counter home-screen widget, which a shell opts into with a single flag.

settings.gradle.kts reads like a manifest of the whole strategy. Each standalone app is three lines and a comment stating the contract:

// Call Break Scorer - separate Play / App Store listing (com.tallyo.callbreak).
// Shares :core:* and :feature:callbreak:* with Tallyo; only the app shell lives here.
include(":apps:callbreak:composeApp")
include(":apps:callbreak:androidApp")
include(":apps:callbreak:baselineprofile")
Enter fullscreen mode Exit fullscreen mode

Convention plugins: how 99 modules stay cheap

Ninety-nine modules are only viable if a module costs almost nothing to declare. Every shared module in this repo applies a locally built convention plugin instead of carrying its own kotlin {} and android {} blocks, and the 60 with UI apply a second one for Compose. Here is the first:

class KotlinMultiplatformConventionPlugin : Plugin<Project> {
    override fun apply(target: Project): Unit = with(target) {
        with(pluginManager) {
            apply(libs.findPlugin("kotlinMultiplatform").get().get().pluginId)
            apply(libs.findPlugin("android.kotlin.multiplatform.library").get().get().pluginId)
            apply(libs.findPlugin("kotlinSerialization").get().get().pluginId)
        }
        extensions.configure<KotlinMultiplatformExtension>(::configureKotlinMultiplatform)
        extensions.configure<KotlinMultiplatformAndroidComponentsExtension>(
            ::configureKotlinMultiplatformAndroidLibrary
        )
    }
}
Enter fullscreen mode Exit fullscreen mode

The convention configures the iOS targets (iosArm64, iosSimulatorArm64), pins the JVM target, applies the default source-set hierarchy, wires the baseline dependencies (Koin, coroutines), and derives the Android namespace mechanically from the module path, so no module ever declares one:

val moduleName = project.path
    .removePrefix(":")
    .replace(":", ".")

androidExtension.namespace = "com.tallyo.tallyo.$moduleName"
Enter fullscreen mode Exit fullscreen mode

The result: a typical feature module’s build.gradle.kts is under twenty lines - two plugin aliases, a dependency list, done. When a policy changes (a new compile SDK, a packaging exclusion, consumer ProGuard rules), it changes in one place and every module inherits it. This is the same idea Google's Now in Android popularized, applied to a KMP library codebase; at this module count it is not a nicety, it is the load-bearing wall.

There are four of these plugins now: the KMP library and Compose conventions above, one for the Android app shells (more on that below), and one for the baseline-profile generators.

Two shapes of feature, chosen deliberately

Not every feature deserves a dozen modules. The repo recognizes exactly two shapes and forces a choice up front:

The split feature  — for anything with multiple screens, per-round state, or persistence. Call Break has the full set:

feature/callbreak/
    domain/ pure models + the score engine (no Android, no Compose)
    database/ Room DB + DAOs + entities + migrations
    datastore/ feature-scoped settings (Preferences DataStore)
    presentation/ feature-specific shared composables
    feature/
        home/ gamesetup/ addplayer/ currentgameplay/
        gamedetail/ playerprofile/ history/ settings/
Enter fullscreen mode Exit fullscreen mode

Lighter split features take only the modules they need; the chess timer is a settings store and two screens.

The eight screen names are a canonical template, and every split feature draws from it. Call Break uses all eight and Score Calculator seven; Counter, which is not a game, keeps the layout and gives its setup and play screens names of their own (countersetup, counting). That sameness is deliberate: when Score Calculator, Call Break, and Counter all decompose the same way, navigating an unfamiliar feature costs nothing, and the next feature is scaffolding rather than design work.

The single-module mini-feature  — for self-contained toys: one module, one screen, one ViewModel, one Koin module (:feature:flipacoin, :feature:magic8ball, :feature:truthordare, and friends).

Two details make features extractable into standalone apps later, and both are about ownership:

  1. Each feature owns its persistence outright. Call Break has its own Room database module; Counter has its own; nothing shares tables. There is no app-wide database that would need to be sliced apart when a feature moves out.
  2. Each feature owns its settings keys. DataStore Preferences.Key constants live in the feature's own module, never in :core:datastore. The core module owns only genuinely app-wide state (theme, dark mode).

When Truth or Dare got its own listing, the feature module was not touched. That is the standard I hold the structure to.

Anatomy of an app shell

Here is the entire Truth or Dare app, minus store assets:

apps/truthordare/
    composeApp/ MainApp() + NavHost + Koin assembly (+ iOS entry point)
    androidApp/ one build call, a 40-line Application and a 20-line Activity
    baselineprofile/ records this app's own baseline profile on an emulator
    iosApp/ the Xcode project: a SwiftUI host plus Firebase and ads bridges
Enter fullscreen mode Exit fullscreen mode

The About and Theme & Colors screens (the latter doubles as Truth or Dare’s settings hub) come from apps/shared/, which the five standalone apps link instead of each forking their own.

The most honest description of “what is this app?” in this codebase is the shell’s Koin assembly. It is short enough to read whole:

/** The RevenueCat entitlement that grants Truth or Dare Pro. */
const val TRUTHORDARE_ENTITLEMENT_PRO: String = "Truth or Dare Pro"

val listOfDiModules = dataStoreModules.plus(
    listOf(
        platformSpecificModule,
        observabilityModule, // Analytics / Crashlytics / Performance
        module { single { MoreAppsVisibility(get()) } },
        billingModule(
            entitlementId = TRUTHORDARE_ENTITLEMENT_PRO,
            tipsOfferingId = TRUTHORDARE_TIPS_OFFERING,
        ),
        adsModule,
        reviewModule, // the store's own rating card
        donateUiModule,
        rewardsModule(RewardScope.TRUTH_OR_DARE),
        devMessageModule,

        themeAndColorsUiModule,
        aboutUiModule,

        truthOrDareUiModule, // the actual feature
    )
)
Enter fullscreen mode Exit fullscreen mode

An app, in this architecture, is a list of DI modules and a navigation graph. The flagship’s version of this same file assembles nearly seventy modules; Truth or Dare’s assembles fourteen. Same shape, different length.

Navigation composes the same way. Every feature exports a typed @Serializable route and a NavGraphBuilder extension for each of its screens; every shell owns its own NavHost and stitches together exactly the screens it wants. Tallyo and Call Break Scorer each assemble their own callBreakGraph() from the same eight screen builders. Chess Clock has no such graph and no dependency on Call Break at all, so the Call Break screens - and their Room database, and its bundled SQLite driver - do not exist in that APK.

The Android half of a shell is just as short. Its build file states only what makes it its own Play app, in one call to the shell convention plugin:

tallyoAppShell(
    applicationId = "com.tallyo.truthordare",
    keystore = "truthordare",
    signingEnvPrefix = "TRUTHORDARE_",
    requireKeystore = false,
    versionKey = "truthordare-app",
    admobAppIdSecret = "ADMOB_APP_ID_ANDROID_TRUTHORDARE",
    composeApp = ":apps:truthordare:composeApp",
)
Enter fullscreen mode Exit fullscreen mode

The flagship’s call differs in two telling places: requireKeystore = true, so Tallyo's release fails without its keystore instead of shipping unsigned, and counterWidget = true (Tally Counter sets it too), which links the home-screen widget module and merges its receiver into the manifest.

The shell’s Application and Activity extend base classes in :core:appshell and override only what differs: the RevenueCat key, the ad unit IDs, the Koin entry point and the root composable. Splash, edge-to-edge, consent, in-app updates, crash reporting and the ad session live once, in the base classes:

class MainActivity : TallyoShellActivity() {
    @Composable
    override fun Content() {
        MainApp(onExitApp = { finish() })
    }
}
Enter fullscreen mode Exit fullscreen mode

One shell detail worth stealing: platform-specific DI is a typed slot , not a convention.

data class PlatformModules(
    val ads: List<Module> = emptyList(),
)

fun initializeKoin(platform: PlatformModules = PlatformModules(), ...)
Enter fullscreen mode Exit fullscreen mode

On Android, the base Application builds the AdMob module from the shell's own ad unit IDs and hands it to the shell's initializeKoin; on iOS, the entry point passes iosAdsModule(host), where host is a Swift implementation of the ads bridge, or null, which makes it inert. Because the slot is a data class parameter rather than "remember to also load these modules," a new slot declared without a default is a compile error at every entry point instead of a NoBeanDefFoundException on one platform's cold start.

The third module records the app’s own baseline profile. The siblings used to ship Tallyo’s, whose recorded journeys never open Spin the Bottle or Truth or Dare, so those apps were precompiling somebody else’s hot path. Each app now has a generator that plays its own journeys, built from one shared set of steps. Copy one detail from it: the benchmark build type declares itself a debug build, with test ad units and billing switched off, because an emulator requesting a live ad is invalid traffic, and AdMob enforces that across the whole account.

Why not product flavors?

The question every Android engineer asks at this point: isn’t this what build flavors are for?

No. Flavors solve a different problem. Flavors are one app, several configurations: brand A vs. brand B, free vs. paid, staging vs. production. What I have is six different apps with six different feature sets that happen to share parts.

Concretely, flavors would have cost me the two properties I care most about:

  • Classpath isolation. With flavors, unused features are excluded by configuration you must maintain (per-flavor source sets and dependency declarations), and one mistake silently ships the Call Break engine inside the chess clock. With shells, exclusion is structural: the chess shell has no dependency edge to :feature:callbreak:*, so the compiler and the dependency graph enforce what a flavor config only promises. The feature toggle is the dependency graph.
  • Independent release identity. Six flavors of one module would still share one Gradle module’s version plumbing, one manifest merge tree, and one increasingly baroque build.gradle.kts. Six shells give each app its own signing config, its own Firebase project, its own version line, and its own release cadence with no interaction between them.

The trade-off is real: a shell is a physical thing you maintain, not a flag. The shell convention plugin now shrinks that thing to one function call and wins back the one advantage flavors had: configuration defined in a single place. It took me six shells to write it, and I price that honestly below.

Keeping money out of shared screens

Monetization is where “features are libraries” gets stress-tested, because ads and billing SDKs are the heaviest, most platform-bound dependencies in the app, and the easiest to leak everywhere.

Three structural decisions keep them contained:

1. Billing and ads are separate modules with a one-way street between them. :core:billing owns RevenueCat and nothing else. :core:ads owns the ads engine and nothing else; it depends on billing, never the reverse, and learns about premium status through a single Flow signal, so it never sees a RevenueCat type. A screen that only needs to know whether the user is premium (Theme & Colors, for one) links billing and never an ad SDK, and the "is this user premium?" logic has exactly one owner.

2. Compose ad surfaces live in their own module. :core:adsui (the native ad card, the banner slots) is deliberately not part of :core:presentation, the module every screen already depends on. A module gets ad UI only by depending on it explicitly, never as a side effect of using the shared components.

3. Shared screens take slots; shells fill them. A feature screen that ships in more than one app must not reference an ad component, because each app decides its own monetization. So screens expose a slot:

// :feature:counter:feature:counting - shared by Tallyo and Tally Counter
@Composable
fun CountingScreen(
    ...,
    bottomSlot: @Composable () -> Unit = {},
)
Enter fullscreen mode Exit fullscreen mode

and each shell decides what goes in it:

// Tallyo's nav graph
CounterCounting(
    ...,
    bottomSlot = { TallyoGameplayBannerSlot() },
)
Enter fullscreen mode Exit fullscreen mode

This rule was learned, not designed. An early version referenced ad UI directly from the shared Counter screens, which pulled the ads and billing SDKs into the standalone Counter APK — measured at more than 7,000 extra classes (6,551 from RevenueCat alone) in an app that, at the time, showed no ads at all. Hoisting the surface into the shell via a slot removed the entire subtree. Dependency hygiene here is not aesthetic; it shows up in APK size and method counts. (A few shared screens, Call Break’s and Truth or Dare’s, still place their own banner. That holds only because both apps that ship each of them show it in the same place, and it is exactly the kind of exception that turns into the next 7,000 classes.)

Slots carry ad surfaces in; callbacks carry facts out. A full-screen ad must never land on a game that is still running, and the chess clock keeps ticking while the app is in the background, so an app-open ad on the way back could cost a player their time. The shared chess screen cannot ask the ads engine whether that is allowed, because it does not link one. Instead it reports the one fact only it knows, and the shell turns it into an ads signal:

// Tallyo's chess graph: the board reports a live game, the shell tells the ads engine
onGameActiveChange = { live ->
    gameplayAdState.setInGameplay(GameplayAdState.CHESS_BOARD, live)
},
Enter fullscreen mode Exit fullscreen mode

The board reports it rather than the shell deriving it from the route, because being on the board is not the same as having a game on it. The feature stays ignorant of ads, and the policy stays in one place.

The same parameterization handles per-app billing: billingModule(entitlementId = ...). Each app is its own RevenueCat project with its own entitlement ("Call Break Pro", "Truth or Dare Pro"), and the shared billing code neither knows nor cares which app it is running in.

One version catalog, six release trains

Sharing a repository must not mean sharing a release cadence. Each app has its own version line, declared side by side in the single gradle/libs.versions.toml:

app-version = "3.3.2" # Tallyo
chess-app-version = "1.1.1"
counter-app-version = "1.1.1"
spinbottle-app-version = "1.1.1"
callbreak-app-version = "1.2.2"
truthordare-app-version = "1.1.1"
Enter fullscreen mode Exit fullscreen mode

Each of those lines has two siblings, -versionCode and -updatePriority. The last one goes to Play with each release as its in-app update priority, so a critical fix can ask users to update immediately without a code change.

(One hard-won convention hides in the naming: CI reads that priority with an anchored grep such as ^counter-app-updatePriority, and because the app name always comes first, Tallyo's bare ^app-updatePriority can never match a sibling's key. Prefix, never suffix.)

Releases are tag-driven, one prefix per app:

v3.3.2+18-production → Tallyo, versionCode 18, production
callbreak-v1.2.2+6-production → Call Break Scorer, versionCode 6, production
truthordare-v1.1.1+3-internal → Truth or Dare, versionCode 3, internal testing
Enter fullscreen mode Exit fullscreen mode

The tag suffix selects the Play track (internal → alpha → beta → production), so promoting a build is a tag, not a YAML edit. The optional + pins the version code; more on why below.

On the CI side there is exactly one release pipeline, a reusable GitHub Actions workflow, and six thin callers that parameterize it:

# TruthOrDarePublish.yml (tag trigger and secrets omitted)
jobs:
  publish:
    uses: ./.github/workflows/_publish.yml
    with:
      app_name: Truth or Dare
      tag_prefix: 'truthordare-'
      module_path: ':apps:truthordare:androidApp'
      package_name: com.tallyo.truthordare
      keystore_file: keystores/truthordare.jks
      env_prefix: 'TRUTHORDARE_'
      google_services_path: apps/truthordare/androidApp/google-services.json
      whatsnew_dir: apps/truthordare/distribution/whatsnew
      update_priority_key: truthordare-app-updatePriority

_publish.yml does everything once: extracts version and track from the tag, decodes the app's keystore and google-services.json from secrets, builds the bundle, and uploads it to Play with its release notes and in-app update priority. Fix the release flow once and all six apps inherit the fix: the same convention-plugin philosophy, applied to CI. Secrets follow a mechanical _ prefix scheme (CHESS_STORE_PASSWORD, TRUTHORDARE_KEYSTORE_BASE64), so provisioning app number seven is filling in a template.

Two operational details worth writing down before you copy this design:

  • Pin the version code in the tag. Without the + segment, the code falls back to github.run_number, which is scoped to the caller workflow file and knows nothing about Play's history: renaming ChessPublish.yml resets it to 1, and any upload made outside CI leaves it behind. Play rejects a code that is not higher than the last one it saw. I now pin every release (v3.3.2+18-production); the run number is only the fallback, and the caller files still carry do-not-rename warnings.
  • Decide what the merge gate covers. CI on every pull request runs the unit tests, assembles all six app shells and lints the flagship. All six, because each shell has its own NavHost, Koin graph and manifest, and a shared-module change can break one of them while the flagship still builds. The iOS framework link runs only on merges to main, because macOS minutes cost about ten times as much. That is a deliberate cost/coverage trade, and you should make yours consciously.

Testing what six apps share

A bug in a shared module can ship in six apps at once, so the tests sit where that blast would start. There are 373 of them across 15 modules today, most in commonTest, all running on the JVM host, and CI runs them on every pull request. Three things made that work in a KMP library codebase:

  • Prove the suite runs. AGP’s KMP library plugin creates no host-test compilation unless the module asks for one (withHostTest {}). Forget it and the suite compiles, never runs, and the build stays green. After adding a suite, I check that its XML report exists with a non-zero test count.
  • Run Room on the host through a test-only jvm() target. Each database module carries one that nothing ships, so the tests build the production database in memory. Migration tests build the old database from its schema and let Room run the real migration.
  • Let a model check the engine. For the three databases, fixed seeds of random operations run against the real database and are compared at every step with a small model written from the game rules, not from the engine. A failure names its seed and step, so it replays exactly. To test the tests, I broke the code under test on purpose 24 times; every break turned the suites red.

The multiplatform dividend

Everything above would hold for a pure Android monorepo. Kotlin Multiplatform is what turns six Play Store apps into (soon) twelve store listings without a second codebase.

Apart from the two Android-only modules, every shared module compiles to Android and iOS (iosArm64, iosSimulatorArm64, configured once, in the convention plugin). Each shell's composeApp produces that app's iOS framework, consumed by a minimal SwiftUI host. The discipline that makes this cheap is boring and constant rather than clever:

  • commonMain is the default; platform source sets are the exception. Anything touching Context, UIKit, or java.* goes behind an expect/actual seam. The seams are few and deliberate (only 12 of the 81 shared modules declare one), and most are what you would guess: platform info, haptics and sound, permissions and files, the theme entry point, keeping the screen awake, sharing an image, the store's review card, and the plumbing that Room, DataStore and Firebase need.
  • Platform truths get encoded as rules, not tribal knowledge. When something compiles for Android and breaks only on the iOS side, the fix ships together with a written rule, so nobody pays for the same lesson twice. The iOS link on every merge to main exists to catch exactly that class of bug.
  • Firebase stays out of shared code, even though KMP wrappers for it exist. Observability is shared behind provider-agnostic interfaces (AnalyticsHelper, CrashReporter), with the Firebase implementation wired per platform - on iOS via a small Swift bridge - so shared code never sees a Firebase type.
  • Even business posture is a per-platform seam. Pro is a paid upgrade on iOS but granted free on Android (a payments-availability constraint in my market). That is a single expect/actual value in the billing module - not a fork, not a flavor.

The compounding effect is the real payoff: the theme engine, the reward-unlock system, the remote-config kill switches, the crash reporting, the in-app review prompts. Each was built once, and every app in the portfolio gets it in the next release. A feature’s cost is amortized over six apps today and twelve listings tomorrow.

What it costs (the honest section)

No architecture write-up is complete without its bill.

The shells were near-duplicates for far too long. Every new app was, truthfully, “copy the nearest sibling and sed the identifiers." By app six that meant six near-identical build files, six copies of the Application and Activity (nearly 6,000 lines that differed in a billing key, the ad unit IDs and two deep-link hooks), and ten forked settings modules (about 8,500 lines that differed in a name, a tagline and a logo). The copies had started to drift, too: the Call Break app's feedback form said "Help us improve Tallyo Counter", inherited from the Counter shell it was cloned from. All of it is now one convention plugin, an Android-only :core:appshell with the base classes, and two shared settings modules. The safety net was mechanical. Before and after the shell plugin, each app's resolved build configuration, merged manifest, BuildConfig and runtime classpaths were compared and came out identical, and the move to the base classes left all six merged manifests unchanged. If you adopt this architecture, extract the shell plugin around app three, not app six.

Shared screens have to be told who they are. Sharing a screen instead of forking it has its own failure mode: a screen that quietly assumes it is running in the flagship. The Support screen, shared by all six apps from the start, did exactly that. It said “Support Tallyo” in all six apps, and in the other five its “Leave a review” button opened Tallyo’s Play listing and “Share” sent Tallyo’s link. The fix is a rule: anything that names the app is a required parameter the shell passes in (AboutAppInfo, DonateAppInfo), and store links use the running app's own package. With a required parameter, the next shell fails to compile instead of impersonating the flagship.

Manual DI assembly is a runtime failure class. One Koin tree per app, composed by hand, means a forgotten module is a crash on first resolution, not a compile error. The typed PlatformModules slot removes one category of that mistake; the rest is covered by the dullest possible mitigation: a written checklist for "adding a feature," applied every time.

A monorepo concentrates blast radius. One careless change in :core:ui ships in six apps' next releases. The strict layering, the conventional structure, the host-side test suite and the CI gate exist precisely because of this; so does a healthy respect for boring, incremental change in :core:*.

Gradle at 99 modules must be managed, not endured. Configuration cache, build cache, typesafe project accessors, and thin per-module build scripts are what keep sync and build times civilized. The convention plugins matter as much for build performance as for consistency.

Takeaways

If you are considering this shape for your own portfolio:

  1. Write the shell rule down on day one. Features are libraries; apps are shells. Every dependency edge either respects it or gets refactored. The first leak (mine cost more than 7,000 classes) is much cheaper to fix than the fifth.
  2. Make features own their persistence and settings. Feature-scoped databases and preference keys are what make “promote this feature to its own app” a wiring task instead of a surgery.
  3. Standardize the feature template. Two shapes, one canonical screen set. Sameness is a feature; it is what makes the tenth module free.
  4. Prefer shells over flavors when feature sets differ. Flavors configure exclusion; dependency edges enforce it.
  5. Invert dependencies at every money boundary. Billing and ads in separate modules, a one-way signal between them, UI slots so shared screens stay ignorant of monetization, and callbacks for the facts only a screen knows.
  6. Build the release pipeline once, parameterize per app. One reusable workflow plus thin callers, prefixed tags, prefixed secrets, per-app version keys in one catalog, and the version code pinned in the tag.
  7. Conventions are the enabling technology: convention plugins for modules and app shells, one reusable workflow for CI. At portfolio scale, anything configured in more than one place will drift. Extract the shell plugin at app three; I waited until app six.
  8. Make app identity a required parameter. A shared screen with a default name will eventually ship the flagship’s name inside another app.
  9. Test the shared layer on the host, and prove the tests run. A suite that silently never runs is worse than none: it buys confidence you have not earned.

One codebase, six apps, one person maintaining it. The architecture is not what makes that impressive — it is what makes it unremarkable, week after week. That is the highest compliment I can pay a codebase.

Top comments (0)