⟵ Back to Portfolio

Health Mentor - App Built for Trainers and Coaches

#
Digital Health
#
Mobile App

About the Project

A lot of people struggle to develop new, healthy habits and stick to them. Research showed, though, that it’s much easier for them to do that if they’re encouraged to. Health Mentor is an app that roots in that idea, allowing lifestyle and fitness coaches to connect to their clients.

Health Mentor’s functionality is built on the basis of behavioral science: through exercises, goal-setting, encouragement, and recurrent check-ups, coaches guide their clients towards a more active and healthy lifestyle. They do all that, based on the data of the client’s progress, pulled from their smartphones and wearables (obviously, after their permission.) We helped the Health Mentor startup to develop this app.

Technology Stack

  • Flutter
  • Redux
  • GraphQL
  • Twilio
  • Firebase
  • Google Fit
  • HealthKit

Initial Request from the Client

We were asked to create a proof of concept (PoC) for the app using the Health Flutter plugin to validate users’ data transfer on iOS (through HealthKit) and Android (through Google Fit APIs).


The idea was that users will allow data exchange between nutrition apps like MyFitness Pal and Health Mentor via Health and Google Fit.


Then, Health Mentor would have data entries from the apps people are already using and, utilizing a modified Flutter plugin, would be able to break these data to include additional information about people’s nutrition.

As a result, users would be able to:

  • See detailed data visualization for daily nutrient consumption (segments for protein, fat, carbohydrates, calories, etc)
  • Add entries on nutrients by themselves within Health Mentor
  • Refresh the app and synchronize Health Mentor with other nutrition apps and pull the new data from them.

That is exactly what we did. The process was interesting and challenging — so let’s talk about the issues we’ve encountered and the ways we’ve solved them.

What We Did: Challenges and Solutions

During our work on the project, we:

  • Developed an iOS/Android app via Flutter using Redux for architecture.
  • Implemented GraphQL API Backend for data transfer control.
  • Created a messenger using Twilio.
  • Integrated Push Notifications using Twilio & Firebase.
  • Set Health Data fetch via our plugin.
  • Performed Background Sync using WorkManager.
  • Used internal.io to build the admin panel.

Now, let’s move to challenges.

Challenge #1: Health Plugins Integration

The main problem we encountered when developing Health Mentor was retrieving the health data. The objective was to enable the management of information hosted by two completely different data systems – Apple Health and Google Fit via a single Flutter repository. We needed to build different permission systems and background fetches for data retrieval within corresponding systems, and the latter is considered impossible to pull off for a locked iOS device.

Solution

  • To address the issue, Diversido developers customized an open-source health plugin. The modified plugin can retrieve data for a specified range, dividing it into arrays by data type, time, and device rather than pulling all streams together. With iOS and Android health data having different formats, this method allows the system to pull data entries to an app without errors caused by mixing them up.
  • Diversido also used an aggregation system that worked similarly. That allowed us to get a correct sum of data types like steps, calories, etc, avoiding conflict between data-gathering devices (like iPhone and Apple Watch that both track steps.)
  • We ended up creating our custom, versatile Flutter health plugin, based on the latest updates of Apple’s HealthKit and Google Fit SDK.

Challenge #2: Billing System Support

The billing system presented another challenge. Health Mentor has to support building per day or per number of customers.

Apart from that, the billing system had to:

  • Allow users to cancel subscriptions and switch between billing periods in the middle of the day, which meant we had a lot of things to consider about data ranges and time zones.
  • Keep old prices the same for the existing customers after price changes.
  • Allow users to change customers’ status during a billing period without including days users used Health Mentor but weren’t billed for it.
  • Support free quota for customers. Some functionality is paid, and others aren’t, so the billing system must account for that — and for cases when a user’s paying status changes.

The billing system is vital to get right, so we’ve worked through it for quite a bit.

Solution

We ensured that the app stores a bit of historical data, just enough for a system to continuously sync it with billing system usage data, so prices and estimated prices stayed consistent.

Challenge #3: New Twilio Conversations in Flutter

In Health Mentor, coaches and their clients can chat. We decided to use Twilio Programmable Chat to build chatrooms, but Twilio developers announced that they will stop supporting that API in June 2021, while the product that replaces it today, Twilio Conversation, was still in development. It lacked supporting documentation and did not have a Flutter package we could use.

Solution

We decided to go creative and use the existing Twilio Programmable Chat package for Flutter. But we updated it to be compatible with Twilio Conversations SDK. It took several months to fix idling issues, eliminate code errors, adjust the push notifications system, and correct functionality for presentations and lessons.


Even after 5-6 months of development, we appeared to be the first team in the large Flutter community to use the new Twilio Conversations in a Flutter development! The only other Conversations package for Flutter was published in January 2022.

Challenge #4: Correct Time Zone Display

It’s often that a coach and a client are in different time zones — or they change timezones while consistently using the app. We needed to make sure goals coaches set for clients are set to complete in timelines the clients are. Same with the progress trackers. So, we had to resolve issues for an app to correctly save, synchronize, and display data.

Solution

After thorough analysis and meticulous work and careful consideration of user accounts’ time zones, we managed to achieve the goal: the app saved, synchronized, and displayed the data correctly. It was a complex piece of functionality to develop.

Results of our Work

We’ve completed the job that has been asked of us and collaborated with a client in post-production. Here are some of the features we’ve integrated into the release version of Health Mentor:

  • Private client messaging
  • Push Notifications system for coaches to encourage their clients
  • Log in via Apple, Google, and Facebook accounts.
  • Data sync with many fitness & nutrition apps and wearables
  • Functionality for building personalized coaching plans
  • Progress trackers for workouts & other fitness goals
  • Content library with lifestyle & fitness advice
  • Sleep monitoring functionality

Right now, Health Mentor is available for Android and iOS, and according to reviews, people enjoy it a lot. If you need wellness or healthcare apps developed, drop us a line.

Challenge #3: New Twilio Conversations in Flutter

In Health Mentor, coaches and their clients can chat. We decided to use Twilio Programmable Chat to build chatrooms, but Twilio developers announced that they will stop supporting that API in June 2021, while the product that replaces it today, Twilio Conversation, was still in development. It lacked supporting documentation and did not have a Flutter package we could use.

Solution

We decided to go creative and use the existing Twilio Programmable Chat package for Flutter. But we updated it to be compatible with Twilio Conversations SDK. It took several months to fix idling issues, eliminate code errors, adjust the push notifications system, and correct functionality for presentations and lessons.


Even after 5-6 months of development, we appeared to be the first team in the large Flutter community to use the new Twilio Conversations in a Flutter development! The only other Conversations package for Flutter was published in January 2022.

Challenge #4: Correct Time Zone Display

It’s often that a coach and a client are in different time zones — or they change timezones while consistently using the app. We needed to make sure goals coaches set for clients are set to complete in timelines the clients are. Same with the progress trackers. So, we had to resolve issues for an app to correctly save, synchronize, and display data.

Solution

After thorough analysis and meticulous work and careful consideration of user accounts’ time zones, we managed to achieve the goal: the app saved, synchronized, and displayed the data correctly. It was a complex piece of functionality to develop.

Have a project in mind? Let's talk

Out technical, design, sales & marketing teams will gladly share their expertise and help bringing your idea to life!

Book A Meeting
Have a project in mind? Let's talk

Out technical, design, sales & marketing teams will gladly share their expertise and help bringing your idea to life!

Book A Meeting
Have a project in mind? Let's talk

Out technical, design, sales & marketing teams will gladly share their expertise and help bringing your idea to life!

Book A Meeting

You May Also Like

Gamification
Mobile App

Legend of Tapatan

Tapatan is an archaic board game originating from the Philippines.

Read more
Digital Health
Mobile App

Kiwi

Fitness app which lets cutting-edge instructors directly connect with students.

Read more
Mobile App

Streaming Music App

Music iOS app which combines all needed features for music lovers.

Read more
Back to Portfolio