Coder Social home page Coder Social logo

vaibhav2002 / healthify Goto Github PK

View Code? Open in Web Editor NEW
81.0 1.0 24.0 28.49 MB

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: MIT License

Kotlin 100.00%
android kotlin firebase auth0 android-jetpack-components mvvm datastore hashnode hackathon hactoberfest

healthify's Introduction

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

healthify's People

Contributors

vaibhav2002 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

healthify's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.