Skip to content

A fully functional Android app built entirely with Kotlin and Jetpack Compose

Replace old diagram with new mermaid graph in ModularizationLearningJourney

Simon Marquis0a352c2b3570
diff --git a/docs/ModularizationLearningJourney.md b/docs/ModularizationLearningJourney.md
index a9766c68d..14c19e12e 100644
--- a/docs/ModularizationLearningJourney.md
+++ b/docs/ModularizationLearningJourney.md
@@ -85,7 +85,57 @@ how you can organize your project. In general, you should strive for low couplin
## Types of modules in Now in Android
-![Diagram showing types of modules and their dependencies in Now in Android](images/modularization-graph.drawio.png "Diagram showing types of modules and their dependencies in Now in Android")
+```mermaid
+graph TB
+ subgraph :core
+ direction TB
+ :core:data[data]:::android-library
+ :core:database[database]:::android-library
+ :core:model[model]:::jvm-library
+ :core:network[network]:::android-library
+ :core:ui[ui]:::android-library
+ end
+ subgraph :feature
+ direction TB
+ :feature:topic[topic]:::android-feature
+ :feature:foryou[foryou]:::android-feature
+ :feature:interests[interests]:::android-feature
+ :feature:foo[...]:::android-feature
+
+ end
+ :app[app]:::android-application
+
+ :app -.-> :feature:foryou
+ :app -.-> :feature:interests
+ :app -.-> :feature:topic
+ :core:data ---> :core:database
+ :core:data ---> :core:network
+ :core:database ---> :core:model
+ :core:network ---> :core:model
+ :core:ui ---> :core:model
+ :feature:topic -.-> :core:data
+ :feature:topic -.-> :core:ui
+
+classDef android-application fill:#CAFFBF,stroke:#000,stroke-width:2px,color:#000;
+classDef android-feature fill:#FFD6A5,stroke:#000,stroke-width:2px,color:#000;
+classDef android-library fill:#9BF6FF,stroke:#000,stroke-width:2px,color:#000;
+classDef jvm-library fill:#BDB2FF,stroke:#000,stroke-width:2px,color:#000;
+```
+
+<details><summary>📋 Graph legend</summary>
+
+```mermaid
+graph TB
+ application:::android-application -. implementation .-> feature:::android-feature
+ library:::android-library -- api --> jvm:::jvm-library
+
+classDef android-application fill:#CAFFBF,stroke:#000,stroke-width:2px,color:#000;
+classDef android-feature fill:#FFD6A5,stroke:#000,stroke-width:2px,color:#000;
+classDef android-library fill:#9BF6FF,stroke:#000,stroke-width:2px,color:#000;
+classDef jvm-library fill:#BDB2FF,stroke:#000,stroke-width:2px,color:#000;
+```
+
+</details>
**Top tip**: A module graph (shown above) can be useful during modularization planning for
visualizing dependencies between modules.
diff --git a/docs/images/modularization-graph.drawio.png b/docs/images/modularization-graph.drawio.png
deleted file mode 100644
index fb5bc375b..000000000
Binary files a/docs/images/modularization-graph.drawio.png and /dev/null differ