architecture-samples README

The project's README from github.com/android/architecture-samples. As one markdown file: README.md.

Android Architecture Samples

These samples showcase different architectural approaches to developing Android apps. In its different branches you'll find the same app (a TODO app) implemented with small differences.

In this branch you'll find:

Screenshots

Screenshot

Why a to-do app?

The app in this project aims to be simple enough that you can understand it quickly, but complex enough to showcase difficult design decisions and testing scenarios. For more information, see the app's specification.

What is it not?

Who is it for?

Opening a sample in Android Studio

To open one of the samples in Android Studio, begin by checking out one of the sample branches, and then open the root directory in Android Studio. The following series of steps illustrate how to open the sample.

Clone the repository:

git clone [email protected]:android/architecture-samples.git

Finally open the architecture-samples/ directory in Android Studio.

License

Copyright 2024 Google, Inc.

Licensed to the Apache Software Foundation (ASF) under one or more contributor
license agreements. See the NOTICE file distributed with this work for
additional information regarding copyright ownership. The ASF licenses this
file to you under the Apache License, Version 2.0 (the "License"); you may not
use this file except in compliance with the License. You may obtain a copy of
the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations under
the License.

architecture-samples (android/architecture-samples)

Searching Database…

What is this?It's a collection of sample implementations of the same to-do app, each built on a different branch with a different Android architecture approach, meant to showcase and compare architectural patterns like MVVM with Compose, Hilt and Room.
Is this a starter template I can build my app on?No — the README explicitly says it's not a template, not a UI/Material Design showcase, and not a production app with real networking or auth. It's a reference implementation focused purely on architecture.
How do I open one of the samples?Clone the repo, check out the branch for the architecture variant you want, then open the architecture-samples/ directory as a project in Android Studio.
Do I need anything besides Android Studio?No, just Android Studio — the repo is self-contained and uses Gradle, so opening the directory handles the rest.
What does the main branch's architecture actually look like?It uses Jetpack Compose for UI, Navigation Compose with a single-activity setup, a ViewModel per screen, Flow/coroutines for reactivity, a repository backed by Room plus a fake remote source, and Hilt for dependency injection — there's no real network layer.
Why a to-do app specifically?It's simple enough to understand quickly, but complex enough to surface real architecture and testing decisions, which is exactly what the samples are meant to demonstrate.
Are there other architecture variants besides the main branch?Yes — other branches implement the same TODO app with different architectural approaches, so you can check out each one and compare them side by side.
Does it include tests?Yes, it ships with unit, integration and end-to-end tests, including shared tests that run on an emulator or device.
Where should I look for an actual project starter instead?The README points to a separate 'Architecture Templates' project for bootstrapping real apps, and to 'Now in Android' for a full production example with networking and auth.
Creator
android
Size
13.1 MB
Stars
45.9K
Updated
CommitJul 17
Age
10y
Commits · 90 Days