4.0.6 • Published 1 year ago

@jorsek/content-portal-configs v4.0.6

Weekly downloads
146
License
ISC
Repository
-
Last release
1 year ago

Tenant Configuration repo.

This repository contains all of the tenant configurations. There is a github action that triggers off merges into to the main branch.

That action will compile the configurations into a JSON Object string and push those configurations into Firebase Remote-Config.

Diagram

Firebase Remote-Config

Firebase Trigger function

GCP Pub/Sub

Setup

Clone the repo by using this command or cloning it using github Desktop.

git clone git@github.com:Jorsek/content-portal-configs.git

install node.js and yarn on MacOS

brew install node
npm install yarn -g

install node.js and yarn on Windows

Download & install the LTS version of node.js https://nodejs.org/en/download/. Then, open a command window and type:

npm install yarn -g

install project dependencies and run the project

cd $PROJECTPATH
yarn

Tenant config

The configuration for each tenant are located in the $PROJECTPATH/src/tenants directory where folders named by tenant id such as "jorsek"

+-- package.json
+-- src
|   +-- tenants
|       +-- org-name
|           +-- i18n <- translations
|               +-- index.ts <- exports supported language customized strings
|               +-- en-US.json <- a supported language custom string overrides.
|           +-- index.ts <- the exported configuration
|           +-- theme.ts <- the exported jss/material ui theme overrides.
|       +-- jorsek
|       +-- org-name1
|       +-- org-name2
|       +-- default.ts <- default configuration that the custom configurations all extend from.
|       +-- index.ts <- exports and merges the configurations.

I18n translated strings

+-- i18n 
|   +-- index.ts <- exports the i18n translated strings for languages we support
|   +-- en-US.json <- a supported language file that contains all the static application strings
|   +-- pl-PL.json <- a supported language file that contains all the static application strings

Exporting a config

Run the following command to export a config

./src/ezd-config.ts {path-to-config} > {output-file}

Example:

./src/ezd-config.ts tenants/viewpoint/index.ts > viewpoint-8-4-21.json

Adding a new Tenant

You will need:

  • A deployment ID. This can be obtained from the deployments page in the CMS.
  • API key. This can be obtained from the Content API page in the CMS. Create a Simple API Key.
  • Name of the tenant.

To add a tenant, a folder for the tenant is created within this repository, and that change is committed to the main branch in Github through a pull request. A few minutes after the change is merged, the tenant should be available. If the tenant is not available, it is possible the build had an error. Look at Github Actions to determine the issue.

Steps to add a tenant: 1. In this repository, copy the tenant_template/customer_name folder into the tenants/ folder. 1. Rename the customer_name folder you just copied to the name of the tenant. 1. Note: This is typically the org id, but can be anything. The value should be all lower case, and may contain underscores. This value will determine the portal's URL. For example, if the tenant's name is my_example_tenant, the portal's URL will be my_example_tenant.portal.heretto.com. 1. In the index.ts and i18n/en-us.json files, replace everything in square brackets: 1. In index.ts: 1. title: The title of site, typically something like {tenant-name} Help Site. 1. env.EZD_ORG: The org id used by the deploy API. Typically the same org ID from the CMS. 1. env.EZD_HOSTNAME: The domain of the deploy API. For example,content-dev2.easydita.com1. env.EZD_TOKEN: The deploy API API key. This is the token obtained from the Content API page in the CMS. 1. env.EZD_DEPLOYMENT_ID: The deployment ID obtained from the Deployment page in the CMS. 1. In i18n/en-us.json: 1. label.tenant: Typically a label for the tenant. For example,Heretto`. 1. Commit changes and submit a PR.

4.0.5

1 year ago

4.0.4

1 year ago

4.0.6

1 year ago

4.0.1

1 year ago

4.0.0

1 year ago

4.0.3

1 year ago

4.0.2

1 year ago

3.0.0

1 year ago

2.2.0-rc20

2 years ago

2.1.21

2 years ago

2.1.20

2 years ago

2.2.0-rc15

2 years ago

2.2.0-rc16

2 years ago

2.2.0-rc13

2 years ago

2.2.0-rc14

2 years ago

2.2.0-rc19

2 years ago

2.2.0-rc17

2 years ago

2.2.0-rc18

2 years ago

2.2.0-rc9

2 years ago

2.2.0-rc8

2 years ago

2.2.0-rc7

2 years ago

2.2.0-rc6

2 years ago

2.2.0-rc11

2 years ago

2.2.0-rc10

2 years ago

2.2.0-rc1

2 years ago

2.2.0-rc5

2 years ago

2.2.0-rc4

2 years ago

2.2.0-rc3

2 years ago

2.2.0-rc2

2 years ago

2.2.0

2 years ago

2.1.18

2 years ago

2.1.19

2 years ago

2.1.16

2 years ago

2.1.17

2 years ago

2.1.14

2 years ago

2.1.15

2 years ago

2.1.13

2 years ago

2.1.9

2 years ago

2.1.12

2 years ago

2.1.11

2 years ago

2.1.4

2 years ago

2.1.7

2 years ago

2.0.17

2 years ago

2.0.18

2 years ago

2.0.16

2 years ago

2.0.15

3 years ago

2.0.14

3 years ago

2.0.13

3 years ago

2.0.11

3 years ago

2.0.12

3 years ago

2.0.10

3 years ago

2.0.9

3 years ago

2.0.8

3 years ago

2.0.7

3 years ago

2.0.5

3 years ago

2.0.6

3 years ago

2.0.2

3 years ago

2.0.0

3 years ago

1.5.0

3 years ago

1.4.9

3 years ago

1.4.8

3 years ago

1.4.6

3 years ago

1.4.5

3 years ago

1.4.4

3 years ago

1.4.7

3 years ago

1.4.3

3 years ago

1.4.2

3 years ago

1.3.7

3 years ago

1.3.6

3 years ago

1.3.5

3 years ago

1.3.4

3 years ago

1.3.3

3 years ago

1.4.1

3 years ago

1.3.2

3 years ago

1.3.1

3 years ago

1.3.10

3 years ago

1.3.13

3 years ago

1.3.14

3 years ago

1.3.11

3 years ago

1.3.12

3 years ago

1.3.9

3 years ago

1.3.8

3 years ago

1.3.0

3 years ago

1.2.11

3 years ago

1.2.8

3 years ago

1.2.7

3 years ago

1.2.9

3 years ago

1.2.6

3 years ago

1.2.5

3 years ago

1.2.4

3 years ago

1.2.3

3 years ago

1.2.2

3 years ago

1.2.0

3 years ago

1.2.1

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago