Skip to content

open-craft/frontend-app-learning-paths

Repository files navigation

frontend-app-learning-paths

License status-badge Continuous Integration Codecov

Purpose

The Learning Paths MFE provides a specialized frontend interface for managing and displaying learning paths in Open edX. Learning paths are curated sequences of courses that guide learners through a structured educational journey toward mastering specific skills or knowledge areas.

This MFE serves as the frontend for the learning-paths-plugin, which provides the complete backend functionality.

Getting Started

Tutor Setup

Follow these steps to set up the Learning Paths MFE with Tutor:

  1. Navigate to your Tutor plugins directory:

    cd "$(tutor plugins printroot)"
  2. Create a file named learning_paths.py with the following content:

    from tutormfe.hooks import MFE_APPS
    
    @MFE_APPS.add()
    def _add_learning_paths_mfe(mfes):
        mfes["learning-paths"] = {
            "repository": "https://github.com/open-craft/frontend-app-learning-paths.git",
            "port": 2100,
            "version": "main",  # optional, will default to the Open edX current tag
        }
        return mfes
  3. Enable the plugin:

    tutor plugins enable learning_paths
  4. Build the MFE image:

    tutor images build mfe
  5. Restart the MFE container to apply changes:

    tutor dev stop mfe && tutor dev start -d
  6. Access the Learning Paths MFE at: http://apps.local.openedx.io:2100/learning-paths/

Development Setup

After completing the Tutor setup, prepare the repository for local development:

  1. Clone this repository:

    git clone https://github.com/open-craft/frontend-app-learning-paths.git
    cd frontend-app-learning-paths
  2. Create .env.private with the following content:

    LMS_BASE_URL='http://local.openedx.io:8000'
    LOGIN_URL='http://local.openedx.io:8000/login'
    LOGOUT_URL='http://local.openedx.io:8000/logout'
    REFRESH_ACCESS_TOKEN_ENDPOINT='http://local.openedx.io:8000/login_refresh'
    TERMS_OF_SERVICE_URL='https://www.edx.org/edx-terms-service'
    PRIVACY_POLICY_URL='http://local.openedx.io:8000/privacy'
  3. Install dependencies:

    npm install
  4. Mount the repository for development:

    cd ..
    tutor mounts add $(pwd)/frontend-app-learning-paths
  5. Restart the MFE container (to unbind the port) and start the MFEs:

    tutor dev stop mfe && tutor dev start -d
  6. Make changes to the code and see them reflected in real-time.

Local Development

You can also run this MFE locally without mounting it in Tutor:

  1. First, create a Tutor plugin to add CORS configuration:

    cd "$(tutor plugins printroot)"
  2. Create a file named learning_paths.py with the following content:

    from tutor import hooks
    
    hooks.Filters.ENV_PATCHES.add_item(
        (
            "openedx-lms-common-settings",
            'CORS_ORIGIN_WHITELIST.append("http://apps.local.openedx.io:2100")'
        )
    )
  3. Enable the plugin:

    tutor plugins enable learning_paths
  4. Run the MFE locally:

    cd frontend-app-learning-paths
    npm install
    npm start --local

Getting Help

If you're having trouble, we have discussion forums at https://discuss.openedx.org where you can connect with others in the community.

Our real-time conversations are on Slack. You can request a Slack invitation, then join our community Slack workspace. Because this is a frontend repository, the best place to discuss it would be in the #wg-frontend channel.

For anything non-trivial, the best path is to open an issue in this repository with as many details about the issue you are facing as you can provide.

https://github.com/open-craft/frontend-app-learning-paths/issues

For more information about these options, see the Getting Help page.

License

The code in this repository is licensed under the AGPLv3 unless otherwise noted.

Please see LICENSE for details.

Contributing

Contributions are very welcome. Please read How To Contribute for details.

This project is currently accepting all types of contributions, bug fixes, security fixes, maintenance work, or new features. However, please make sure to have a discussion about your new feature idea with the maintainers prior to beginning development to maximize the chances of your change being accepted. You can start a conversation by creating a new issue on this repo summarizing your idea.

The Open edX Code of Conduct

All community members are expected to follow the Open edX Code of Conduct.

People

The assigned maintainers for this component and other project details may be found in Backstage. Backstage pulls this data from the catalog-info.yaml file in this repo.

Reporting Security Issues

Please do not report security issues in public. Email [email protected] instead.