Weightly(Still in development)
Weightly is simple weight tracker app. It stores data from the scale to monitor and analyze weight loss.
This app implements MVVM architecture. App consist of different fragments and 1 root activity. Activity holds a container layout in order to manage fragments which will be controlled by navigation component. Here is the package structure:
It is the package that contains all the common and base classes used within the application. Extensions, deciders, utils and base classes are included in this package.
Data package should include response models, data source and api methods. It shouldn’t know any logic.
UI like a feature. It contains Fragments, view models and feature related classes like a domains, mappers and ui models. Make sure that all classes here are specific to the this feature. If it is a class that is also used in other features, it should be moved to the common package.
This package may actually be inside the common module. But I prefer to carry outside of core package to be more visible.
In large projects, we need to use a view component in more than one place. So i moved common view components under ui-component package.
- Kotlin , Coroutines , Flow
- Dagger-Hilt – Dependency Injection
- MVVM Architecture – Modern, maintainable, and Google suggested app architecture
- Room – For offline storage
- Navigation Component – Single activity multiple fragments approach
- View Binding
- StateLayout – For managing view states
- Single Activity multiple Fragments approach
TODOs and Improvements
- UI test.
- Better Design
- Unit tests
- Implementation of static code analysis tool(ktlint or detekt)
- Styling definitions for textviews and buttons etc.