Skip to content

Commit

Permalink
update possible data types
Browse files Browse the repository at this point in the history
  • Loading branch information
CoolCoderSJ committed Jul 11, 2024
1 parent d35a954 commit d24a713
Showing 1 changed file with 20 additions and 3 deletions.
23 changes: 20 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,39 @@ The platform consists of two parts:

## How it Works
- The mobile application pings the server every 2 hours to send data. The following data types are supported-
- Active Calories Burned (`activeCaloriesBurned`)
- Basal Body Temperature (`basalBodyTemperature`)
- Basal Metabolic Rate (`basalMetabolicRate`)
- Blood Glucose (`bloodGlucose`)
- Blood Pressure (`bloodPressure`)
- Body Fat (`bodyFat`)
- Body Temperature (`bodyTemperature`)
- Bone Mass (`boneMass`)
- Cervical Mucus (`cervicalMucus`)
- Distance (`distance`)
- Exercise (`exerciseSession`)
- Elevation Gained (`elevationGained`)
- Floors Climbed (`floorsClimbed`)
- Heart Rate (`heartRate`)
- Height (`height`)
- Hydration (`hydration`)
- Lean Body Mass (`leanBodyMass`)
- Menstruation Flow (`menstruationFlow`)
- Menstruation Period (`menstruationPeriod`)
- Nutrition (`nutrition`)
- Ovulation Test (`ovulationTest`)
- Oxygen Saturation (`oxygenSaturation`)
- Power (`power`)
- Respiratory Rate (`respiratoryRate`)
- Resting Heart Rate (`restingHeartRate`)
- Sleep (`sleepSession`)
- Speed (`speed`)
- Steps (`steps`)
- StepsCadence (`stepsCadence`)
- Total Calories Burned (`totalCaloriesBurned`)
- VO2 Max (`vo2Max`)
- Weight (`weight`)
- Wheelchair Pushes (`wheelchairPushes`)

Support for more types is planned for the future.

Expand All @@ -38,7 +54,7 @@ The platform is currently a **one way sync**. Any changes made to health connect
- You can install the mobile application through the APK file. You can find the latest APK file in the releases section of this repository, or by downloading the `app-release.apk` file from the root of this repository.
- The minimum requirement for the APK file is Android Oreo (8.0)
- Once you install the Android APK file, signup by entering a username and password
- Once you see a screen showing your user id, you have successfully signed up. Your data will sync in 2 hours. You can also force it to start now by going to Settings > Apps > HCGateway > Force Stop, then re-opening the app. This can be done for any time you want to force a sync.
- Once you see a screen showing your user id, you have successfully signed up. Your data will sync in 2 hours. This is customizable. You also have the option to force a sync any time through the application.

## Database
### Users Structure
Expand Down Expand Up @@ -129,14 +145,15 @@ The mobile application is a simple Android application that pings the server eve

## Self Hosting
You can self host the server and database. To do this, follow the steps below:
- You need Python 3 and NodeJS 16+ installed on your machine
- You need Python 3 and NodeJS 18+ installed on your machine
- Install appwrite and make sure your instance is accessible from the machine running the HCGateway server. You can find more at https://appwrite.io/
- Clone this repository
- `cd` into the api/ folder
- run `pip install -r requirements.txt`
- rename `.env.example` to `.env` and fill in the values
- run `python3 main.py` to start the server
- in another window/tab, `cd` into the app/ folder
- Change lines 104, 112, and 154 of `app/App.js` to point to your HCGateway server
- run `npm install`
- run `npx patch-package` to apply a patch to the foreground service library
- run `npm run android` to start the application, or follow the instructions at https://medium.com/geekculture/react-native-generate-apk-debug-and-release-apk-4e9981a2ea51 to build an APK file.
- It is also possible to now use eas build to build the APK file. You can find more at https://docs.expo.dev/build/eas-build/ **NOTE: This must be a local build, since you need to run patch-package before building the APK file.**

0 comments on commit d24a713

Please sign in to comment.