Getting started

This article will help you getting started with the development of apps for the Evam platform.

The Evam SDK is Node.js-based and therefore the associated distribution tool is NPM (Node Package Manager). Templates are also provided for fast UI development using the React library.

The Evam SDK corresponds to the package @evam-life/sdk and the React template is @evam-life/cra-template-app-template-react-ts.

The installation process of the Evam SDK builds on top of a standard Node.js setup.

Requirements

Make sure the following software is available on your system:

  • Node.js 16 or later with NPM and NPX

  • Linux-based OS, Windows 10 (including WSL) or MacOS

You will need an account on the Evam developer portal when it is time to deploy your application for production.

Warning

If you are using a Linux-based OS and you have several NodeJS versions installed, make sure the node executable in your $PATH and env has the correct version.

Option 1 - Start a project using the Evam SDK from a template

In this case, we will bootstrap a project using the create-react-app tool. This will allow us to have a starting point application that uses the Evam SDK including an UI that complies with the Evam design guidelines.

Using your preferred shell, run:

npx create-react-app <app_name> --template @evam-life/cra-template-app-template-react-ts

You may replace <app_name> with the name of your application.

The command will take a few seconds to complete. It will create a directory with the same name as your app name. This directory contains a standard NodeJS code repository whose source set is a starting point for your Evam application.

Note

You may get a warning during the app creation about security vulnerabilities. It is good to run npm audit in the newly created repository to ensure that those are not simply false positives.

False positives exist and can be dismissed, see this open issue.

The Evam SDK should be already part of the dependencies in package.json:

{
    // ...
    "@evam-life/sdk": "~2.3.0"   // Note: version will evolve with new releases of the SDK
    // ...
}

You may finally open this directory using your preferred IDE such as Visual Studio Code or Jetbrains Webstorm.

Option 2 - Add the Evam SDK to your existing application

If you already have an application and you would like to add the Evam SDK to it, you may simply add its dependency to your package.json.

{
    // ...
    "@evam-life/sdk": "~2.3.0"   // Note: version will evolve with new releases of the SDK
    // ...
}

Then run npm i to install the depdendency.

Troubleshooting

Running create-react-app creates a repository without the Evam SDK

There is an open issue with create-react-app that can cause an old version of react-scripts to be installed due to an outdated version of npm/npx being installed.

The solution is to ensure NodeJS 14 or later is installed on your computer. See the NodeJS Downloads page.