You are reading the documentation for an outdated Corteza release. 2024.9 is the latest stable Corteza release.

Web Applications

The web applications are written in Vue.js and provide the user interface to interact with the entire system.

Communication between the Corteza server and web applications is done using the REST API and web sockets.

Development setup

Fork the Corteza web application

Core contributors should skip this part.

  1. go to the https://github.com/cortezaproject/corteza-webapp-$WEB_APPLICATION repository

  2. click on the Fork button in the top right corner and follow the instructions on the screen.

Clone the repository

Using the CLI:
  1. open the CLI

  2. navigate to your working folder

  3. run the git clone git@github.com:cortezaproject/corteza-webapp-$WEB_APPLICATION.git command

Refer to the repository if you wish to use an alternative method.

Configure the environment

Inside your web application directory:
  1. run cp public/config.example.js public/config.js for Linux, or in public folder run copy config.example.js config.js for Windows

  2. open the config.js file using VIM, Nano, or any other editor and modify the configuration as you see fit

Set the API

Define the API in the public/config.js by setting:
window.CortezaAPI = '$BASE_URL'

The $BASE_URL parameter is the location of your Corteza server. If you are running the server on http://localhost:80, then the value should be http://localhost:80/api.

Set the authentication API

Corteza web applications authenticate the user using an OAuth2 flow.

This part can be skipped when using the same Corteza server for authentication and processing. The web application will generate the authentication endpoints based on the CortezaAPI parameter.

Define the authentication API in the public/config.js by setting:
window.CortezaAuth = '$BASE_URL/auth'

Assure dependencies

When using modified versions of corteza-js and corteza-vue, make sure to link them using yarn link @cortezaproject/corteza-js and yarn link @cortezaproject/corteza-vue.

Run the yarn command to assure that all of the packages are present and up to date.

See the package.json file for the supported Node.js versions.

Run the web application

Run the yarn serve command to start the web application. You can use an optional --port $POST flag to specify what port it should run on.