Skip to content

GeriLife/wellbeing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

GeriLife wellbeing

All Contributors Welbeing activity log and visualization tool.

Features

Activities

Record activities

Add activity form

Emotions

Emotions screenshot

Record emotion for individual

Add emotion screenshot

Homes

Single home screenshot

Home residents (with activity level)

Home residents with activity level

Home activity counts by resident and type (with filtering)

Home activity counts by resident and type screenshot

Home activity counts by resident and type with filtering

Home activity trends

Home residents and activity trends

Home Groups

Multiple home resident activity level

Single group of homes (with percentage of residents by activity level)

Single home group with percentage of residents by activity level

Residents

Resident profile

Single resident page

Resident activity trend

Activity graph with trend line

Resident activity calendar heatmap

Activity heatmap

Resident activity type counts

Resident activity type counts

Resident activity facilitator role counts

Resident activity facilitator role counts

Resident activity table

Resident activity table

System settings

Manage settings

User Stories

As a volunteer,
I want to know what activities residents enjoy
so that I can spend quality time with the residents
As a family member
I want to know that my relative is active
so that I know they are living an enjoyable life

Developer instructions

Dev mode setup

  1. Install meteor. Follow instructions on https://www.meteor.com/install.
  2. Clone the directory
  3. The meteor app resides inside the wellbeing/app folder. Install npm modules here.
  4. To start the app, run npm run dev.

Mock data

For running app in dev mode, there is a process to generate dummy data and user accounts.

To create the dummy data open the meteor shell and run Meteor.call("createMockData"). This method call will generate data that can be used fr testing and development.

To be able to use the app, a user account is needed. This can be created in the following way:

  1. Open app/lib/accounts.js and in the configurations set forbidClientAccountCreation to false.
  2. Run the app
  3. Open the app in browser.
  4. On the login page, a user registration link will be now available. Register a user with the link. The first user registered this way, will always be an admin and the rest will be non-admin users.

Upgrade meteor version

  1. rm -rf node_modules package-lock

  2. npm i

  3. meteor update

  4. meteor update --all-packages

  5. ~/.meteor/packages/meteor-tool/1.8.1/mt-os.linux.x86_64/dev_bundle/mongodb/bin/mongod --dbpath .meteor/local/db --repair

if necessary run meteor reset. Warning: This will clear all collections and user accounts. 6. npm run dev

Running tests

Command to run

npm run test

This command will start a server on port 8000. It is better to run npm i if the tests are run for the first time. Server code must be tested on server using Meteor.isServer flag. Code running in the if constructs of Meteor.isServer will show results on the console. For the others, Meteor.isClient must be used and they can be evaluated in the browser on http://localhost:8000.

Coverage

Coverage can be found at http://localhost:8000/coverage on the browser. This will show the coverage for server files.

Please note that the server for tests is started in watch mode so that client tests can be evaluated on the browser. These tests take 2 runs to get the correct results due to some issues with the underlying babel nyc module. Here's what can be done:

  1. start the server.
  2. Once the process logs this messages listening on localhost:8000, change any file and save it.
  3. This triggers the watch and tests are rerun correctly.

Steps to start the demo app

  1. Make sh file executable. Run sudo chmod +x start-demo.sh
  2. Make current user owner of meteor file by running sudo chown -Rh shailee .meteor/local
  3. The start-demo.sh file starts the app in demo mode (Make sure to not start it on the same server as the production server or else the mongo database will be overwritten).
  4. To start the demo as a cron job run
  5. sudo crontab -e
  6. This will open a cronjob editor. On the last line of the editor add 0 0 * * * cd /path/to/sh-file && /bin/sh start-demo.sh >> cron.log 2>&1.
  7. Save and exit. This will restart and reset the app everyday at midnight.

Contributors

Thanks goes to these wonderful people (emoji key):

Shailee Mehta
Shailee Mehta

๐Ÿ’ป
PayalChoksey17
PayalChoksey17

๐Ÿ›

This project follows the all-contributors specification. Contributions of any kind welcome!