CleanArchitectureForAndroid

Из публичных источников

Чистая архитектура для Android — пример проекта

Машинный перевод · Показать оригинал

Clean Architecture for Android - a sample project

ПриложениеКатегория: Мобильные приложения · Заметки и продуктивностьOpen sourceданные проверены 16 окт. 2026 г.

Обзор

  • android
  • android-app
  • android-architecture
  • android-development
  • android-testing
  • architectural-patterns
  • clean-architecture
  • clean-architecture-android
  • espresso
  • gradle-kotlin-dsl
  • hilt-android
  • jetpack-compose

Установка

Команды только показываются, маркетплейс их не выполняет. Сверяйтесь с официальной документацией.
  • Официальный сайтИз публичных источниковиз метаданных каталога
    amzn.to/3rBSxOb ↗
  • Сборка из исходниковИз публичных источниковиз метаданных каталога

    Сборка из исходников: проверенного рецепта сборки нет — следуйте инструкциям репозитория.

    github.com/EranBoudjnah/CleanArchitectureForAndroid ↗

Совместимость

«Неизвестно» значит, что доказательств не найдено, а не что продукт несовместим.
ПлатформаСтатусАрхитектураДоказательствоУверенность
AndroidНеизвестно———
iOSНеизвестно———

Релизы

проверено 30 окт. 2026 г.
В источнике релизы не найдены.

Профиль качества

алгоритм quality-v1.0 · оценено 16 окт. 2026 г.
Оценка качества69
Оценка риска0
Уверенность 1.00
Оценка качества и оценка риска — разные показатели. Высокое качество не гарантирует безопасность.

Составляющие оценки

Поддержка · 2020
last activity 2 days ago
Документация · 1515
README 6433 chars, description present
Готовность к использованию · 150
install instructions: no; releases: no
Метаданные · 1010
4/4 of description, homepage, license, topics
Релизы · 102
0 release(s)
Точность категории · 105
classifier confidence 0.5
Популярность · 107
842 stars (log-dampened, 10k = max)
Ясность лицензии · 55
SPDX MIT
Сообщество · 55
issues enabled, 99 forks

Лицензия

MIT
Лицензия известнапо данным хостинга репозитория

Это статус политики каталога, а не юридическое заключение.

Источники

github.com/EranBoudjnah/CleanArchitectureForAndroidОсновной★ 842 звёздактивность 13 окт. 2026 г.Основной репозиторий · Уверенность 1.00

Отзывы

Войдите, чтобы написать отзыв

Отзывов пока нет.

Альтернативы

android-developer-roadmapПохожий
Дорожная карта разработчика Android — полный путь изучения разработки приложений для AndroidApache-2.0 · Мобильные приложения
moblyПохожий
Фреймворк сквозного тестирования для тестов со сложными требованиями к окружению.Apache-2.0 · Мобильные приложения
plain-appПохожий
🔥 PlainApp — это приложение с открытым исходным кодом, которое позволяет безопасно управлять телефоном через веб-браузер. Доступ к файлам, медиа, контактам, SMS, звонкам и другим данным осуществляется через простой и удобный интерфейс на вашем компьютере.AGPL-3.0 · Мобильные приложения
KeyMapperПохожий
Приложение для Android для переназначения кнопок на ваших устройствахGPL-3.0 · Мобильные приложения
LightNovelReaderПохожий
Читалка светлых новелл на Compose с поддержкой нескольких источников данных. Поддерживает экспорт в epub, настраиваемые стили фона, локальную библиотеку, уведомления об обновлениях и другие функции.Apache-2.0 · Мобильные приложения
MyneПохожий
Android-приложение для загрузки и чтения электронных книг из Project Gutenberg, созданное с помощью Jetpack Compose.Apache-2.0 · Мобильные приложения

README

Из EranBoudjnah/CleanArchitectureForAndroid · лицензия MIT · загружено 30 окт. 2026 г.

Clean Architecture for Android Sample Project

[Clean Architecture for Android] [Screenshot]

This project is a loose implementation of Clean Architecture as presented in my book, Clean Architecture for Android. It is a native Android project written in Kotlin. It demonstrates the key principles presented in the book and how they apply to a real life project.

I will endeavour to keep this project up to date and use it to demonstrate the strengths of the architecture: scalability, testability and flexibility when it comes to choosing 3rd party solutions.

Features

  • Feature separation
  • Layer separation
    • UI
    • Presentation
    • Domain
    • Data
    • Data Source
  • Dummy analytics
  • Navigation
  • Animations
  • Unit tests
  • End-to-end tests
  • Demonstrates use of Jetpack Compose
  • Demonstrates use of Coroutines including Flow
  • Demonstrates MVVM
  • Code quality checks using ktlint
  • Code quality checks using detekt
  • Architecture consistency checks using konsist
  • Continuous integration (CI) using GitHub Actions
    • Unit tests
    • Instrumentation tests
    • Linting

Choices

  • Simplicity

    "The complexity introduced here is an overkill!"

    I agree. If this was to be a final project, to which no new functionality would ever be added, then Clean Architecture would have been overly complicated for it. However, the reality is that mobile project seldom are final. User feedback, marketing requirements, new technologies - these factors and others all lead to continuous changes to almost every project. And so, what may now seem like too much complexity will reward us when the time for change comes. This will be when Clean Architecture shines.

    As a side note: in some ways, I have intentionally over-complicated this project by introducing different technologies. The goal was to show how, even in real-life scenarios, where a project may have grown over time to include more than one technological solution, the architecture still works.

  • Mappers as classes vs. mapping extension functions

    When mapping between models, we have several options. The primary decision is between mapper classes and mapping extension functions.

    While extension functions are more concise, using them for mapping limits our choices of testing frameworks (Mockito, for example, cannot stub static functions).

    How about injecting the mapper extension functions? We could do that. However, this removes the benefits of conciseness almost entirely. It also makes navigation to the implementation harder.

    And so, I opted for the slightly more verbose concrete mapper classes.

  • Skipping Google's Architecture Components

    The greatest issue with Google's Architecture Components is that they leak Android details into the Presentation layer. This prevents the Presentation layer from being truly UI agnostic.

    Another issue with the Architecture Components is that they give too much responsibility to the ViewModel. They make it persist state it does not own, leading to potential data synchronization bugs.

    For these reasons, while still following MVVM, this project relies on Kotlin Flows rather than LiveData, and implements pure ViewModels rather than Google's.

  • Mocking framework

    Both Mockito-Kotlin and Mockk are used in this project to demonstrate how the use of each would look.

    My personal preference remains Mockito-Kotlin. I find the code easier to read and follow when using it. At the time of writing, judging by the number of stars on each repository, the industry seems to lean towards Mockk.

    I was asked about using fakes. I have explored fakes, and found them to be overly verbose and too expensive to maintain.

  • Dependency injection framework

    A critical part of most modern apps, dependency injection (DI) helps us obtain the objects that build our app. It also helps manage their scope. The most popular choices in the Android world are Hilt (which is built on top of Dagger) and Koin.

    Hilt was chosen for two main reasons:

    1. Compile time safety - having the confidence that all my dependencies are provided before the app starts is a huge time saver and helps maintain a stable app.
    2. Simplicity - from experience, setting up and using Hilt (unlike the underlying Dagger) is considerably easier than using Koin. Hilt also introduces fewer breaking changes over time.
  • XML vs Jetpack Compose

    Why not both? I still have a lot of concerns around Jetpack Compose. Even so, it was important to me to show the presented architecture works well regardless of the UI mechanism chosen. As an exercise, I invite you to try and replace the UI layer from Compose to XML or vice versa without updating the Presentation layer.

Links

Clean Architecture for Android on Amazon

Clean Architecture on the Clean Coder Blog

Contributing

Contributions to this project are welcome. Please feel free to report any issues or fork to make changes and raise a pull request.

Licence

This project is distributed under the terms of the MIT License. See LICENSE.md for details.

Открыть репозиторий ↗