Skip to content

canonall/CalorieTracker

Repository files navigation

CalorieTracker


A calorie tracker app based on Philipp Lackner's multi module course. With this app you can search for any type of food you desire, whether it's breakfast, lunch, dinner or a snack. Once you have found the food you want, you can add it to your meal section, which helps you keep track of what you're eating throughout the day. You can find the detailed tech stack and architecture in the below sections. The purpose is to learn how to structure different modules with Clean Architecture.

After completing the course I made the following changes/improvements:

API Profile

Screeshots 📸

Tech stack & Libraries 📚

  • Android Architecture Components - Best practices for testable, maintainable and robust high-quality apps.
    • Compose Destinations - Easy navigation library for compose (used with single activity)
    • Lifecycle - use viewmodel, a lifecycle aware component
    • ViewModel - Stores UI-related data and persists it through configuration changes.
    • UseCases
      • Contains business logic with a single responsibility.
      • Located in domain layer that sits between the UI layer and the data layer.
    • Repository - Located in data layer that contains application data and business logic.
  • Jetpack Compose - is the modern toolkit recommended by Android for building native user UI. It streamlines and speeds up the development process by allowing for the creation of powerful and intuitive UI with less code and easy-to-use Kotlin APIs.
  • Android Hilt - Dependency Injection Library for Android
  • Coroutines - is a concurrency design pattern that you can use on Android to simplify code that executes asynchronously.
  • Flow - is a type that can emit multiple values sequentially. They are built on top of coroutines and can provide multiple values.
    • Channels - are a good fit for communication between different coroutines, or any use case that requires a producer-consumer approach.
  • Room - Persisten library for Android
  • Retrofit - simplifies network requests and responses by providing a high-level REST client implementation.
    • OkHttp - is the backbone library of Retrofit for sending and receive HTTP-based network requests.
    • Moshi - is for parsing JSON into Kotlin.
  • Coil Compose - is a library for loading images on Android, utilizing Kotlin Coroutines for efficient and responsive performance.
  • Detekt - Static code analysis for Kotlin
  • Timber - Logging library for Android
  • Testing
    • Truth - Fluent assertions for Android
    • Mockk - Mocking library
    • MockWebServer - A scriptable web server for testing HTTP clients
    • Turbine - A small testing library for kotlinx.coroutines Flow

Architecture 📏

The app is built using MVVM (Model-View-ViewModel) architecture with Presentation, Domain and Data layers.

Dependency Graph

The graph below illustrates the relationships between different modules by indicating which modules include other modules.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages