Skip to content

HealthDex is a health tracker app with real-time data logging, wellness goals, and an AI chatbot (OpenAI) that gives personalized health advice. Built collaboratively as a group CS project

License

Notifications You must be signed in to change notification settings

CSCoderV/HealthDex

 
 

Repository files navigation

HealthDex

Exceptions / Known Issues:

  • Heart rate is currently simulated and not read from an Apple Watch.

Login Credentials:
No login credentials needed; register for a new account.


Table of Contents

  1. Overview
  2. Project Structure
  3. Prerequisites
  4. Setup Instructions
  5. Running the Application
  6. License

Overview

HealthDex is a robust Personal Health Management System (PHMS) that enables users to:

  • Track vital signs: Heart rate, blood pressure, glucose, cholesterol, etc.
  • Receive alerts: Email and in-app notifications for abnormal readings.
  • Manage health data: Medications, diet logs, appointments, and custom notes.
  • Secure authentication: Firebase Authentication with biometric (fingerprint) login support.
  • Multi-language support: Powered by LibreTranslate for on-device translation.

Project Structure

HealthDex/
├── PHMS-Android/             # Android application code (Jetpack Compose)
├── PHMS-Backend/             # Ktor backend server code
├── Supporting/  
│   └── Language Translator/  # LibreTranslate integration scripts and docs
├── LICENSE.md                # License information
└── README.md                 # Project documentation (this file)

Prerequisites

Before you begin, make sure you have the following installed:

  • Git: Version control system
  • Java Development Kit (JDK) 11+: Verify by running:
    java -version
  • Android Studio: Official IDE for Android development
  • Docker (optional): For setting up LibreTranslate locally

Setup Instructions

1. Clone the Repository

git clone https://github.com/V-prajit/HealthDex
cd HealthDex

2. Firebase Setup

This project uses Firebase for authentication and backend services.

Android App Setup

  1. Go to the Firebase Console and create a new project.
  2. Add an Android app with package name com.example.phms.
  3. Download the generated google-services.json file.
  4. Place it in:
    HealthDex/PHMS-Android/app/google-services.json
    

Backend Service Account

  1. In Firebase Console > Project Settings > Service Accounts, generate a new private key.
  2. Download and rename it to serviceAccountKey.json.
  3. Place it in:
    HealthDex/PHMS-Backend/src/main/resources/serviceAccountKey.json
    

3. Backend Setup (PHMS-Backend)

Navigate to the backend directory:

cd HealthDex/PHMS-Backend

Environment Variables (.env)

Create a file named .env in the PHMS-Backend directory with:

GMAIL_EMAIL=your_gmail_address@gmail.com
GMAIL_APP_PASSWORD=your_16_digit_app_password

Generating GMAIL_APP_PASSWORD

  1. Go to Google Account Security.
  2. Enable 2-Step Verification.
  3. Under Signing in to Google, click App passwords.
  4. Select Mail as the app.
  5. Choose Other (Custom name) and enter PHMS Backend.
  6. Click Generate and copy the 16-character password (no spaces) into your .env.

Build and Run

# macOS/Linux
./gradlew run
# Windows
gradlew.bat run

The server starts on http://0.0.0.0:8085 by default.

4. Android Setup (PHMS-Android)

  1. Open Android Studio and select Open an existing project.
  2. Navigate to HealthDex/PHMS-Android and open it.

Configure API Keys (local.properties)

In the PHMS-Android root (alongside build.gradle.kts), create local.properties:

# API Keys
openai.api.key=YOUR_OPENAI_API_KEY
FDC_API_KEY=YOUR_FDC_API_KEY

# SDK location (auto-added by Android Studio)
sdk.dir=/path/to/android/sdk

Note: Features depending on OpenAI or FDC keys will not work without valid entries.

Build and Run

  • Sync Gradle.
  • Select an emulator or connected device.
  • Click Run 'app' (green ▶️) in the toolbar.

5. Language Translator (LibreTranslate) Setup

HealthDex includes multi-language support via LibreTranslate. Follow these steps to run it locally:

  1. Clone LibreTranslate:
    git clone https://github.com/LibreTranslate/LibreTranslate.git
    cd LibreTranslate
  2. Run via Docker (recommended):
    docker-compose up -d
  3. API Endpoint
    By default, LibreTranslate runs at http://localhost:5000.
    HealthDex will call this endpoint for translation services.

For more details, visit the LibreTranslate GitHub repo.

6. Emulator Setup for Biometrics

To test fingerprint login on an Android Virtual Device (AVD):

  1. Launch your AVD.
  2. In the emulator, go to Settings > Security > Fingerprint, and add a fingerprint.
  3. When the app prompts for a fingerprint, open Extended Controls (), select Fingerprint, and tap Touch sensor to simulate.

Running the Application

# Start the backend server
cd HealthDex/PHMS-Backend
./gradlew run

# In a new terminal, start LibreTranslate (if using locally)
cd HealthDex/Supporting/Language Translator/LibreTranslate
docker-compose up -d

# In Android Studio, open and run the Android app
  1. Register/log in via Firebase; biometric login and multi-language translation will now work.
  2. Begin tracking vital signs and managing your health data in your preferred language.

Team Members

  • Vikash Mall
  • Prajit Viswanadha
  • Ved Dharmatti
  • Daksh Khuttan

License

This project is licensed under the terms in LICENSE.md. Please review for details.

About

HealthDex is a health tracker app with real-time data logging, wellness goals, and an AI chatbot (OpenAI) that gives personalized health advice. Built collaboratively as a group CS project

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Kotlin 96.1%
  • Python 3.6%
  • Shell 0.3%