Skip to content

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

License

Notifications You must be signed in to change notification settings

Vaibhav2002/Healthify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

46 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

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

About

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

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published

Languages