Healthify - An app to track your daily water intake and sleep and boost your work efficiency. Healthify is built using Kotlin and follows all modern android Development practices and hence is a good learning resource for beginners

Overview

Healthify

Healthify is an app to track your daily water intake and sleep and boost your work efficiency.

Video Introduction πŸ“Ή

This is a small introduction video about healthify https://youtu.be/QiP8NkIqVQs.

Blog ✍

To know more about how I build this project, read my article on https://vaibhav2002.hashnode.dev/healthify-an-app-to-track-your-daily-water-intake-and-sleep-and-boost-your-work-efficiency-auth0hackathon

Application Install

You can Install and test latest Healthify app from below πŸ‘‡

Healthify

Setup

  • Clone the repository on your machine.
  • Create project in Firebase, enable firestore, set rules to public and download google-services.json and paste in the app folder.
  • Sign up for auth0 and do as stated below

Open strings.xml and add Auth0 credentials

    <!--    add your Auth0 scheme here-->
    <string name="scheme"></string>

    <!--    add your Auth0 domain name here-->
    <string name="domain"></string>

    <!--    add your Auth0 client id here-->
    <string name="client"></string>

Open Secrets.kt in util package and add your Auth0 credentials

   const val CLIENT_ID = ""            // add you Auth0 client id here
   const val DOMAIN_NAME = ""          // add you Auth0 domain name here

About

It uses Firebase and Auth0 as its backend. It uses Auth0 for email based auth and Google auth and Firebase Firestore as its database.

  • Fully functionable.
  • Clean and Simple Material UI.
  • It supports dark theme too πŸŒ— .

App Features

  • User Authentication - Allowing users to login and register using auth0.
  • Dashboard - There are two dashboards for sleep and water. It shows the amount of water drank and hours slept and also logs for each.
  • Add Water - Selecting water amount to add in daily water list.
  • Water Drinking Notification - Healthify reminds you to drink water by sending a notification after 1 hour of your last tracked water intake.
  • Add Sleep - Selecting number of hours to add in daily sleep list
  • Statistics - Shows statistics of water drank and hours slept within last week.
  • Profile - Shows user's profile.
  • Leaderboard - Shows a leaderboard consisting of all users ranked based on XP points.
  • About - Shows information about the app like its version number and more.

Insights into the app πŸ”Ž

Healthify offers light as well as dark theme πŸŒ“ . So now you can use Healthify in whatever theme you like the most. πŸ”₯

Healthify has a clean and sleek user interface which makes it easy for people of all age groups use it. 😁

Healthify uses Auth0 for authentication. It supports email-based authentication as well as Google authentication. Healthify also has a smooth user onboarding process.

Have a look at your daily water intake and statistics of your water intake in the last week.

Have a look at your daily sleep 😴 amount and statistics of your sleep in the last week.

Healthify has a XP based ranking system which ranks you among other users. XP can be gained by adding water and sleep. Having such ranking system in this app will make users compete and hence make it a habit of users to drink water and get enough sleep

πŸ“Έ Screenshots

Technical details

  • Healthify uses Auth0 for user authentication, it supports email based authentication and Google authentication
  • Healthify uses Firebase Firestore as it's primary database.
  • Healthify has full offline support, it uses Android's ROOM database for caching all data offline.
  • Healthify is made using Kotlin and following Modern Android Development practices.
  • Healthify uses all Jetpack libraries and follows MVVM architecture. It also has a G.O.A.T rating in Android's M.A.D scorecard.
  • Healthify's code follows all the best practices and software development principles which make it a very good learning resource for beginners.

summary.png

Built With πŸ› 

  • Kotlin - First class and official programming language for Android development.
  • Coroutines - For asynchronous and more..
  • Flow - A cold asynchronous data stream that sequentially emits values and completes normally or with an exception.
  • StateFlow - StateFlow is a state-holder observable flow that emits the current and new state updates to its collectors.
  • SharedFlow - A SharedFlow is a highly-configurable generalization of StateFlow.
  • Android Architecture Components - Collection of libraries that help you design robust, testable, and maintainable apps.
    • ViewModel - Stores UI-related data that isn't destroyed on UI changes.
    • ViewBinding - Generates a binding class for each XML layout file present in that module and allows you to more easily write code that interacts with views.
    • DataBinding - Binds data directly into XML layouts
    • Room - Room is an android library which is an ORM which wraps android's native SQLite database
    • DataStore - Jetpack DataStore is a data storage solution that allows you to store key-value pairs or typed objects with protocol buffers.
  • Dependency Injection -
    • Hilt-Dagger - Standard library to incorporate Dagger dependency injection into an Android application.
    • Hilt-ViewModel - DI for injecting ViewModel.
  • Backend
    • Firebase
      • Firebase Firestore - A NoSQL database to store all data
    • Auth0 - Auth0 is an easy to implement, adaptable authentication and authorization platform.
  • GSON - A modern JSON library for Kotlin and Java.
  • Timber - A simple logging library for android.
  • GSON Converter - A Converter which uses Moshi for serialization to and from JSON.
  • Coil - An image loading library for Android backed by Kotlin Coroutines.
  • Material Components for Android - Modular and customizable Material Design UI components for Android.

Package Structure

com.vaibhav.healthify    # Root Package
.
β”œβ”€β”€ data                # For data handling.
|   β”œβ”€β”€ local           # Room DB and its related classes
|   β”œβ”€β”€ remote          # Firebase, Auth0 and their relative classes
β”‚   β”œβ”€β”€ model           # Model data classes and mapper classes, both remote and local entities
β”‚   └── repo            # Single source of data.
|
β”œβ”€β”€ di                  # Dependency Injection             
β”‚   └── module          # DI Modules
|
β”œβ”€β”€ ui                  # UI/View layer
|   β”œβ”€β”€ adapters        # All Adapters, viewholder and diffUtils for recyclerViews   
|   β”œβ”€β”€ dialog          # All Dialog Fragments and their viewmodels      
β”‚   β”œβ”€β”€ auth            # Authorization Activity and its fragments
β”‚   β”œβ”€β”€ homeScreen      # Home Activity and its fragments
|   β”œβ”€β”€ userDetails     # User Details Activity and its fragments
|   β”œβ”€β”€ onBoarding      # OnboardingScreen
β”‚   └── splashScreen    # SplashScreen
|
└── utils               # Utility Classes / Kotlin extensions

Architecture

This app uses MVVM (Model View View-Model) architecture.


If you like my projects and want to support me to build more cool open source projects


Contact

If you need any help, you can connect with me.

Visit:- Vaibhav Jaiswal

You might also like...
The Sleep tracker app for lesson 6 of the Udacity: Developing Android Apps with Kotlin Course
The Sleep tracker app for lesson 6 of the Udacity: Developing Android Apps with Kotlin Course

App Architecture-Presistence This is the Sleep tracker app for lesson 6 of the U

Room : Sleep Quality Tracker app
Room : Sleep Quality Tracker app

Room - SleepQualityTracker app This is the toy app for Lesson 6 of the Android App Development in Kotlin course on Udacity. SleepQualityTracker The Sl

eduJam is an university app, which will help you with all of your university work*
eduJam is an university app, which will help you with all of your university work*

eduJam - Your one-stop to any university work eduJam is an university app, which will help you with all of your university work. It has features which

The Rick And Morty - MVVM with a clean architecture approach using some of the best practices in Android Development.
The Rick And Morty - MVVM with a clean architecture approach using some of the best practices in Android Development.

Rick-and-Morty The Rick And Morty - App consuming a Rick and Morty API to display Characters it has been built with clean architecture principles, Rep

SleepNow - Sleep time recommendation application
SleepNow - Sleep time recommendation application

Project: SleepNow 슬립 λ‚˜μš° 개인 ν”„λ‘œμ νŠΈ 2020.01 ~ 2020.01 0. Overview μŠ¬λ¦½λ‚˜μš°λŠ” 자러 갈 μ‹œκ°„μ΄λ‚˜ 일어

 🍲Foodium is a sample food blog Android application πŸ“± built to demonstrate the use of Modern Android development tools - (Kotlin, Coroutines, Flow, Dagger 2/Hilt, Architecture Components, MVVM, Room, Retrofit, Moshi, Material Components).
🍲Foodium is a sample food blog Android application πŸ“± built to demonstrate the use of Modern Android development tools - (Kotlin, Coroutines, Flow, Dagger 2/Hilt, Architecture Components, MVVM, Room, Retrofit, Moshi, Material Components).

Foodium 🍲 Foodium is a sample food blog 🍲 Android application πŸ“± built to demonstrate use of Modern Android development tools. Dedicated to all Andr

The JeTrivia is built on a modern Android Development tech stack with MVVM architecture. Kotlin, Coroutine, Flow, StateFlow, Jetpack Compose, Navigation, Room, Hilt, Retrofit2, OkHttp3, kotlinx.serialization, MockK, Truth
The JeTrivia is built on a modern Android Development tech stack with MVVM architecture. Kotlin, Coroutine, Flow, StateFlow, Jetpack Compose, Navigation, Room, Hilt, Retrofit2, OkHttp3, kotlinx.serialization, MockK, Truth

JeTrivia 🚧 In Progress 🚧 The JeTrivia application is sample based on MVVM architecture. Fetching data from the network via repository pattern and sa

Modern-android-lab - Kotlin Language learning lab

kotlin-code-labs Kotlin Language learning lab Run the code with Kotlin Compiler:

 A daily horoscopes listing. App using my personality project's API and Jetpack Compose
A daily horoscopes listing. App using my personality project's API and Jetpack Compose

A daily horoscopes listing. App using my personality project's API and Jetpack Compose. Application architecture based on MVVM and Clean Architecture

Releases(v1.0.0)
  • v1.0.0(Aug 27, 2021)

    Healthify - An app to track your daily water intake and sleep and boost your work efficiency

    App Features

    • User Authentication - Allowing users to login and register using auth0.
    • Dashboard - There are two dashboards for sleep and water. It shows the amount of water drank and hours slept and also logs for each.
    • Add Water - Selecting water amount to add in daily water list.
    • Water Drinking Notification - Healthify reminds you to drink water by sending a notification after 1 hour of your last tracked water intake.
    • Add Sleep - Selecting number of hours to add in daily sleep list
    • Statistics - Shows statistics of water drank and hours slept within last week.
    • Profile - Shows user's profile.
    • Leaderboard - Shows a leaderboard consisting of all users ranked based on XP points.
    • About - Shows information about the app like its version number and more.

    Technical details

    • Healthify uses Auth0 for user authentication, it supports email based authentication and Google authentication
    • Healthify uses Firebase Firestore as it's primary database.
    • Healthify has full offline support, it uses Android's ROOM database for caching all data offline.
    • Healthify is made using Kotlin and following Modern Android Development practices.
    • Healthify uses all Jetpack libraries and follows MVVM architecture. It also has a G.O.A.T rating in Android's M.A.D scorecard.
    • Healthify's code follows all the best practices and software development principles which make it a very good learning resource for beginners.
    Source code(tar.gz)
    Source code(zip)
    healthify.apk(13.00 MB)
Owner
Vaibhav Jaiswal
Passionate Android Developer . Competitive programmer and Ui/UX designer.
Vaibhav Jaiswal
Water tracker app helps you with daily reminder to drink water. This app is just a trial to test and improve my android development skills.

?? About Me I am a self-thaught developer learning web and android development. This app is just a trial to test and improve my android development sk

Sinan Sonmez (Chaush) 28 Dec 17, 2022
πŸ“’ NotyKT is a complete πŸ’ŽKotlin-stack (Backend + Android) πŸ“± application built to demonstrate the use of Modern development tools with best practices implementation🦸.

NotyKT ??️ NotyKT is the complete Kotlin-stack note taking ??️ application ?? built to demonstrate a use of Kotlin programming language in server-side

Shreyas Patil 1.4k Jan 8, 2023
Money Manager app that helps you to add your daily small incomes and expenses and track them easily.

Simple Money Manager This app is a simple money manager app which helps you to add your daily small incomes and expenses and track them easily. Screen

Yash Bansal 2 Nov 21, 2021
Download-manager - Boost AWS S3 file download for android

download-manager Boost AWS S3 file download What is DownloadManager? It is desig

Quique Ferraris 0 Feb 17, 2022
AudioNotes πŸ“™ An open source simple audio note taking app built to demonstrate android development best practices.

AudioNotes ?? A simple open source audio note-taking ?? Android application built to describe the use of Modern Android development tools. ?? . Made w

Samson Achiaga 47 Dec 15, 2022
The SleepQualityTracker app - a demo app that helps you collect information about your sleep

The SleepQualityTracker app is a demo app that helps you collect information about your sleep. This app builds on the SleepQualityTracker previous made, refactoring the code to make it more efficient so it will be easier to maintain and test

Alexandre Pedro 1 Apr 1, 2022
A Good Scanner Built With Kotlin

GoodScanner TODO OpenCV Android ν”„λ‘œμ νŠΈμ— μ„€μΉ˜ https://webnautes.tistory.com/923 Gaussian Blurring κ³Ό 같은 κΈ°μˆ μ„ μ΄μš©ν•˜μ—¬ Image의 noise 제거 OpenCVλ₯Ό μ΄μš©ν•œ Document Edge D

JoonBeom Park 3 Dec 21, 2021
A simple Water Board solver.

WaterSolver A simple Water Board solver. Some variants are very wrong! No need to report this... For now this is it. Might update the mod by being abl

null 4 Nov 18, 2022
Sanctuary relies on the Android Work Profile APIs to create a self-contained work profile on a user's personal device.

Sanctuary relies on the Android Work Profile APIs to create a self-contained work profile on a user's personal device. Managed apps, data, and management policies are restricted to the work profile, keeping them secure and separate from personal data while maintaining user privacy.

Jonathan Odul 1 Dec 15, 2021