# tungnk123/android-cheat-sheet architecture

> Architecture diagram of the GitHub repository tungnk123/android-cheat-sheet, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-04-09). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/tungnk123/android-cheat-sheet
- Repository: https://github.com/tungnk123/android-cheat-sheet

## Overview

This repository is not an application runtime; it is a static Android knowledge base. Its architecture is organized around Markdown documentation, with a few Kotlin sample files and PDF reference materials. The main “entrypoint” is the root `README.md`, which acts as the catalog and navigation layer.

The top-level structure is topic-first rather than feature-first. Each folder represents a learning domain, and most domains are independent documentation islands. There is no shared build system, dependency graph, or deployment pipeline visible in the tree.

The core Android fundamentals live under `android-basics/`. This is the largest conceptual subsystem and covers platform primitives such as `activity`, `context`, `intent`, `layout`, `manifest`, `navigation`, `RecyclerView`, SDK versions, task/back-stack/launch modes, ViewModel, and platform architecture. These topics collectively describe the app lifecycle and UI/navigation foundation.

`android-basics/android-components/` is the most implementation-oriented subarea in the basics section. It focuses on Android component types and their roles in the platform: Activity, Service, Broadcast Receiver, and Content Provider. The nested `examples/` folder contains Kotlin snippets for those components, making this the primary “code sample” boundary in the repo.

Architecture and app-structure concepts are separated from primitives. The repo includes higher-level guidance in areas like `android-jetpack/`, `android-guidelines/`, `design-patterns-in-android/`, `dependency-injection/`, and `system-design/`. Together these describe how app modules, state holders, DI, and design patterns fit around the Android component model.

State, data, and async behavior are grouped into a separate conceptual layer. `data-management/` covers storage patterns such as Shared Preferences, while `kotlin-coroutines/`, `kotlin-flow/`, and `reactive-programming/` cover asynchronous and stream-based data flow. In an architecture diagram, these sit between repositories/storage and UI consumers.

Language foundations are isolated from Android-specific concerns. The `java/` and `kotlin-basics/` folders provide syntax and language behavior references, while `functional-programming/` adds a more general programming model. These are supporting layers rather than Android subsystems, but they underpin the code examples and concepts elsewhere.

Networking and security are treated as separate operational concerns. `android-networking/` covers client-server communication patterns, and `android-security/` covers app protection and hashing. `android-background/` and `android-optimization/` extend the operational side with execution constraints and performance considerations.

Testing is present as a conceptual quality gate rather than a dedicated framework project. `android-testing/` contains error-handling and test-related notes, which suggests the repo emphasizes practices and scenarios over runnable test suites.

There is a documentation/learning asset branch under `android-books/`. This folder stores PDFs that support the knowledge base, so it behaves like a reference library rather than code. It is a sidecar dependency for reading, not a component in the Android app flow.

`random-notes/` is a chronological, append-only journal of daily notes. Architecturally, it is separate from the curated topic tree and should be treated as an unstructured content stream, useful for tracking ongoing learning but not for the main repository map.

At the root, `Welcome.kt` is a lone Kotlin file outside the documentation hierarchy. Based on placement alone, it appears to be a standalone sample or scratch file rather than part of a coordinated module structure.

For an architecture diagram, the main boundaries are: root navigation (`README.md`), curated topic documentation, executable examples under `android-components/examples`, reference assets under `android-books`, and the daily note stream under `random-notes`. The repo’s “data flow” is educational rather than runtime: foundational Android concepts feed into architecture patterns, which feed into state/data/async topics, then into operational topics like networking, security, optimization, and testing.

Main entry points: [`README.md`](https://github.com/tungnk123/android-cheat-sheet/blob/master/README.md) (README), [`android-jetpack/android-jetpack.md`](https://github.com/tungnk123/android-cheat-sheet/blob/master/android-jetpack/android-jetpack.md) (Jetpack), [`data-management/shared-preferences/shared-preferences.md`](https://github.com/tungnk123/android-cheat-sheet/blob/master/data-management/shared-preferences/shared-preferences.md) (Data mgmt), [`kotlin-basics/sequence.md`](https://github.com/tungnk123/android-cheat-sheet/blob/master/kotlin-basics/sequence.md) (Kotlin basics)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_docs["Curated docs"]
  node_root_readme["README<br/>catalog index<br/>[README.md]"]
  node_android_basics["Android basics<br/>fundamentals hub"]
  node_android_components["Components"]
  node_component_examples["Examples<br/>kotlin samples<br/>[activity.kt]"]
  node_platform_arch["Platform arch<br/>platform model"]
  node_context_topic["Context<br/>platform primitive<br/>[context.md]"]
  node_intent_topic["Intent<br/>platform primitive<br/>[intent.md]"]
  node_layout_topic["Layout<br/>ui structure<br/>[layout.md]"]
  node_manifest_topic["Manifest<br/>app metadata<br/>[manifest.md]"]
  node_navigation_topic["Navigation<br/>ui flow<br/>[navigation.md]"]
  node_recyclerview_topic["RecyclerView<br/>ui list<br/>[recyclerview.md]"]
  node_sdk_versions["SDK versions<br/>platform compatibility<br/>[sdk-versions.md]"]
  node_task_backstack["Task stack<br/>lifecycle model"]
  node_viewmodel_topic["ViewModel<br/>state holder"]
end

subgraph group_support["Support topics"]
  node_android_guidelines["Guidelines<br/>best practices"]
  node_android_jetpack["Jetpack<br/>architecture guide<br/>[android-jetpack.md]"]
  node_design_patterns["Patterns<br/>[design-patterns.md]"]
  node_dependency_injection["DI<br/>composition guide"]
  node_system_design["System design<br/>architecture reference<br/>[system-design.md]"]
  node_data_management["Data mgmt<br/>storage concepts"]
  node_coroutines["Coroutines<br/>async model<br/>[coroutine.md]"]
  node_flow["Flow<br/>stream model<br/>[kotlin-flow.md]"]
  node_reactive["Reactive<br/>async patterns"]
  node_kotlin_basics["Kotlin basics<br/>language notes<br/>[sequence.md]"]
  node_java_basics["Java basics<br/>language notes<br/>[java-basic.md]"]
  node_functional["Functional<br/>programming model"]
  node_networking["Networking<br/>client-server"]
  node_security["Security<br/>app protection"]
  node_background["Background<br/>execution limits"]
  node_optimization["Optimization<br/>performance"]
  node_testing["Testing<br/>quality practices<br/>[error-handling.md]"]
end

subgraph group_assets["Reference assets"]
  node_android_books["Books<br/>reference library<br/>[android-books.md]"]
  node_random_notes["Daily notes<br/>journal stream<br/>[2024-10-26.md]"]
  node_welcome_kt["Welcome.kt<br/>standalone sample<br/>[Welcome.kt]"]
end

node_root_readme -->|"catalogs"| node_android_basics
node_root_readme -->|"catalogs"| node_android_jetpack
node_root_readme -->|"catalogs"| node_android_guidelines
node_root_readme -->|"catalogs"| node_networking
node_root_readme -->|"catalogs"| node_android_books
node_root_readme -->|"catalogs"| node_random_notes
node_root_readme -->|"includes"| node_welcome_kt
node_android_basics -->|"organizes"| node_android_components
node_android_components -->|"illustrates"| node_component_examples
node_android_basics -->|"frames"| node_platform_arch
node_android_basics -->|"covers"| node_context_topic
node_android_basics -->|"covers"| node_intent_topic
node_android_basics -->|"covers"| node_layout_topic
node_android_basics -->|"covers"| node_manifest_topic
node_android_basics -->|"covers"| node_navigation_topic
node_android_basics -->|"covers"| node_recyclerview_topic
node_android_basics -->|"covers"| node_sdk_versions
node_android_basics -->|"covers"| node_task_backstack
node_android_basics -->|"covers"| node_viewmodel_topic
node_data_management -->|"pairs with"| node_coroutines
node_data_management -->|"pairs with"| node_flow
node_data_management -->|"aligns with"| node_reactive
node_android_jetpack -->|"centers on"| node_viewmodel_topic
node_android_jetpack -->|"uses"| node_dependency_injection
node_design_patterns -->|"reinforces"| node_dependency_injection
node_system_design -->|"connects"| node_android_jetpack
node_kotlin_basics -->|"supports"| node_coroutines
node_kotlin_basics -->|"supports"| node_flow
node_java_basics -->|"supports"| node_android_basics
node_functional -->|"supports"| node_reactive
node_networking -->|"depends on"| node_security
node_background -->|"informs"| node_optimization
node_optimization -->|"optimizes"| node_android_basics
node_testing -->|"aligns with"| node_android_guidelines

click node_root_readme "https://github.com/tungnk123/android-cheat-sheet/blob/master/README.md"
click node_android_components "https://github.com/tungnk123/android-cheat-sheet/blob/master/android-basics/android-components/android-components.md"
click node_component_examples "https://github.com/tungnk123/android-cheat-sheet/blob/master/android-basics/android-components/examples/activity.kt"
click node_platform_arch "https://github.com/tungnk123/android-cheat-sheet/blob/master/android-basics/android-platform-architecture/android-platform-architecture.md"
click node_context_topic "https://github.com/tungnk123/android-cheat-sheet/blob/master/android-basics/context/context.md"
click node_intent_topic "https://github.com/tungnk123/android-cheat-sheet/blob/master/android-basics/intent/intent.md"
click node_layout_topic "https://github.com/tungnk123/android-cheat-sheet/blob/master/android-basics/layout/layout.md"
click node_manifest_topic "https://github.com/tungnk123/android-cheat-sheet/blob/master/android-basics/manifest/manifest.md"
click node_navigation_topic "https://github.com/tungnk123/android-cheat-sheet/blob/master/android-basics/navigation/navigation.md"
click node_recyclerview_topic "https://github.com/tungnk123/android-cheat-sheet/blob/master/android-basics/recyclerview/recyclerview.md"
click node_sdk_versions "https://github.com/tungnk123/android-cheat-sheet/blob/master/android-basics/sdk-versions/sdk-versions.md"
click node_task_backstack "https://github.com/tungnk123/android-cheat-sheet/blob/master/android-basics/task-backstack-launchmodes/task-backstack-launchmodes.md"
click node_viewmodel_topic "https://github.com/tungnk123/android-cheat-sheet/blob/master/android-basics/viewmodel/android-viewmodel.md"
click node_android_books "https://github.com/tungnk123/android-cheat-sheet/blob/master/android-books/android-books.md"
click node_random_notes "https://github.com/tungnk123/android-cheat-sheet/blob/master/random-notes/2024-10-26.md"
click node_welcome_kt "https://github.com/tungnk123/android-cheat-sheet/blob/master/Welcome.kt"
click node_android_guidelines "https://github.com/tungnk123/android-cheat-sheet/blob/master/android-guidelines/android-guidelines.md"
click node_android_jetpack "https://github.com/tungnk123/android-cheat-sheet/blob/master/android-jetpack/android-jetpack.md"
click node_design_patterns "https://github.com/tungnk123/android-cheat-sheet/blob/master/design-patterns-in-android/design-patterns.md"
click node_dependency_injection "https://github.com/tungnk123/android-cheat-sheet/blob/master/dependency-injection/dependency-injection.md"
click node_system_design "https://github.com/tungnk123/android-cheat-sheet/blob/master/system-design/system-design.md"
click node_data_management "https://github.com/tungnk123/android-cheat-sheet/blob/master/data-management/shared-preferences/shared-preferences.md"
click node_coroutines "https://github.com/tungnk123/android-cheat-sheet/blob/master/kotlin-coroutines/coroutine.md"
click node_flow "https://github.com/tungnk123/android-cheat-sheet/blob/master/kotlin-flow/kotlin-flow.md"
click node_reactive "https://github.com/tungnk123/android-cheat-sheet/blob/master/reactive-programming/reactive-programming.md"
click node_kotlin_basics "https://github.com/tungnk123/android-cheat-sheet/blob/master/kotlin-basics/sequence.md"
click node_java_basics "https://github.com/tungnk123/android-cheat-sheet/blob/master/java/java-basic.md"
click node_functional "https://github.com/tungnk123/android-cheat-sheet/blob/master/functional-programming/functional-programming.md"
click node_networking "https://github.com/tungnk123/android-cheat-sheet/blob/master/android-networking/android-networking.md"
click node_security "https://github.com/tungnk123/android-cheat-sheet/blob/master/android-security/android-security.md"
click node_background "https://github.com/tungnk123/android-cheat-sheet/blob/master/android-background/android-background.md"
click node_optimization "https://github.com/tungnk123/android-cheat-sheet/blob/master/android-optimization/android-optimization.md"
click node_testing "https://github.com/tungnk123/android-cheat-sheet/blob/master/android-testing/error-handling.md"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_root_readme,node_android_basics,node_android_components,node_component_examples,node_platform_arch,node_context_topic,node_intent_topic,node_layout_topic,node_manifest_topic,node_navigation_topic,node_recyclerview_topic,node_sdk_versions,node_task_backstack,node_viewmodel_topic toneBlue
class node_android_guidelines,node_android_jetpack,node_design_patterns,node_dependency_injection,node_system_design,node_data_management,node_coroutines,node_flow,node_reactive,node_kotlin_basics,node_java_basics,node_functional,node_networking,node_security,node_background,node_optimization,node_testing toneAmber
class node_android_books,node_random_notes,node_welcome_kt toneMint
```

## Components

### Curated docs

Main topic-first Android knowledge base organized as independent documentation islands.

- [README](https://github.com/tungnk123/android-cheat-sheet/blob/master/README.md): catalog index · Repository entrypoint and navigation layer. · `README.md`
- **Android basics**: fundamentals hub · Core Android platform primitives and app lifecycle concepts.
- [Components](https://github.com/tungnk123/android-cheat-sheet/blob/master/android-basics/android-components/android-components.md): platform components · Android component model: Activity, Service, Receiver, and Provider. · `android-basics/android-components/android-components.md`
- [Examples](https://github.com/tungnk123/android-cheat-sheet/blob/master/android-basics/android-components/examples/activity.kt): kotlin samples · Standalone Kotlin examples for component behavior. · `android-basics/android-components/examples/activity.kt`
- [Platform arch](https://github.com/tungnk123/android-cheat-sheet/blob/master/android-basics/android-platform-architecture/android-platform-architecture.md): platform model · Higher-level view of Android platform structure and execution model. · `android-basics/android-platform-architecture/android-platform-architecture.md`
- [Context](https://github.com/tungnk123/android-cheat-sheet/blob/master/android-basics/context/context.md): platform primitive · Application and component context behavior. · `android-basics/context/context.md`
- [Intent](https://github.com/tungnk123/android-cheat-sheet/blob/master/android-basics/intent/intent.md): platform primitive · Intent-based communication and navigation contracts. · `android-basics/intent/intent.md`
- [Layout](https://github.com/tungnk123/android-cheat-sheet/blob/master/android-basics/layout/layout.md): ui structure · View/layout structure and screen composition. · `android-basics/layout/layout.md`
- [Manifest](https://github.com/tungnk123/android-cheat-sheet/blob/master/android-basics/manifest/manifest.md): app metadata · App declaration, components, and platform configuration. · `android-basics/manifest/manifest.md`
- [Navigation](https://github.com/tungnk123/android-cheat-sheet/blob/master/android-basics/navigation/navigation.md): ui flow · Screen-to-screen flow and back-stack concepts. · `android-basics/navigation/navigation.md`
- [RecyclerView](https://github.com/tungnk123/android-cheat-sheet/blob/master/android-basics/recyclerview/recyclerview.md): ui list · Scrollable list and item rendering patterns. · `android-basics/recyclerview/recyclerview.md`
- [SDK versions](https://github.com/tungnk123/android-cheat-sheet/blob/master/android-basics/sdk-versions/sdk-versions.md): platform compatibility · Android API level and versioning references. · `android-basics/sdk-versions/sdk-versions.md`
- [Task stack](https://github.com/tungnk123/android-cheat-sheet/blob/master/android-basics/task-backstack-launchmodes/task-backstack-launchmodes.md): lifecycle model · Task, back stack, and launch mode behavior. · `android-basics/task-backstack-launchmodes/task-backstack-launchmodes.md`
- [ViewModel](https://github.com/tungnk123/android-cheat-sheet/blob/master/android-basics/viewmodel/android-viewmodel.md): state holder · Lifecycle-aware UI state and model management. · `android-basics/viewmodel/android-viewmodel.md`

### Support topics

Language, patterns, architecture, and operational concerns that support the main Android fundamentals.

- [Guidelines](https://github.com/tungnk123/android-cheat-sheet/blob/master/android-guidelines/android-guidelines.md): best practices · Android practice and style guidance. · `android-guidelines/android-guidelines.md`
- [Jetpack](https://github.com/tungnk123/android-cheat-sheet/blob/master/android-jetpack/android-jetpack.md): architecture guide · Modern Android app architecture and libraries. · `android-jetpack/android-jetpack.md`
- [Patterns](https://github.com/tungnk123/android-cheat-sheet/blob/master/design-patterns-in-android/design-patterns.md): architecture patterns · Common design patterns in Android contexts. · `design-patterns-in-android/design-patterns.md`
- [DI](https://github.com/tungnk123/android-cheat-sheet/blob/master/dependency-injection/dependency-injection.md): composition guide · Dependency injection concepts and usage. · `dependency-injection/dependency-injection.md`
- [System design](https://github.com/tungnk123/android-cheat-sheet/blob/master/system-design/system-design.md): architecture reference · Broader system design and scalability concepts. · `system-design/system-design.md`
- [Data mgmt](https://github.com/tungnk123/android-cheat-sheet/blob/master/data-management/shared-preferences/shared-preferences.md): storage concepts · Persistent data handling and storage patterns. · `data-management/shared-preferences/shared-preferences.md`
- [Coroutines](https://github.com/tungnk123/android-cheat-sheet/blob/master/kotlin-coroutines/coroutine.md): async model · Structured concurrency and asynchronous execution. · `kotlin-coroutines/coroutine.md`
- [Flow](https://github.com/tungnk123/android-cheat-sheet/blob/master/kotlin-flow/kotlin-flow.md): stream model · Reactive stream and cold/hot flow concepts. · `kotlin-flow/kotlin-flow.md`
- [Reactive](https://github.com/tungnk123/android-cheat-sheet/blob/master/reactive-programming/reactive-programming.md): async patterns · Reactive programming concepts bridging state and events. · `reactive-programming/reactive-programming.md`
- [Kotlin basics](https://github.com/tungnk123/android-cheat-sheet/blob/master/kotlin-basics/sequence.md): language notes · Core Kotlin behaviors and utility topics. · `kotlin-basics/sequence.md`
- [Java basics](https://github.com/tungnk123/android-cheat-sheet/blob/master/java/java-basic.md): language notes · Java syntax and language behavior references. · `java/java-basic.md`
- [Functional](https://github.com/tungnk123/android-cheat-sheet/blob/master/functional-programming/functional-programming.md): programming model · Functional programming concepts used across the repo. · `functional-programming/functional-programming.md`
- [Networking](https://github.com/tungnk123/android-cheat-sheet/blob/master/android-networking/android-networking.md): client-server · Client-server communication and network behavior. · `android-networking/android-networking.md`
- [Security](https://github.com/tungnk123/android-cheat-sheet/blob/master/android-security/android-security.md): app protection · Hashing and Android security concepts. · `android-security/android-security.md`
- [Background](https://github.com/tungnk123/android-cheat-sheet/blob/master/android-background/android-background.md): execution limits · Background execution constraints and behavior. · `android-background/android-background.md`
- [Optimization](https://github.com/tungnk123/android-cheat-sheet/blob/master/android-optimization/android-optimization.md): performance · Performance tuning and efficiency notes. · `android-optimization/android-optimization.md`
- [Testing](https://github.com/tungnk123/android-cheat-sheet/blob/master/android-testing/error-handling.md): quality practices · Testing and error-handling notes. · `android-testing/error-handling.md`

### Reference assets

Non-Markdown learning materials and the append-only note stream.

- [Books](https://github.com/tungnk123/android-cheat-sheet/blob/master/android-books/android-books.md): reference library · PDF reference materials supporting the learning corpus. · `android-books/android-books.md`
- [Daily notes](https://github.com/tungnk123/android-cheat-sheet/blob/master/random-notes/2024-10-26.md): journal stream · Append-only chronological learning notes. · `random-notes/2024-10-26.md`
- [Welcome.kt](https://github.com/tungnk123/android-cheat-sheet/blob/master/Welcome.kt): standalone sample · Lone Kotlin file outside the documentation tree. · `Welcome.kt`

## Connections

- README → Android basics: catalogs · Root README navigates the core Android fundamentals.
- README → Jetpack: catalogs · Root README indexes architecture guidance.
- README → Guidelines: catalogs · Root README indexes practice guidelines.
- README → Networking: catalogs · Root README indexes operational Android topics.
- README → Books: catalogs · Root README points to reference materials.
- README → Daily notes: catalogs · Root README includes the daily note stream.
- README → Welcome.kt: includes · Standalone Kotlin sample sits at the repository root.
- Android basics → Components: organizes · Component model is the main implementation-oriented branch inside basics.
- Components → Examples: illustrates · Kotlin snippets demonstrate component behavior.
- Android basics → Platform arch: frames · Platform architecture contextualizes the basics topics.
- Android basics → Context: covers · Basics includes context behavior.
- Android basics → Intent: covers · Basics includes intent communication.
- Android basics → Layout: covers · Basics includes UI layout.
- Android basics → Manifest: covers · Basics includes manifest configuration.
- Android basics → Navigation: covers · Basics includes navigation and back-stack flow.
- Android basics → RecyclerView: covers · Basics includes list UI patterns.
- Android basics → SDK versions: covers · Basics includes platform versioning.
- Android basics → Task stack: covers · Basics includes task and launch mode behavior.
- Android basics → ViewModel: covers · Basics includes ViewModel and state handling.
- Data mgmt → Coroutines: pairs with · Storage concepts sit alongside async execution models.
- Data mgmt → Flow: pairs with · Storage concepts connect to stream-based state delivery.
- Data mgmt → Reactive: aligns with · Data management relates to reactive data flow.
- Jetpack → ViewModel: centers on · Jetpack architecture often builds around ViewModel.
- Jetpack → DI: uses · Jetpack architecture commonly depends on DI.
- Patterns → DI: reinforces · Design patterns and DI support app structure.
- System design → Jetpack: connects · System design frames app-level architecture choices.
- Kotlin basics → Coroutines: supports · Kotlin language concepts underpin coroutine usage.
- Kotlin basics → Flow: supports · Kotlin language concepts underpin Flow usage.
- Java basics → Android basics: supports · Java reference material supports Android platform topics.
- Functional → Reactive: supports · Functional concepts inform reactive programming.
- Networking → Security: depends on · Networking and security are operationally coupled.
- Background → Optimization: informs · Background execution constraints affect performance tuning.
- Optimization → Android basics: optimizes · Performance concerns cut across foundational Android topics.
- Testing → Guidelines: aligns with · Testing notes complement practice guidance.
