Coder Social home page Coder Social logo

carecarma's Introduction

CareCarma Web Client Setup in Windows System with XAMPP

Steps:

    1. Download CareCarma-live.zip from \Wufei in Google drive
    1. Install XAMPP and start Apache Server and MySQL
    1. Extract CareCarma-live.zip in C:\xampp\htdocs\ directory
    1. localhost/carecarma will show homepage of CareCarma website
    1. Install composer & set it as environment variable (https://getcomposer.org/doc/00-intro.md)
    1. configure composer with following commands in C:\xampp\htdocs\CareCarma\carecarma directory via cmd - (https://www.humhub.org/docs/guide-admin-installation.html) :
      composer global require "fxp/composer-asset-plugin:~1.1.1"
      composer update
    • (option)access tokens will be generated in github account:
      • a. Login your github account
      • b. Go to setting page (https://github.com/settings/profile)
      • c. Click "Personal access tokens" in "Develop settings" session
      • d. Click "Generate new token" and input your password of this github account
      • e. Give a name in "Token description" and click "Generate token"
      • f. Copy the token and paste it
    1. Enable "INTL_ICU_VERSION'
    1. Change the file upload size
    • Open C:\xampp\php\php.ini to edit.
    • Change "post_max_size" equal to "10M"
    • Change "upload_max_filesize" equal to "10M"
    1. Start Apache Server
    1. Delete codes below in \carecarma\themes\CareCarma-4cacc6\views\layouts\head.php (line 9)
      $userId = Yii::$app->user->id;
      $user = \humhub\modules\user\models\User::findOne(['id' => $userId]);
    1. localhost/carecarma -> Login will show set up page (including Database Configuration) for CareCarma
    • Hostname : 127.0.0.1
    • Username : root
    • Password :
    • DatabaseName: carecarma (create a new database in localhost/phpmyadmin)
    1. Add codes below in \carecarma\themes\CareCarma-4cacc6\views\layouts\head.php (line 9)
      $userId = Yii::$app->user->id;
      $user = \humhub\modules\user\models\User::findOne(['id' => $userId]);
    1. (Option) Configure Mailing Server
    • Go into Administration => Mailing => Server Settings (/carecarma/index.php?r=admin%2Fsetting%2Fmailing-server)
    • Add information and Save
    • If have "OpenSSL Error: SSL3_GET_SERVER_CERTIFICATE: certificate verify failed" when system send e-mails, add follow code in carecarma/protected/vendor/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php line 266 inside function "_establishSocketConnection()":
      $options['ssl']['verify_peer'] = FALSE;
      $options['ssl']['verify_peer_name'] = FALSE;

If you have some errors, please search in https://github.com/humhub/humhub/issues first.

CareCarma Web Client Setup in AWS Elastic Beanstalk (PHP platform)

Steps:

    1. Upload CareCarma-live.zip to Running Version and go into CareCarma folder (ex. /var/app/current/CareCarma)
    1. Change the file upload size
    • Open /etc/php.ini to edit.
    • Change "post_max_size" equal to "10M"
    • Change "upload_max_filesize" equal to "10M"
    • Restart App Server in AWS Elastic Beanstalk dashboard
    1. Configure composer in root with following commands in CareCarma (/var/app/current/CareCarma) directory via cmd - (https://www.humhub.org/docs/guide-admin-installation.html)
      composer.phar global require "fxp/composer-asset-plugin:~1.1.1"
      composer.phar update
    • (option)access tokens will be generated in github account:
      • a. Login your github account
      • b. Go to setting page (https://github.com/settings/profile)
      • c. Click "Personal access tokens" in "Develop settings" session
      • d. Click "Generate new token" and input your password of this github account
      • e. Give a name in "Token description" and click "Generate token"
      • f. Copy the token and paste it
    1. Delete codes below in \carecarma\themes\CareCarma-4cacc6\views\layouts\head.php (line 9)
      $userId = Yii::$app->user->id;
      $user = \humhub\modules\user\models\User::findOne(['id' => $userId]);
    1. Make sure the required PHP extensions (http://docs.humhub.org/admin-requirements.html)
    1. Use browser to open the website (ex. http://carecarmas-env.us-east-1.elasticbeanstalk.com)/carecarma => Login will show set up page (including Database Configuration) for CareCarma
    • Hostname : (ex. carecarmar.c81l6jttxgta.us-east-1.rds.amazonaws.com:3306)
    • Username : (ex. root)
    • Password : (ex. 2439Lona)
    • DatabaseName: (ex. carecarma)
    1. Add codes below in \carecarma\themes\CareCarma-4cacc6\views\layouts\head.php (line 9)
      $userId = Yii::$app->user->id;
      $user = \humhub\modules\user\models\User::findOne(['id' => $userId]);
    1. Add cron jobs in root with following command
      crontab -e
    • Add "30 * * * * php /var/app/current/CareCarma/carecarma/protected/yii cron/hourly >/dev/null 2>&1 00 22 * * * php /var/app/current/CareCarma/carecarma/protected/yii cron/daily >/dev/null 2>&1" Please make sure the folder is the same with the folder displayed in /carecarma/index.php?r=admin%2Fsetting%2Fcronjob
    • Save the crontab file and exit
    • Start/Restart cron jobs :
      service crond restart
    1. (option) If you want to keep users' uploaded images and files in the old version, please copy the whole files in /carecarma/uploads
    • Folder "file" save the files and images, which users uploaded in Modules
    • Folder "profile_image" save the users' profile image
    1. (option) Install, configure and enable modules on /carecarma/index.php?r=admin%2Fmodule%2Flist
      Don't update Tasks, Mail and Custom Pages
      Use follow steps to debug module "Files":
    • Add code in /modules/cfiles/controllers/MoveController.php
      $rootFolder = $this->getRootFolder(); <line 46>
      'rootFolder' => $rootFolder, <line 52>
      'rootFolder' => $rootFolder, <line 87>
    • In /modules/cfiles/views/move/modal_move.php <line 45>
      Replace id = "0" to "$rootFolder->id"
    1. (option) Calculate steps and heart rate data:
    • Copy following files from Google drive /Wufei/python:
      • heartrate.py
      • mainHeartScheduler.py
      • mainSensorScheduler.py
      • sensor.py
    • Paste it in the web server (ex. /home/ec2-user)
    • Check the hardware id of the devices you want to keep tracking
    • Replace the array to your hardware_id array in heartrate.py (line 816) and sensor.py (line 991)
    • Add rows with your hardware_id in table "LastTimeReadHeart" and table "LastTimeReadSteps"
      Make sure "datetime" is yesterday midnight (23:59:59) in the device's timezone, and "time" is 13 digit timestamp of "datetime"
      You can check in https://www.epochconverter.com/
    • Use "screen" to run
      • Add one screen and run heart rate part:
        screen -r
        python mainHeartScheduler.py
        ctrl+a+d
      • Add other screen to run steps part:
        screen -r
        python mainSensorScheduler.py
        ctrl+a+d
      • The code will run at midnight in EST everyday.

If you have some errors, please search in https://github.com/humhub/humhub/issues first.

carecarma's People

Contributors

feitracylai avatar simonxu14 avatar pratikick avatar mrunalpatekarnyu avatar

Watchers

James Cloos avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.