window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-KZDGH5W145'); (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer','GTM-MVXDB9R'); _linkedin_partner_id = "1627170"; window._linkedin_data_partner_ids = window._linkedin_data_partner_ids || []; window._linkedin_data_partner_ids.push(_linkedin_partner_id); (function(l) { if (!l){window.lintrk = function(a,b){window.lintrk.q.push([a,b])}; window.lintrk.q=[]} var s = document.getElementsByTagName("script")[0]; var b = document.createElement("script"); b.type = "text/javascript";b.async = true; b.src = "https://snap.licdn.com/li.lms-analytics/insight.min.js"; s.parentNode.insertBefore(b, s);})(window.lintrk); (function(ss,ex){ window.ldfdr=window.ldfdr||function(){(ldfdr._q=ldfdr._q||[]).push([].slice.call(arguments));}; (function(d,s){ fs=d.getElementsByTagName(s)[0]; function ce(src){ var cs=d.createElement(s); cs.src=src; cs.async=1; fs.parentNode.insertBefore(cs,fs); }; ce('https://sc.lfeeder.com/lftracker_v1_'+ss+(ex?'_'+ex:'')+'.js'); })(document,'script'); })('YEgkB8l6xJw4ep3Z'); adroll_adv_id = "5GHDQ4PASVCYVFT7GDD3WI"; adroll_pix_id = "5OF27LOKUNDHJMKWP7JTYS"; adroll_version = "2.0"; (function(w, d, e, o, a) { w.__adroll_loaded = true; w.adroll = w.adroll || []; w.adroll.f = [ 'setProperties', 'identify', 'track' ]; var roundtripUrl = "https://s.adroll.com/j/" + adroll_adv_id + "/roundtrip.js"; for (a = 0; a < w.adroll.f.length; a++) { w.adroll[w.adroll.f[a]] = w.adroll[w.adroll.f[a]] || (function(n) { return function() { w.adroll.push([ n, arguments ]) } })(w.adroll.f[a]) } e = d.createElement('script'); o = d.getElementsByTagName('script')[0]; e.async = 1; e.src = roundtripUrl; o.parentNode.insertBefore(e, o); })(window, document); adroll.track("pageView");

Enlyt Local Development Guide

MACHINE REQUIREMENT NOTE: Since our platform involves mobile development, specifically iOS development, an Apple Macintosh computer is required. Both Apple Silicon and Intel-based Macs are supported.

Software Dependencies

1 Homebrew (Dependency Package Manager)

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Bitrise
brew install bitrise
Cocoapods
brew install cocoapods
Node Version Manager (NVM)
brew install ndenv
Install Node.js 16.xx.xx (example below)
nvm install 16.15.1
Globally Install Enlyt Health npm package
npm install -g @enlythealth/enlyt lerna@6.6.2 typescript yarn
Ruby Version Manager
brew install rbenv
Install Ruby 2.7.3
rbenv install 2.7.3
Bundler (Install after Ruby)
gem install bundler
Python
brew install python
Install AWS CLI
python3 -m pip install awscli
Watchman
brew install watchman

2 SDKMan

curl -s "https://get.sdkman.io" | bash
Install Java
sdk install java

3 Visual Studio Code (Recommended IDE)

4 Android Studio

Validate that your JDK configuration within Android Studio is pointed to the correct installation path.

link iconhttps://developer.android.com/studio

5 Xcode

Command Line Tools (Usually prompted automatically after Xcode is installed and you open a Terminal window for the first time)

link iconhttps://apps.apple.com/us/app/xcode/id497799835?mt=12

6 PATH Variables

To determine your shell type, type “echo $0” in your terminal. Subsequently, for example, use “nano ~/.zshrc” to edit your profile with PATH variables. Make sure to use the corresponding shell type profile.

NOTE: Make sure to update your PATH variables (usually under ~/.bash_profile, ~/.zshrc, ~/.profile, or ~/.bashrc) in relation to any of the installations above. Based on the required dependencies, copy and paste the below entries:

#NPM Access Token
export EH_NPM_TOKEN={use your own npm token or the npm token found in Mission Control Configuration}
# Setting PATH for Android Studio
export ANDROID_HOME="$HOME/Library/Android/sdk"
export PATH="$PATH:$ANDROID_HOME/emulator"
export PATH="$PATH:$ANDROID_HOME/tools"
export PATH="$PATH:$ANDROID_HOME/tools/bin"
export PATH="$PATH:$ANDROID_HOME/platform-tools"
# NVM
export NVM_DIR="$HOME/.nvm" 
[ -s "/opt/homebrew/opt/nvm/nvm.sh" ]
&& . "/opt/homebrew/opt/nvm/nvm.sh"
[ -s "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm" ]
&& . "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm" # Setting Ruby rbenv export PATH="$HOME/.rbenv/bin:$PATH" export PATH="$HOME/.rbenv/shims:$PATH" eval "$(rbenv init - zsh)" # Setting PATH for JAVA through SDKMan export JAVA_HOME="$HOME/.sdkman/candidates/java/current" # Setting PATH for SDKMan - Must be at the end of the file for SDKMan to work properly export SDKMAN_DIR="$HOME/.sdkman" [[ -s "$SDKMAN_DIR/bin/sdkman-init.sh" ]] && source "$SDKMAN_DIR/bin/sdkman-init.sh"

Retrieving the code:

1 Copy Tenant Environment Variables from your Tenant

enlyt env:add

NOTE: The environment you want to work with is the first thing that has to be configured before using the Enlyt CLI tool. The Enlyt Cloud platform provides a special configuration URL for each tenant that is used to configure the Enlyt CLI with a single command. The URL is structured as follows:

https://api.{environment}.{tenantname}.app.enlythealth.com/cli

For more information, see “Getting the Code” in your tenant LMS documentation.

? Enter Enlyt CLI Configuration URL: https://api.{environment}.{tenantname}.app.enlythealth.com/cli
? Enter Enlyt CLI Configuration Passphrase: {passphrase found on Mission Control}

2 Log into your Tenant

enlyt login
Login
? Enter your username: {email}
? Enter your password: **************
You're logged in!

3 Get Access to the Git Repositories on Enlyt Cloud

enlyt repo:get-access
&check; Create new user
&check; Set permissions
&check; Generate SSH key
&check; Register SSH key
&check; Upload SSH key
&check; Configure locally
&check; Test access
&check; Done.

4 Clone the Source Code to Your Machine

NOTE: Create or select a folder to develop your Enlyt app as the below command creates a folder name “monorepo” upon execution.

enlyt repo:clone

or if you prefer to use git commands:

git clone ssh://git.{tenantname}.app.enlythealth.com/v1/repos/monorepo
git checkout dev

5 Install the Dependencies

Note: Run the below command inside the “monorepo” folder.

enlyt bootstrap

Mobile Signing for Existing Tenants

1 Synchronize iOS signing assets from Enlyt Cloud

NOTE: Synchronize the iOS signing assets from the Enlyt Health Cloud applecerts repo to the local machine of the user that invoked the command.

enlyt signing:sync-ios

2 Synchronize Android signing assets from Enlyt Cloud

NOTE: Synchronize the Android signing assets from Enlyt Health Cloud Storage to the local machine of the user that invoked the command.

enlyt signing:sync-android

Mobile Signing for New Tenants

1 Generate iOS Signing Assets

SKIP THIS STEP if you’ve been granted access to an EXISTING DEMO TENANT

NOTE: This command generates iOS signing assets as well as creates the app(s) in the Apple Developer Portal and AppStore Connect. This step requires your own Apple Developer Account, otherwise, for Demo Tenants, your iOS app already exists in the Enlyt Apple Developer Portal.

enlyt signing:ios

2 Generate Android Signing Assets

NOTE: This command generates Android signing assets – keystore.jks file. When invoked from within the core-mobile directory, it will save the generated keystore.jks file inside the ./android/secure folder, which is out of version control and set up as the default location for the Android Keystore file.

enlyt signing:android

Mobile Builds

1 Launch Xcode to build iOS

Run the below command inside the “/packages/core-mobile/ios/” folder.

NOTE: Use the below command to launch Xcode with your iOS project:

open -a xcode enlythealth.xcworkspace/

Enlyt Xcode Settings

For local development, choose “enlythealth.beta

2 Launch Android Studio to run Android

NOTE: Make sure to run this command inside the /monorepo/packages/core-mobile folder. First, launch Android Studio, then initiate the build.

open -a /Applications/Android\ Studio.app
npx react-native run-android --appId com.enlythealth.android.debug --variant debug