All Projects → MayconCardoso → Stocktradetracking

MayconCardoso / Stocktradetracking

Licence: apache-2.0
A showcase for modularized MVVM Architecture for Android, powered by Kotlin Coroutines and Clean Architecture.

Programming Languages

kotlin
9241 projects

Projects that are alternatives of or similar to Stocktradetracking

Clean-MVVM-NewsApp
Android News app developed using Clean + MVVM architecture
Stars: ✭ 52 (-13.33%)
Mutual labels:  clean-architecture, mvvm-architecture
Kotlin Modular Tdd Coroutines Mvvm
A sample Kotlin app which was built with modular structure, Kotlin DSL, Kotlin Coroutines, TDD and MVVM patterns.
Stars: ✭ 256 (+326.67%)
Mutual labels:  clean-architecture, mvvm-architecture
MVI-Clean-Architecture
MVI + Clean Architecture + Best Practices | Example of Clean Architecture of Android app using MVI design pattern with Jetpack and popular libraries
Stars: ✭ 50 (-16.67%)
Mutual labels:  clean-architecture, mvvm-architecture
Muvi
Very simple project to show a collection of Movie from MovieDb with a minimalist design
Stars: ✭ 46 (-23.33%)
Mutual labels:  clean-architecture, mvvm-architecture
Musicplayer
Implemented using Clean Arch, MVVM, LiveData, Room, Koin, Coil, Service, Notification and ExoPlayer
Stars: ✭ 413 (+588.33%)
Mutual labels:  clean-architecture, mvvm-architecture
FoodApp
Proof of concept for food app [JetPack + Coroutines + Flow + MockK + JaCoCo coverage + SonarQube]
Stars: ✭ 25 (-58.33%)
Mutual labels:  clean-architecture, mvvm-architecture
CleanArchitectureMVVM
Example of Clean Architecture of Android app using MVVM, Koin, Coroutines, Retrofit, Room, Solid Principle, DRY, KISS, OOP
Stars: ✭ 60 (+0%)
Mutual labels:  clean-architecture, mvvm-architecture
Android Modular Architecture
📚 Sample Android Components Architecture on a modular word focused on the scalability, testability and maintainability written in Kotlin, following best practices using Jetpack.
Stars: ✭ 2,048 (+3313.33%)
Mutual labels:  clean-architecture, mvvm-architecture
News Sample App
A sample news app which demonstrates clean architecture and best practices for developing android app
Stars: ✭ 334 (+456.67%)
Mutual labels:  clean-architecture, mvvm-architecture
Clean Mvvm Archcomponents
👽 Android app consuming Star Wars API.Built with clean architecture ,MVVM pattern, Koin , Coroutines + Flows ,Architecture Components, Data Binding , Firebase , Unit/UI Tests ,Motion Layout
Stars: ✭ 285 (+375%)
Mutual labels:  clean-architecture, mvvm-architecture
Vigilante
🛡️ Android security (camera/microphone dots indicators) app using Hilt, Animations, Coroutines, Material, StateFlow, Jetpack (Room, ViewModel, Paging, Security, Biometrics, Start-up) based on MVVM architecture.
Stars: ✭ 234 (+290%)
Mutual labels:  clean-architecture, mvvm-architecture
Ios Clean Architecture Mvvm
Template iOS app using Clean Architecture and MVVM. Includes DIContainer, FlowCoordinator, DTO, Response Caching and one of the views in SwiftUI
Stars: ✭ 753 (+1155%)
Mutual labels:  clean-architecture, mvvm-architecture
Android Kotlin Mvi Cleanarchitecture
Android + Kotlin + Modularization + Gradle Depedency managment + Gradle written in Kotlin DSL + Custom Gradle Plugin + MVVM + MVI + Clean Architecture + Repository Pattern + Coroutines + Flows + Koin + Retrofit2 + ROOM + Kotlin-Android-Extension + KtLints
Stars: ✭ 187 (+211.67%)
Mutual labels:  clean-architecture, mvvm-architecture
SimpleAndroidMVVM
Proyecto de ejemplo con Clean Architecture, MVVM, Retrofit, Corrutinas, Dagger Hilt y mucho más acompañado de tutoriales por escritos y en vídeo.
Stars: ✭ 950 (+1483.33%)
Mutual labels:  clean-architecture, mvvm-architecture
Clean Architecture Swiftui
SwiftUI sample app using Clean Architecture. Examples of working with CoreData persistence, networking, dependency injection, unit testing, and more.
Stars: ✭ 2,925 (+4775%)
Mutual labels:  clean-architecture, mvvm-architecture
Transact
A transaction management android app which allows you to verify records from both parties before addition.
Stars: ✭ 21 (-65%)
Mutual labels:  clean-architecture, mvvm-architecture
Kotlinmultiplatform mvvm
Android & iOS App using MVVM pattern and LiveData on the presentation layer + Clean Arch on the common shared code.
Stars: ✭ 135 (+125%)
Mutual labels:  clean-architecture, mvvm-architecture
Android Clean Architecture Mvvm Dagger Rx
Implemented by Clean Architecture, Dagger2, MVVM, LiveData, RX, Retrofit2, Room, Anko
Stars: ✭ 138 (+130%)
Mutual labels:  clean-architecture, mvvm-architecture
Clean Notes
Clean Architecture by layer
Stars: ✭ 259 (+331.67%)
Mutual labels:  clean-architecture, mvvm-architecture
Offlinesampleapp
Sample Offline-First MVVM app that uses Android Priority Job Queue, Room, Retrofit2, LiveData, LifecycleObserver, RxJava2, Dagger Android
Stars: ✭ 653 (+988.33%)
Mutual labels:  clean-architecture, mvvm-architecture

