Skip to content

JeremyLeyvraz/CleanArchitectureTemplate

Repository files navigation

Template for a Kotlin Android application utilizing Clean Architecture

Layers

App Layer

This layer serves as the presentation layer of the application. It involves aspects such as UI/UX design, user interaction, data presentation, and user experience. Its function in this project is to display a message by utilizing the [HelloUseCase] functionality.

Use Case Layer

This layer handles the specific operational rules of a system — the application's business logic. In this project, it implements a simple use case to display a 'Hello' message. This message is generated by employing a [Message] provided by a repository.

Data Layer

This layer encapsulates the details of data sources and data persistence, shielding the inner layers. It is responsible for the retrieval and storage of data through a defined repository. Here, it implements a simple repository to acquire a [Message].

Domain Layer

The domain layer defines the core elements of the software, independent of specific application layers. It includes business models, rules, entities, and use cases. Here, it defines the [Message] model, including the repository and use case interfaces.

Tools

Detekt

Detekt is a static analysis tool specific for Kotlin. It inspects your code for style irregularities, potential bugs, and areas for refactoring. This aims to enhance the quality of the code and prevent possible errors. It enables customization to align with your coding conventions. To run Detekt, use ./gradlew detekt.

Lint

Lint is a static analysis tool that examines Android code for potential issues such as performance leaks, accessibility problems, among others, and suggests corrections and optimization methods. Run Lint using ./gradlew lint.

Continuous Integration (CI)

The project's CI pipeline is hosted on GitHub. For every pull request created, a workflow is initiated. This workflow includes running Detekt and Lint for static code analysis, building the project, and executing the unit tests. A pull request can only be merged once the workflow has successfully completed, ensuring the code's stability and reliability.

About

Template for a Kotlin app using clean architecture.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages