• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Rakuten RapidAPI Blog

The World's Largest API Marketplace

  • Enterprise
    • Product
    • eBooks
    • Contact Us
  • Marketplace
    • Product
    • Sign Up
    • Docs
  • Resources
    • API Blog
    • API Tutorial
    • Developer Showcase
  • EnglishEnglish
    • 日本語日本語
You are here: Home / Developer Showcase / Developer Showcase: PokkaPet

Developer Showcase: PokkaPet

April 16, 2019 By jedng Leave a Comment

Many diabetic patients face challenges in affording healthcare expenses for diabetes treatment. However, they also lack of awareness of the importance of a healthy diet and regular exercise. Many lack the motivation to develop and maintain good lifestyle and dietary habits.

As part of SGInnovate Medtech gamification challenge, we developed an application on Rakuten RapidAPI that used gamification to positively influence behavioural changes in diabetic patients to improve overall patient well-being and thereby reduce healthcare costs. This challenge resonated with our team as in our busy everyday lives, we often forsake proper diet and regular exercise which can impact long term health.

PokkaPet built on Rakuten RapidAPI

Table of Contents

  • 1 The PokkaPet Solution
    • 1.1 Editor’s Note
  • 2 User Journey / Walkthrough
    • 2.1 Achievements during hackathon
    • 2.2 Step 1: Input nutritional information using an API
    • 2.3 Step 2: Feedback loop to overall user health
    • 2.4 Step 3: Keeping users motivated
  • 3 Tech stack
  • 4 Next Steps
      • 4.0.1 Share this:

The PokkaPet Solution

Calorie counters can be a way for people to keep track of their food nutrition and calorie intake. They can also function as a prevention tool. Diabetes patients need to actively do this and it can be hard. We set out to use gamification to keep the experience fun and engaging.

We built a gamified diet-tracker mobile application inspired by Tamagotchi- a childhood toy for us. We wanted to tap into the people’s strange obsession with caring for a virtual pet. This is the inspiration for PokkaPet. The app feeds whatever you eat to your pet. If you eat healthily, your pet will be healthy. If you eat too much junk food, your pet will fall sick,

During the course of a 24-hour hackathon, we developed basic app features such as user input of food intake, calorie and nutrition calculations, and avatars to represent a virtual pet’s state of health. We also built a pet ‘hangout page’, and analytics that show your healthy day streak.

Since the current version of the app is targeted at diabetes patients, calorie and nutrition intake targets is set for this. We can fine-tune these targets or expand the addressable market to the general population by getting users to input other medical conditions. Consultation with health professionals and approval from health boards would be needed to make the app viable as the go-to diet tracker app for patients. Immediate features we wanted to get done at the hackathon are profile creation, food intake history and more looks for the pet, which is our defining feature.

Overall, the platform’s navigation felt intuitive. There were numerous APIs to choose from and it was not difficult to find one which is suited for our needs. We were very amazed by how many APIs were out there available for our use. However, as it was the first time we were using APIs, we faced difficulties in understanding some of the terminologies used on the website such as ‘Request Snippet’ or ‘Test Endpoint’. Once we passed this hurdle, it wasn’t difficult to try other APIs.

Here’s a link to our presentation slides

Editor’s Note

Team PokkaPet was a winning team in the ‘API Hack’ track at Geekshacking HackoMania 2019 Hackathon.

We picked their application for the realistic, novel gamification approach to diet tracking and diabetes prevention. The team really excelled in implementation with demonstrable virtual pets that were custom designed. Most importantly, they work! Finally, they applied APIs well to prototype their solution in a short 24 hour window.

Interested in using Rakuten RapidAPI to power your next hackathon? Contact us here.

User Journey / Walkthrough

Achievements during hackathon

  • Design our own proprietary frontend characters that were inspired by Pet Society.
  • Connected APIs with Unity
  • Stored data received from API into Google Firebase

Step 1: Input nutritional information using an API

Starting with the idea that our virtual pet eats whatever we eat, we needed a way to calculate the nutritional information of a wide variety of foods. Having an API with access to a huge nutrition database helped us tremendously.

We used the Nutritionix API on Rakuten RapidAPI which allowed us to input a food item and receive comprehensive nutrition data such as total calories, fats, proteins, and carbohydrates. This nutrition intake was stored in Firebase which manipulated the daily health bars accordingly. If the user’s maximum food intake is exceeded, the pet’s health will begin to deteriorate.

Daily health bars

Screen 2. The nutrition intake graph with maximum value customised to user profile (age, gender, medical condition). If maximum recommended intake is exceeded, the current streak will be broken.

Step 2: Feedback loop to overall user health

We correlated a user’s overall health through their targeted nutrition intake and BMI. We used the Health API which performs a simple calculation using height and weight as inputs.

User health bar

Screen 1. The user sees healthy days streak. This is intended to motivate the user to keep the streak going by eating healthily.

If any of the above rules are broken, the pet will begin to look sick. This is an important part of the gamified experience of keeping a virtual pet healthy.

PokkaPet reflects our lifestyle

Step 3: Keeping users motivated

We wanted to add in a fun element and give the app a more personal touch. We used the Quotes and Proverbs API to communicate let pets motivate users through random motivational quotes when prompted. The idea is to let our virtual pets interact with their users.

Quotes and Proverbs API

Screen 3. Pet “hangout” screen.

Tech stack

Our frontend is based on the Unity engine and Unity Build Publisher. Our sprites are designed by our own team, based on inspiration by Pet Society sprites.

Our backend was built in C# and Google Firebase. We also integrated the following APIs from Rakuten RapidAPI:

  • Nutritionix API: We used this food and nutrition API to retrieve nutritional information based on users diet.
  • Health API: This simple API had a single endpoint to generate a user’s BMI based on height and weight inputs.
  • Quotes and Proverbs API: The quotes API was used to generate random inspirational quotes.

Next Steps

We plan to overhaul the app to provide a better, smoother user experience. As we were learning Unity Engine and how to use the APIs from scratch, our demo focused on the functionality. New features include implementing touch functionality and a database to manage multiple users’ data.

Additional features we plan to implement include a pedometer to track and reward users for walking and other physical activity. We plan to have social features like connecting to Facebook friends and visiting other people’s pets. Pets can be improved with better, more realistic, cuter animation and actions. We could also introduce a marketplace to purchase virtual accessories for pets. Mini in-app games can add a fun, competitive element by ranking friends and a global leaderboard.

We can also augment functionality with other more sophisticated APIs. For example:

  • BMI Calculator API calculates a users’ BMI based on age, height, weight, and gender inputs. It also informs users of possible health risks.
  • Image recognition and Computer Vision APIs will allow users to take picture of their meal instead of typing.
  • Speech-to-Text APIs like IBM Watson STT allow users a more natural way to provide user input.

Check out our presentation slides here if you’re interested. If you have further questions, please contact calebgengoh@gmail.com.

Featured Developers

Bahety Arjavi
Bahety Arjavi
Arjavi is a Computer Science freshman at the National University of Singapore. She is excited about the fusion of Computer Science with Medicine to improve diagnosis and patient outcomes. Besides technology, she loves learning Indian classical dance and listening to music.
Facebook | LinkedIn | Github

Caleb Goh Ee Gen
Caleb Goh Ee Gen
Caleb is a game, film, literature enthusiast. His aspiration is to transform lives, share ideas, and explore life through entertainment. Technology excites him, and he wishes to delve into its future. Lifelong learning while having fun is what matters to him.
Facebook | LinkedIn | Github

Christian James Welly
Christian James Welly
Christian is a Year 1 Computer Science undergraduate from National University of Singapore. He believes that technology will revolutionise the future and wishes to use his knowledge in the field of Computer Science in order to better the lives of others. Currently, he is exploring various things related to technology including game development, web development, artificial intelligence, etc.
Facebook | LinkedIn | Github

Dalis Chan
Dalis Chan
Dalis is a Computer Science freshman at the National University of Singapore. She values time over money, people over profit, and function over form. She is fascinated by the possibilities of software development and wishes to utilize it to bring about positive changes in her community.
Facebook | LinkedIn | Github

Johanna
Johanna
Johanna is a Computer Science freshman at the National University of Singapore. She is deeply passionate in exploring Artificial Intelligence, especially in the field of education. An avid jogger, she also loves to cycle, play netball and basketball in her free time.
Facebook | LinkedIn | Github

 

Rakuten RapidAPI

Rakuten RapidAPI is the world’s largest API marketplace with 8,000+ APIs and used by over 500,000 developers around the world. We enable developers to build transformative apps through the power of APIs. Find, test and connect to all the APIs you need in one place!

Check out some of the world’s best APIs including Microsoft, Sendgrid, Crunchbase and Skyscanner.

Follow us Facebook | LinkedIn | Twitter

Share this:

  • Click to share on Facebook (Opens in new window)
  • Click to share on Twitter (Opens in new window)
  • Click to share on LinkedIn (Opens in new window)
  • Click to share on Reddit (Opens in new window)

Filed Under: Developer Showcase

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

Accelerate tech modernization

To compete in the digital age, Rakuten RapidAPI helps enterprises deploy scalable and flexible IT systems to allow for ongoing experimentation and iteration at speed.

Learn More
Try Rakuten RapidAPI for free
  • Enterprise
  • Marketplace
  • Resources
  • EnglishEnglish

© 2022 Rakuten RapidAPI. All rights reserved.