explaingit

android/architecture-samples

📈 Trending45,691KotlinAudience · developerComplexity · 3/5ActiveLicenseSetup · easy

TLDR

Official Google reference showing how to structure Android apps using modern tools like Jetpack Compose, Room, and Hilt. Learn by studying a simple to-do app built with best practices.

Mindmap

mindmap
  root((repo))
    What it does
      Reference implementation
      To-do list app
      Multiple branches
    Architecture patterns
      Jetpack Compose UI
      ViewModel state
      Reactive data flow
    Tech stack
      Kotlin
      Android Jetpack
      Room database
      Hilt injection
    Use cases
      Learn modern patterns
      Study best practices
      Compare approaches
    Testing
      Unit tests
      Integration tests
      End-to-end tests

Things people build with this

USE CASE 1

Study how to connect Jetpack Compose, Room, and Hilt in a real app structure.

USE CASE 2

Learn reactive data flow patterns using Kotlin Coroutines and Flow.

USE CASE 3

Compare different architectural approaches by checking out different branches.

USE CASE 4

Understand how to organize code for testability with unit, integration, and end-to-end tests.

Tech stack

KotlinJetpack ComposeNavigation ComposeViewModelKotlin CoroutinesFlowRoomHilt

Getting it running

Difficulty · easy Time to first run · 5min
Apache 2.0 license allows free use for any purpose, including commercial, as long as you include a copy of the license and state any changes made.

In plain English

Android Architecture Samples is an official Google repository that demonstrates how to properly structure Android applications using modern tools and architectural patterns. Rather than being a finished product you ship, it is a reference implementation meant to be read, studied, and learned from. The core of the repository is a deliberately simple to-do list app, the kind where you add tasks, mark them complete, and delete them. The app itself is not the point; it is intentionally simple so all the attention can go to studying how it is built rather than what it does. The same app is implemented across different branches of the repository, with each branch exploring a slightly different architectural approach, so developers can compare patterns side by side. The current main branch showcases the recommended modern Android stack. The UI is built entirely with Jetpack Compose, which is Google's newer system for building Android interfaces using code rather than XML layout files. Navigation between screens uses the Navigation Compose library. Each screen is paired with a ViewModel, a class responsible for holding and managing the data that screen displays, surviving things like screen rotations without losing state. Data flows through the app reactively using Kotlin Coroutines and Flow, meaning the UI automatically updates when underlying data changes rather than needing to be told to refresh. Data is stored locally using Room, which is Android's recommended SQLite wrapper library. Dependency injection is handled by Hilt, which automatically provides components with the other components they depend on. The project also includes a comprehensive suite of unit, integration, and end-to-end tests. An intermediate Android developer, or a beginner who has learned the basics, would use this when they want to understand how to connect all the modern Android pieces together in a maintainable, testable way. The tech stack is Kotlin with the Android Jetpack suite.

Copy-paste prompts

Prompt 1
Show me how this Android Architecture Samples repo structures a ViewModel to survive screen rotations without losing state.
Prompt 2
How does the android/architecture-samples repo use Jetpack Compose and Navigation Compose together to build screens?
Prompt 3
Explain the data flow in android/architecture-samples: how does Room, Flow, and Coroutines work together to update the UI?
Prompt 4
What testing patterns does android/architecture-samples use for unit, integration, and end-to-end tests?
Prompt 5
How does Hilt dependency injection work in the android/architecture-samples to-do app?
Open on GitHub → Explain another repo

Generated 2026-05-18 · Model: sonnet-4-6 · Verify against the repo before relying on details.