Skip to content

Commit

Permalink
Notifications, no-code app builder, and dev docs
Browse files Browse the repository at this point in the history
  • Loading branch information
mikepsinn committed Nov 14, 2023
1 parent 3200695 commit 4390e17
Show file tree
Hide file tree
Showing 49 changed files with 306 additions and 486 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,4 @@ Thumbs.db
.smart-connections
/.obsidian/
/litellm_uuid.txt
.aider*
234 changes: 91 additions & 143 deletions README.md

Large diffs are not rendered by default.

Binary file removed assets/charts/chemicals-in-our-diet.png
Binary file not shown.
Binary file not shown.
Binary file removed assets/plugins/plugin-marketplace.png
Binary file not shown.
110 changes: 110 additions & 0 deletions docs/api-reference/api-reference.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
# Using the API

The API facilitates storage and retrieval of any type of human generated data.

For more info about the types of data you can store and get from the API, try out our
[Interactive API Explorer](https://curedao.readme.io) with the access token `demo`.

# Updating the Documentation

The API is documented in this [OpenAPI Specification](libs/dfda-api-spec/src/dfda-api-spec.openapi.yml).

It can be edited by:

1. downloading Stoplight Studio [here](https://stoplight.io/studio/)
2. opening this repo folder as a local project

## API Usage

Interactive API documentation is available at https://curedao.readme.io. However, we have some examples below.

### Get Commonly Used Variables, Units, and Variable Categories

You can include the scripts in `data` folder following scripts in your HTML to get the commonly used variables, units, and variable categories.

```javascript
<script src="https://static.quantimo.do/data/variables.js"></script>
<script src="https://static.quantimo.do/data/units.js"></script>
<script src="https://static.quantimo.do/data/variableCategories.js"></script>
```

Then they'll be available in:

- Variable Categories: `qm.staticData.variableCategories`
- Units: `qm.staticData.units`
- Variables: `qm.staticData.commonVariables`

### Less Common Variables

There are over 87,000 additional variables accessible via the following API endpoint:

https://curedao.readme.io/reference/getvariables

```javascript
const options = {
method: 'GET',
headers: {Accept: 'application/json', Authorization: 'Bearer demo'}
};

fetch('https://app.quantimo.do/api/v3/variables?limit=100', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
```

## Getting Started

### Authentication

To use the CureDAO API, you first need to get an access token as described below. Once you have the token, include it in any of the [API requests documented here](https://curedao.org/api-docs) using the `Authorization` header in the format `Bearer YOUR_TOKEN_HERE`.

#### Option 1: Use Demo Data

If you don't have your own data yet, you can use the access token `demo` in the `Authorization` header in the format `Bearer demo`.

#### Option 2: Access Your Own Data

- Go to the [Settings](https://app.curedao.org/#/app/settings)
- Click copy your Personal Access Token
- Include it in your [API requests](https://curedao.org/api-docs) using the `Authorization` header in the format `Bearer YOUR_TOKEN_HERE`

#### Option 3: Use it in Your Own App

- Go to the [App Builder](https://builder.curedao.org/#/app/configuration)
- Click `New App` and fill out the form
- Follow the OAuth integration instructions in the `Integration Guide` link

### Common API Usage Examples

Instead of using this SDK, you can also use the requests in our [interactive API documentation](https://curedao.org/api-docs). Just click the dots to the right of the "LANGUAGE" section and select `Node` or `Javascript`. Then you can just copy the request for usage in your project.

Here are some common usages:

- [Get Units](https://curedao.readme.io/reference/getunits)
- [Get Variables](https://curedao.readme.io/reference/getvariables)
- [Get Variable Categories](https://curedao.readme.io/reference/getvariablecategories)
- [Get a Specific Variable](https://curedao.readme.io/reference/getvariables)
- [Save a Measurement](https://curedao.readme.io/reference/postmeasurements)
- [Get Measurements](https://curedao.readme.io/reference/getmeasurements)

### [Get Variables](https://curedao.readme.io/reference/getvariables)

![How to Get Variables](https://user-images.githubusercontent.com/2808553/187514806-a3261932-106a-49b9-b760-2b4b52b384c7.png)

### [Get a Specific Variable](https://curedao.readme.io/reference/getvariables)

![How to Get a Variable](https://user-images.githubusercontent.com/2808553/187515384-cb1a721b-4534-4e5c-9c94-544288b49780.png)

### [Save a Measurement](https://curedao.readme.io/reference/postmeasurements)

![Save a Measurement](https://user-images.githubusercontent.com/2808553/187521885-e9e1dee3-c07c-4073-a503-315ce345fc52.png)

### [Get Measurements](https://curedao.readme.io/reference/getmeasurements)

![Get Measurements](https://user-images.githubusercontent.com/2808553/187522064-9f176e08-53f4-47cb-8084-8feb8cdb3428.png)

# Contribution Guide

- [Add an API](../contributing/add-an-api.md)
- [Repo Structure](../contributing/repo-structure.md)
- [Editing API Specifications](../contributing/editing-api-specs.md)
195 changes: 0 additions & 195 deletions docs/api-reference/openapi.json

This file was deleted.

10 changes: 10 additions & 0 deletions docs/benefits.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Example Benefits of Personalized Medicine

- Automatically identify food sensitivities
- Determine personalized optimal daily values for dietary intake.
- Quantify the effectiveness of drugs, supplements, and treatments.
- Calculate optimal doses of nutrients, ingredients, and other wellness factors.
- Determine optimal environmental parameters such as humidity, temperature, and light exposure.
- Determine the optimal amount of physical activity and the best forms of physical activity, intensity, and duration.
- Determine the optimal amount of sleep and the optimal time to go to sleep, and the optimal conditions for sleep.
- Determine the amount of time it takes to build a tolerance to a drug and the length of the withdrawal period from the drug.
File renamed without changes
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

![](data-collection.PNG)

It all begins with self-tracking and initial data collection.\
This can be done using wearable sensors, third-party applications, and client applications.
Data collection can be done using wearable sensors, third-party applications, and client applications.

![Diagram showing data collection ranging from human and public data
sources ultimately ending up at the aggregation layer(30)](data-collection-flow-chart.png)
Expand Down
13 changes: 13 additions & 0 deletions docs/components/data-collection/notifications.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
## Notifications with Action Buttons

Web and mobile push notifications with action buttons allow you to easily record treatments and symptoms without opening the app.

These are available on Android, iOS, and desktop browsers.

![web notification action buttons](web-notification-action-buttons.png)

## Related Code

- [Service Worker to Display Notifications](../../../apps/dfda-1/public/app/public/firebase-messaging-sw.js)
- [Push Notification Data Model](/apps/dfda-1/app/Slim/Model/Notifications/PushNotificationData.php)
- [Notification Sender Job](/apps/dfda-1/app/PhpUnitJobs/Reminders/PushNotificationsJob.php)
File renamed without changes
28 changes: 28 additions & 0 deletions docs/components/data-import/data-import.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# 🕸 Data Import

![import-data-connectors-mhealth-integrations.png](import-data-connectors-mhealth-integrations.png)

The Connector Framework imports and normalizes data on all quantifiable aspects of human existence (sleep, mood, medication, diet, exercise, etc.) from dozens of applications and devices including:

- Oura – Sleep Duration, Sleep Quality, Steps, Physical Activity
- Pollution - Air Quality, Noise Level, Particulate Matter
- Netatmo - Ambient Temperature, Humidity, Air Quality
- Rescuetime – Productivity and Time Tracking
- WhatPulse – Keystroke and Mouse Behaviour
- Fitbit – Sleep Duration, Sleep Quality, Steps, Physical Activity
- Withings – Blood Pressure, Weight, Environmental CO2 Levels, Ambient Temperature
- Weather – Local Humidity, Cloud Cover, Temperature
- Facebook – Social Interaction, Likes
- GitHub – Productivity and Code Commits
- MyFitnessPal – Food and Nutrient Intake
- MoodPanda – Basic Reported Mood
- MoodScope – Detailed Reported Mood
- Sleep as Android – Snoring, Deep Sleep, Reported Sleep Rating
- RunKeeper – Physical Activity
- MyNetDiary – Food and Nutrient Intake, Vital Signs


![integrations-screenshot.png](integrations-screenshot.png)

## Related Code
- [Connectors](../..
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 22 additions & 0 deletions docs/components/no-code-app-builder/no-code-app-builder.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# No-Code Health App Builder

## Overview

The No-Code Health Data App Builder is an innovative platform designed to simplify and streamline the process of creating health data collection, aggregation, and analysis applications. This powerful tool allows users, regardless of their technical background, to build custom apps tailored to their health data management needs.

## Features

Based on the provided screenshots, the No-Code Health Data App Builder includes features such as:

1. **Easy-to-Use Interface**: A user-friendly interface that allows for easy navigation and app creation without any coding skills.

2. **Customizable Data Links**: Users can link various health data sources for aggregation and analysis. This might include fitness trackers, medical records, dietary information, and more.

3. **Flexible Design Options**: The builder offers a range of customization options to create a personalized app experience.

4. **Data Visualization Tools**: Integrated tools to help visualize and analyze health data effectively.

5. **Automated Data Collection and Aggregation**: Automated processes for collecting and aggregating data from multiple sources.

6. **Privacy and Security**: Ensuring user data is kept secure and private.

Loading

0 comments on commit 4390e17

Please sign in to comment.