Skip to content

numq/android-clean-architecture-imageboard-client

Repository files navigation

Imageboard Clean Architecture Client

This is the part of project which includes back-end and mobile client.

Also check: Golang Clean Architecture Back-End

Project description:

Simple anonymous imageboard which allows to create threads, posts and reply to users by quoting their posts.

Tech:

Common:

  • Kotlin
  • Coroutines/Flow
  • Arrow-KT
  • Hilt

Data:

  • Protobuf
  • gRPC
  • Room

Platform/Presentation:

  • Android
  • Architecture Components
  • Jetpack Compose
  • Navigation Component
  • Accompanist Permissions
  • Coil

Structure:

  • Data
    Local and remote data sources.
  • Domain
    Abstract entities & repositories.
  • Platform
    Platform dependent components: DI, extension functions, navigation, handlers, etc.
  • Presentation
    UI screens.
  • UseCase
    Most likely: use case for each repository method.

Summary:

This is a preview implementation of the "Clean Architecture" based on my current knowledge and experience of working with different languages and frameworks.

I already have some thoughts about thingies that I want to change and I'll try to make structure better in my next projects.

So what about this project?

I'm sure it's good at scaling and clear enough to understand the main idea that runs through all parts of the project - separation of concerns between layers/components.

Also you can say that it's not "screaming architecture", but it's not true, because it's different for each layer. For example: presentation layer has "auth" and "profile" features, but the "data" layer has only "user". At the same time, "user" usecases can be used separately in both features.

What's the advantage of this approach? Modularity. You can easily replace each layer or make a multidex app. Of course, it's more about large applications, but feature-like approach in usual sense (with "flattened" layers) is good to use in small apps or MVPs.