Skip to content
Juraj Bielik edited this page Jun 14, 2019 · 19 revisions

Kentico Cloud Documentation Wiki

status badge

Overview

Kentico Cloud Documentation portal is a website that describes Kentico Cloud and provides tutorials for its users. The portal uses Kentico Cloud as a source of its content.

The portal website is server-side rendered and built using NodeJS and its Express framework. The content of the website is stored in Kentico Cloud itself. Additionally, the website is also supported by a backend that provides:

  • Search functionality across the website.
  • Ability to fetch code samples from GitHub repository to Kentico Cloud.
  • Bulk publish and schedule to publish functionality for Kentico Cloud.
  • API Reference generation.

The backend utilizes microservice architecture and its services are built using Microsoft Azure Functions.

Backend Architecture

The portal responds instantly to any change of published content in Kentico Cloud. For this reason, it has a Dispatcher function that receives webhooks from Kentico Cloud. It processes the webhook and then publishes an event to Azure Event Grid topic. The topic is consumed by both Tutorial Search Service and an API Reference Preprocessor.

Search Functionality

The portal uses Algolia's search as a service solution for its search functionality. When a user searches for a term on the portal, the website communicates directly with Algolia.

The Tutorial Search Service is thus responsible for indexing the content of the website's tutorials. After receiving an event from Dispatcher, it fetches the relevant content from Kentico Cloud, splits it into smaller records and saves it to an Azure Blob storage.

Reference Search Service works similarly with the content of the API Reference pages. However, it does not fetch the data directly from Kentico Cloud, but it receives it in a preprocessed format from Reference Preprocessor.

Index Sync then responds to a new blob file created in the blob storage - It reads the saved data records and updates the index on Algolia accordingly.

GitHub Integration

Because the portal contains numerous code samples, it is also integrated with GitHub, where all of the code samples are stored. The code samples are being automatically stored in Kentico Cloud as well thanks to GithubSync and CodeSamples Manager.

GithubSync reacts to each commit made to the code samples repository. It fetches files affected by the commit from GitHub, and extracts marked code samples. Then, it stores the content of the files to its own local storage and the samples to an Azure Blob Storage. Code Samples Manager responds to a new blob file created in the blob storage. It reads the stored code samples and updates the corresponding content items in Kentico Cloud.

Bulk Publishing / Scheduling to Publish

Finally, the Publisher function simplifies the process of publishing (or scheduling to publish) a non-trivial content item. Being triggered every five minutes, it publishes any content item in Kentico Cloud that is in Cascade Publish workflow step, along with all of its linked items and modular content. When an item is in the Scheduled workflow step, the Publisher will set the same step of all of its linked items and modular content as well.

API Reference

The Reference Preprocessor listens to events sent by the Dispatcher. After receiving an event, it fetches the data relevant to API Reference model from Kentico Cloud. Then it transforms the data to a predefined format and saves it to an Azure Blob.

Just like the Reference Search Service, the OpenAPI Processor also reacts to a new blob file created in the blob storage. It constructs a YML file from the data according to the OpenAPI specification version 3. Then it saves the file in a GitHub repository.

Environments

Kentico Cloud Documentation operates on 4 different environments:

1. Live Master

Master branches of all services + live (published) data prom Kentico Cloud project. Live website runs in this environment as well.

2. Live Dev

Develop branches of all services + live (published) data from Kentico Cloud project. This environment is used for integration tests and reviewing new features on the web with live data.

3. Preview Master

Master branch of website + not yet published data from Kentico Cloud project. This environment is used by content writers for previewing changes within content before publishing.

4. Preview Dev

Develop branch of website + not yet published data from Kentico Cloud project. This environment is used by content writers for reviewing new features new features on the web with testing (not published) data.

Clone this wiki locally