Setup the Frontend
This is an Angular 8 project, and you need to install the dependencies, and run the project.
The application needs to be configured with the appropriate fields to be able to use it. Example configuration is provided in the
forms.jsonneeds to be placed in
src/assets/config. This file defines the schema for various forms used, along with the fields for each. The form rendering is based on the formly.dev library, and the forms.json is a small wrapper on top of the formly schema.
In this file
formsis an array with key/value pairs. They key is the code / slug of the form which is used to access the form. Eg: if the key for a form is
employee-signupthat form can be accessed via
/forms/employee-signup. Each form definition will have the below fields -
layouts.jsonis used to define how the public and private profile pages look like. For each entity in Sunbird backend, a layout file should be defined with the fields and the order in which they should display.
In this file
layoutsis an array with key/value pairs. They key is the code / slug of the layout page which is used to access the form. Eg: if the key for a layout is
employee-profilethat page can be accessed via
/profile/employee-profile. Each layout definition will have the below fields -
To avoid CORS issues you can use proxy configuration. Run
ng serve --proxy-config proxy.conf.json. For additional configuration please check
The frontend may be hosted any of the below ways
- As a container. You may create an image with the angular build files.
- On a VM
- In blob storage (eg: S3, with a CDN in front)