Skip to content

Clean architecture koin #58

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 18 commits into from
Feb 25, 2022

Conversation

agustinkoll-rootstrap
Copy link
Contributor

@agustinkoll-rootstrap agustinkoll-rootstrap commented Feb 2, 2022

Description

We added modular clean architecture with Koin for dependency management:

APP

This is the presentation module, also known as the user interaction layer. Here we manage activities, fragments, views and viewModels.

DATA

In this module we find a definition of the different data sources (local or remote).
The implementation of each repository.
Network and endpoints implementation.
Database implementation. (not implemented in this pr).
Test: We added example test to the View models mocking each use case.

Depends on:

  • data
    
  • domain
    

DOMAIN

It's the layer where we manage the business models.
Depends on: No dependencies.

USE-CASES

This is the management layer of all the actions that the user can trigger. The business logic goes here. Every action that the user can make in the app has a use case.
Depends on:

  •  data
    
  •  domain
    

There is an additional BUILDSRC module that we use to manage dependencies and versions. This module takes a system name that is recognized by the compiler and executed in the first instance before loading any other module.

We follow one of the basic principles of development to found the bases on the three following pillars:
SCALABLE
MAINTAINABLE
TESTABLE

Dependencies Chart:

Presentación sin título (1)

marcossalto and others added 16 commits December 13, 2021 16:25
Remove flavors from gradle
Add Koin
Add uses cases
Update base activity and base view model
Handle API errors
added test libraries
renamed user dto
# Conflicts:
#	app/build.gradle
#	app/src/main/java/com/rootstrap/android/ui/activity/main/SignInActivityViewModel.kt
#	app/src/main/java/com/rootstrap/android/ui/activity/main/SignUpActivityViewModel.kt
#	app/src/main/java/com/rootstrap/android/util/UtilModule.kt
#	app/src/test/java/com/rootstrap/android/SignInActivityViewModelTest.kt
#	app/src/test/java/com/rootstrap/android/SignUpActivityViewModelTest.kt
#	app/src/test/java/com/rootstrap/android/test/UnitTestBase.kt
@@ -2,4 +2,4 @@
# Comma-separated list of rules to disable (Since 0.34.0)
# Note that rules in any ruleset other than the standard ruleset will need to be prefixed
# by the ruleset identifier.
disabled_rules=import-ordering,experimental:annotation
disabled_rules=no-wildcard-imports,import-ordering,experimental:annotation
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😍

Copy link
Collaborator

@amaury901130 amaury901130 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome 🤘

@amaury901130
Copy link
Collaborator

I'd consider removing this branch/PR:
#49

@agustinkoll-rootstrap agustinkoll-rootstrap merged commit 31bd88c into master-koin Feb 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants