A library and webapp for storing, tracking, and manipulating personal health information
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
app
data
etc
mockups
scripts
src
tests
www
.gitignore
.travis-setup.sh
.travis.yml
LICENSE
Makefile
Setup.hs
default.nix
health.cabal
health.nix
readme.md
shell.nix
stack.yaml

readme.md

Health Tracking

This application is for tracking daily health items. This includes basic vitals and workouts.

The project has been a labor of love for many years and has allowed me to keep track of information. However it did not become fully useful until the advent of a decent user interface in the last few weeks. At this point, it should be possible for me to start rapidly adding additional kinds of health information.

Nix installation

For now, follow the manual installation instructions. I want to make a seemless nix installation, but that will take some time. I would appreciate help.

Ubuntu installation

Manual Installation

Installation is a multi-step process, and it requires you to make decisions about file paths at multiple locations in the process. The paths here are most appropriate for an Ubuntu installation. While I am trying to make that better, it will take some time.

  1. Install the necessary build tools

    • stack
    • npm
  2. Build the core and web applications

    • run make all from project/
  3. Copy the core application and the web application into place

    • cp bundle/health-server /dist/health/bin/health-server
    • cp bundle/orizentic /dist/health/bin/orizentic
    • cp -r www/ /dist/health/www
  4. Write the configuration file for the core app.

    • Example:

      port: 6907
      base-url: http://localhost:6907/
      app-root: /dist/health/www
      db-path: /home/savanni/.local/share/health/
      secret: I need a secret
      auth-db-path: /home/savanni/.local/share/health/authdb.json
      
    • port: the port to listen on

    • base-url: the actual URL for the application

    • app-root: the absolute filesystem path to find index.html, index.js, and static/ (if used)

    • db-path: the absolute filesystem path to the health databases. This should be a directory, and all timeseries databases will be put there.

    • secret: a (preferably random and quite long) key to be used for hashing security tokens

    • auth-db-path: the absolute filesystem path to the authentication database

  5. Create the health.service file and put it into ~/.config/systemd/user/health.service

    • Example:

      [Unit] Description=Health database service

      [Service] ExecStart=/dist/health/bin/health-server --config ${HOME}/.local/share/health/health.yml

      [Install] WantedBy=default.target

  6. Create the capability database

    • orizentic --db ${HOME}/.local/share/health/authdb.json create --secret "I need a secret" --issuer "Root" --resource "health" --name "Savanni" --perms "read,write"
    • note: you choose the secret (which must match the secret in the configuration file), the issuer, and the name. Those are merely notes for you. Resource and perms are defined within the health app and are required.
  7. Start the application

    • systemctl --user start health
  8. Load the application and set your auth token