Skip to content

A playground about best practices, using updated libraries and solutions in the Android world!

License

Notifications You must be signed in to change notification settings

Kaaveh/ComposeNews

Repository files navigation

ComposeNews

This repo is a playground about best practices, using updated libraries and solutions in the Android world!

Check the app apk from here

⚙️ Architecture

Architecture diagram

The main architecture of the code is based on MVI + CLEAN architecture. The division criteria is a hybrid strategy based on Feature + Layer by module. For the details of architecture, please read this article.

Wear OS

This project includes a WearOS module for Android-based smartwatches like the Galaxy Watch. The app-watch module contains app, designsystem, navigation, and ui submodules. You can build the app-watch:app to have a wearOS version of the application.

🚦 Navigation

For the details of navigation implementations, please read this article.

📱 Previewing

For the details of handling the preview of composable functions in this code-base, please read this article.

🛠 Technologies

  • Jetpack Compose
  • CLEAN architecture
  • MVI architectural pattern
  • Coroutine Flow
  • SQLDelight database
  • Dagger Hilt
  • Navigation
  • Ktor client
  • Work manager
  • Unit test
  • Support large screens
  • Support WearOS devices
  • Monochromatic app icon
  • Version catalog & Convention Plugin (For the details, please read this article)
  • CI
  • Git Hooks
  • GitHub Actions
  • Static Analysis(Kotlinter, Detekt) (For the detail, please read this article)

We are porting the project to KMP. Here are the steps:

  • GSON → Kotlinx Serialization
  • ROOM → SQLDelight
  • Retrofit → Ktor
  • JUnit → Kotest
  • Dagger-Hilt → Koin
  • Jetpack Compose → Compose Multiplatform

📸 Screenshots

Light theme

Dark theme

Dynamic theme

Large screen support (Foldable, Tablet, and Desktop)

WearOS devices (Android-based smartwatches)

Wear OS screenshots

Additional Resources

  • Git Hooks - Learn about Git Hooks used in this project for code formatting and analysis.
  • GitHub Actions - Explore the GitHub Actions workflows used to validate the code.
  • Static Analysis - Discover how static analysis tools like Detekt and Ktlint are used in this project for code quality assurance.

Compose compiler metrics

Run the following command to get and analyse compose compiler metrics:

./gradlew assembleRelease -PenableComposeCompilerMetrics=true -PenableComposeCompilerReports=true

🤝🏻 Contribute

Any PRs are very welcome! 😍 You can fix a bug, add a feature, optimize performance, and propose a new cool approach in code-base architecture. Feel free to make a PR! 😌

We use static analysis tools like Detekt and Ktlint in this project. Please either set up Git Hooks on your project or run Static Analysis before creating PR.