DEV Community

Mritunjai Gupta
Mritunjai Gupta

Posted on

Healtify: Turn your everyday bad habits into good one

Hacktoberfest Weekend Challenge: Build for a Friend Submission 🤝

This is a submission for the Hacktoberfest Weekend Challenge: Build for a Friend

What I Built

I built Healtify, a personal lifestyle tracking and wellness companion for a friend who has been struggling with smoking and other unhealthy habits.
The initial idea was simple: create an application where he could track things like smoking, alcohol consumption, outside food, screen time, sleep, and physical activity.
But while building it, I realized there was a problem with only tracking bad habits.
If someone is already frustrated with their habits, opening an app every day and seeing charts showing smoking, junk food, or other negative behaviors going up can become discouraging. Instead of motivating them, the application could make them feel like they are constantly failing.
So I changed the idea.
Healtify tracks both the habits that are helping you and the habits that are working against you.
It tracks eight lifestyle dimensions:

  • Food & Nutrition
  • Smoking
  • Alcohol
  • Physical Activity
  • Sleep & Recovery
  • Hydration
  • Screen Time
  • Mental Wellness

The application calculates a transparent Healtify Score from 0–100 using a deterministic scoring system. The score is calculated by the backend rather than being guessed by AI.
One of my favorite features is Habit Balance. Instead of simply showing "bad habits," it visualizes the relationship between positive lifestyle behaviors and risk factors.
For example, if someone is struggling with smoking but has simultaneously started walking more, exercising, sleeping better, and drinking more water, Healtify makes that progress visible.
The goal is:
Don't focus only on what you're doing wrong. See what you're doing right, understand what needs attention, and gradually move your lifestyle in a better direction.

Healtify also provides AI-generated lifestyle reflections that interpret the user's trends and suggest small, practical actions. The AI is an interpretation layer, not a medical diagnostic system.

Demo

Live Demo:
[https://healtify-fcik.onrender.com/]
Video Demo:
[https://youtu.be/MJy8uAH1tzk]
The demo walks through:

  1. Recording daily lifestyle habits
  2. Real-time Healtify Score calculation
  3. Lifestyle category trends
  4. Habit Balance visualization
  5. Positive habits vs. risk factors
  6. AI-generated wellness reflections
  7. Lifestyle goals and areas needing attention

Code

GitHub Repository:
[https://github.com/Mritunjaii/Healtify.git]
Tech Stack
Frontend

  • React Backend
  • Node.js
  • Express.js Database
  • MongoDB AI
  • Llama 3.2 via Ollama — primary/local AI
  • Gemini API — cloud fallback Architecture: React ↓ Node.js + Express ↓ MongoDB ↓ AI Service Layer ↓ Llama 3.2 via Ollama ↓ Gemini Cloud Fallback

The AI service is separated from the rest of the application so that Healtify can use local AI whenever available and fall back to Gemini when the local model is unavailable.

How I Built It

One of the main design decisions in Healtify was to make AI an interpretation layer, rather than allowing AI to control the application's core logic.
The Healtify Score is calculated deterministically by the Node.js/Express backend.
Each lifestyle category is normalized to a 0–100 score, and the overall score is calculated from those category scores.
The AI receives a structured summary of the user's lifestyle data and trends.
For example:
{
"steps": 10400,
"workoutMinutes": 45,
"sleepHours": 8.1,
"waterLiters": 2.3,
"smokingCount": 2,
"outsideFoodCount": 1
}

This information is passed to the AI service.
Local AI First
Healtify primarily uses Llama 3.2 through Ollama.
This allows the application to run the AI interpretation locally without sending the user's lifestyle information to a cloud AI provider.
The local model generates things such as:

  • Daily reflections
  • Weekly summaries
  • Score explanations
  • Practical micro-actions
  • Achievable lifestyle goals For example: "Your activity and sleep have been strong this week. Your biggest opportunity is reducing smoking while maintaining your current exercise routine."

Cloud Fallback
If the local Ollama service or model is unavailable, Healtify can use the Gemini API as a fallback.
The flow is:
User requests AI Insight
↓
Node.js AI Service
↓
Is Ollama available?
/ \
YES NO
↓ ↓
Llama 3.2 Gemini API
\ /
↓ ↓
AI Insight
↓
React

This gives the application the benefits of local AI when possible, while still providing a reliable cloud fallback.

Why Does Open Innovation Matter?

Open innovation is especially important for Healtify because the application deals with personal lifestyle data.
Using a local open-weight model through Ollama means Healtify can process AI insights locally without requiring every piece of lifestyle information to be sent to a cloud AI provider.
This gives the project:

  • Greater control over data processing
  • Local AI inference
  • Reduced dependency on a single cloud provider
  • The ability to experiment with different models
  • A path toward more privacy-focused deployments
  • The ability to run the AI layer without a constant internet connection The project also demonstrates that an AI-powered application does not necessarily need to send every request to a proprietary cloud model. Llama 3.2 via Ollama handles the primary AI workload locally, while Gemini provides a fallback when local inference isn't available. More importantly, Healtify doesn't use AI for everything. The application itself controls:
  • Habit tracking
  • Data storage
  • Score calculation
  • Category scoring
  • Habit Balance
  • Goals
  • Historical trends The AI simply helps the user understand the patterns in their own data.

Prize Categories

  • Render: Deployed and hosted as a live full-stack Web Service on Render with automated builds and environment variable management.
  • Gemma:Open-weight AI storytelling powered by Llama 3.2 via Ollama (with gemini cloud fallback).
  • MongoDB:as a database

Top comments (1)

Collapse
 
ayusharora301 profile image
Ayush Arora •

good work,would help me in keeping my record of how much i am smoking and drinking