To operate the backend system, you must have one of the following:
- A 64-bit Mac OS (Intel or ARM)
- A 64-bit Linux machine (Ubuntu or Debian)
- Successfully installed and running backend system (refer to the backend system installation guide).
- Docker installed on your machine. If it’s not, please follow this guide to install Docker.
I. (Optional) Create Development Environment
This section is only required if you are planning to make changes to the source code.
Install NodeJS version 16.15.0 or higher from https://nodejs.org/en/download/.
Setup the Yarn package manager:
corepack enablein your terminal to activate Yarn.
Inside your project directory, run
yarnto install project dependencies.
yarn devto start the yarn development server.
II. Build a Production Environment
Clone the portal repository from GitHub by running
git clone https://github.com/S-HealthStack/web-portal.git
Navigate to the cloned repository.
API_URLis the base API URL to access endpoints and
PUBLIC_PATHis the path that will be used to host the app.
Build a Docker image with the desired variables provided as build arguments:
docker build . -t open-source-portal \ --build-arg API_URL="http://localhost:8080" \ --build-arg PUBLIC_PATH='/' \ --build-arg MOCK_API='/api'
Run the Docker image:
docker run -d -p 8081:80 open-source-portal
At this point, the resulting Docker image is running nginx on port
If you prefer to build static files instead of using Docker:
- Install NodeJS version 16.15.0 or higher.
corepack enableto activate yarn.
yarnto install dependencies.
yarn buildwith desired variables set using environment. For example,
API_URL=https://example.com yarn build.
The resulting static files will be located in the
/build folder and can be hosted using any web server.
III. Launch Web Portal and Create Account
Open your web browser (Chrome is recommended as of this writing) and navigate to your
PUBLIC_PATHURL, for example:
In the Sign in dialog box that appears, click Create account.
Follow the prompts to generate an account activation email.
Open the email and complete the account creation and sign in process.
Note: If you are the very first person to create an account, the system adds the
Team Adminteam role to your account settings. This role has advanced access privileges to the system, therefore it’s recommended for your system administrator to create the first account.