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:$YOUR_USERNAME_HERE/corteza-webapp-$WEB_APPLICATION.git command

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 = '$API_DOMAIN'

The underlying API client generates the exact request URL that the web application uses.

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 = '$API_DOMAIN/auth'

Assure dependencies

When using modified versions of the corteza-js and the corteza-vue packages, 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.

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.