generaledx

Configure micro-frontends (MFEs)

As of the Maple.2 release of Open edX packaged by Bitnami, the Learning MFE (micro-frontend), which renders all learner-facing course pages, is included and enabled by default. To read more about MFEs, check the official Open edX documentation about micro-frontends.

To configure and rebuild a micro-frontend, follow these steps.

Configure a micro-frontend

To configure a micro-frontend, follow these steps:

  • Navigate to the MFE directory. By default, all MFEs are located in the /opt/bitnami/edx/app directory.

    For example, the directory name for the Open edX Learning MFE is frontend-app-learning. To navigate to its installation directory, execute the following command:

      $ cd /opt/bitnami/edx/app/frontend-app-learning
    
  • Modify the .env.bitnami file.

    For example, to change the site name displayed, which is Learning Platform by default, change the following line in the .env.bitnami file:

      export SITE_NAME='Learning Platform'
    
  • In order for changes to take effect, you need to rebuild the MFE.

Rebuild a micro-frontend

To rebuild a MFE, follow these steps:

  • Navigate to the MFE directory. By default, all MFEs are located in the /opt/bitnami/edx/app directory.

    For example, the directory name for the Open edX Learning MFE is frontend-app-learning. To navigate to its installation directory, execute the following command:

      $ cd /opt/bitnami/edx/app/frontend-app-learning
    
  • Change to a superuser:

      $ sudo su
    
  • Load the configurations of the .env.bitnami file into the shell:

      $ source .env.bitnami
    
  • Build the MFE:

      $ npm run build
    

NOTE: It is not required to restart the web server to deploy the changes. That is because the MFE application, which is generated in the dist subfolder, only contains pure HTML and JavaScript files, and the Apache web server is configured to serve these files at the expected location (e.g. /learning for the Learning MFE).

Last modification March 15, 2022