Stock Trade Tracking

ktlint CircleCI Codecov kotlin License Apache-2.0

Stock Trade Logo

About

Stock Trade Tracking is an app where you can register your Ibovespa shares and track your profit or loss automatically (Hopefully your profit).

It is a simple showcase for a modern and well-crafted Android application, powered by Kotlin Coroutines and Clean Architecture. It is a real modularized MVVM application.

with-internet withou-internet withou-internet

Project Overview

The code is structured in a multi-module fashion, with semantics guided by Clean Architecture.

The domain is a horizontal module that defines all business rules and the core protocols to be implemented by low-level details, while aggregates them in high-level policies by using the UseCase concept from Clean Architecture.

Stock Trade Logo

Below you can see a better representation of how the project is structured in terms of modules dependencies. If you look at the diagram arrows you are going to see that the domain layer does not depend on any other module. It is a pure Kotlin module.

module-structure

Related Libs

Here are some personal libraries used to develop this app:

Roadmap

You can check out the Project Board to see the next steps.

Testing

When I have said this architecture was very simple to be tested I was being serious. Here is a little example of a code testing two differents LiveDatas at the same time with the same action trigger.

class TimelineBalanceListViewModelTest : BaseViewModelTest() {
    private val loaderUseCase	    = mock<GetCurrentPeriodBalanceCase>()
    private val expectedList        = TimelineBalanceFactory.listOf(10)

    private lateinit var viewModel  : TimelineBalanceListViewModel

    @Before
    fun `before each test`() {
        viewModel = TimelineBalanceListViewModel(loaderUseCase)
    }

    @Test
    fun `should initialize components`() = testLiveDataScenario {
        assertLiveDataFlow(viewModel.periodList){
            it.assertFlow(ComponentState.Initializing)
        }

        assertLiveDataFlow(viewModel.finalBalance){
            it.assertFlow(ComponentState.Initializing)
        }
    }

    @Test
    fun `should return list`() = testLiveDataScenario {
        whenThisScenario{
            whenever(loaderUseCase.execute()).thenReturn(Result.Success(expectedList))
        }

        onThisAction {
            viewModel.interact(TimelineBalanceListInteraction.LoadTimelineComponent)
        }

        assertLiveDataFlow(viewModel.periodList){
            it.assertFlow(
                ComponentState.Initializing,
                ComponentState.Loading.FromEmpty,
                ComponentState.Success(expectedList)
            )
        }

        assertLiveDataFlow(viewModel.finalBalance){
            it.assertFlow(
                ComponentState.Initializing,
                ComponentState.Loading.FromEmpty,
                ComponentState.Success(expectedList.first())
            )
        }
    }
}

License

The MIT License (MIT)

Copyright (c) 2020 Maycon Cardoso

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].