Skip to main content

Getting Started

If your environment is already setup:

git clone https://rizing-devops@dev.azure.com/rizing-devops/rizing/_git/monorepo
cd monorepo
npm install
tip

See Cloning a Repository docs for help on cloning a repository for the first time in ADO.

Run the application:

# To run just the frontend and backend app:
npm run start:omni

# To run just the docs:
npm run start:omni:docs

# To run the frontend, backend, and docs:
npm run start:omni:all

â„šī¸ Overview​

The Rizing Geospatial products team uses a mono-repository style structure (aka monorepo). There are many reasons and specific advantages behind the choice to use this architecture (which can be read here). The monorepo is used to house all Geospatial products within Rizing. Additionally, this repository consists of hundreds of re-usable components and dozens of distributable packages that can be used by other developers at Rizing.

đŸ’ŋ Environment Setup​

Dependencies​

The following dependencies are necessary to be installed on your machine:

NodeJS (NVM) Setup​

tip

It's highly recommended to use Node Version Manager (nvm), rather than directly installing a version of NodeJS. This will allow you to effortlessly install and switch between NodeJS versions.

Download and install one of the following:

Install NodeJS >= 20.10.0

# Install NodeJS version
nvm install 20

# Set as active version
nvm use 20

Clone Repository​

git clone https://rizing-devops@dev.azure.com/rizing-devops/rizing/_git/monorepo
note

Generate a Personal Access Token in Azure DevOps if necessary.

Open Code​

  1. Open the root folder in Visual Studio Code (or other IDE if preferred)
  2. When prompted from Visual Studio Code to install the recommended extensions, click "Yes"
  3. Install NodeJS packages (npm install)

Structure​

The repository has the following structure:

đŸ“Ļ monorepo            # repo root
â”Ŗ 📂 apps # contains all NodeJS apps
┃ â”Ŗ 📂 app1
┃ â”Ŗ 📂 app2
┃ ┗ 📂 app3
â”Ŗ 📂 docs # contains all application documentation (using Docusaurus)
┃ â”Ŗ 📂 app1
┃ â”Ŗ 📂 app2
┃ â”Ŗ 📂 app3
┃ ┗ 📂 dev-guide # developer guide docs
┗ 📂 libs # re-usable library code, broken down into packages (libs)
â”Ŗ 📂 lib1
â”Ŗ 📂 lib2
┗ 📂 storybook-host # storybook server that pulls all stories from all libs

🗒 Notes​

Unit tests using the ArcGIS JS API​

When a library has unit tests that uses the ArcGIS JS API, it is necessary to adjust the library's Jest config to properly handle the dependency.

// Add any additional node module packages to the regex pattern.
"transformIgnorePatterns": [
"node_modules/(?!(@angular|@arcgis|@esri|@stencil/)"
],

See: https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcgis-js-api-can-t-be-used-in-jest-unit-tests/td-p/1350401