Skip to content

Latest commit

 

History

History
57 lines (32 loc) · 2.86 KB

Introduction.adoc

File metadata and controls

57 lines (32 loc) · 2.86 KB

Introduction

General

The Crownpeak PWA Template is a project that demonstrates how to build a Progressive Web App that is consuming contents created and continuosly updated with the enterprise content management system FirstSpirit.

Projects used

The Crownpeak PWA Template connects to several other projects:

The following image illustrates the general architecture: Crownpeak PWA Template architecture

Content API

In headless environments, the editorial content from FirstSpirit is provided via the CaaS. Additionally, the site’s structure can be accessed via the Navigation Service (here considered part of the CaaS).

To make using these two services as easy as possible, we have developed the Content API. This project already provides a rich API to communicate with both services in a standardized way. It also transforms the responses of the CaaS and the Navigation Service and enriches them with other useful data.

For example, it converts the Navigation Service tree structure into easy to use maps and also extracts the start page directly.

The responses of the CaaS are transformed as well and unnecessary information for the frontend is removed.

Omnichannel Manager

The Omnichannel Manager provides the FirstSpirit ContentCreator’s advanced editing and workflow capabilities to your PWA.

FirstSpirit CaaS

The FirstSpirit CaaS (Content as a Service) provides all editorial content from your FirstSpirit project. Your project’s structural data is provided as well, via the Navigation Service.

Deployment

Running the application in a production environment

We provide an example Dockerfile in this project that can be used to containerize your PWA. To verify that your application is still running in the docker container, you can build and run the container locally. We assume you already installed docker on your machine.

First, create your .env file according to .env.template.

Then, build the image with docker build -t crownpeak-pwa-template .

You can then run the image locally with

docker run --env-file .env -p XXXX:3000 crownpeak-pwa-template

Where XXXX can be replaced with any free port on your machine. When the container is running, visit localhost:XXXX in a browser and the pwa should show up.