{"id":20037774,"url":"https://github.com/openedx/frontend-component-header","last_synced_at":"2025-04-08T06:35:28.766Z","repository":{"id":36975069,"uuid":"207851318","full_name":"openedx/frontend-component-header","owner":"openedx","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-31T12:16:39.000Z","size":11025,"stargazers_count":8,"open_issues_count":31,"forks_count":139,"subscribers_count":58,"default_branch":"master","last_synced_at":"2025-04-02T17:05:15.854Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/openedx.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-09-11T15:55:45.000Z","updated_at":"2025-03-31T06:00:56.000Z","dependencies_parsed_at":"2024-03-04T11:44:47.813Z","dependency_job_id":"54ceaa58-ca93-4e1d-a944-d91d1a5da3af","html_url":"https://github.com/openedx/frontend-component-header","commit_stats":{"total_commits":460,"total_committers":50,"mean_commits":9.2,"dds":0.6065217391304347,"last_synced_commit":"d01486e5f71c5ecbac7404cb36b7ea3601a030b5"},"previous_names":["edx/frontend-component-header"],"tags_count":119,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openedx%2Ffrontend-component-header","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openedx%2Ffrontend-component-header/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openedx%2Ffrontend-component-header/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openedx%2Ffrontend-component-header/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openedx","download_url":"https://codeload.github.com/openedx/frontend-component-header/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247792825,"owners_count":20996890,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-13T10:22:01.333Z","updated_at":"2025-04-08T06:35:28.749Z","avatar_url":"https://github.com/openedx.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"#########################\nfrontend-component-header\n#########################\n\n|license| |Build Status| |Codecov| |npm_version| |npm_downloads| |semantic-release|\n\n********\nPurpose\n********\n\nA generic header for Open edX micro-frontend applications.\n\n************\nGetting Started\n************\n\nPrerequisites\n=============\n\nThe `devstack`_ is currently recommended as a development environment for your\nnew MFE.  If you start it with ``make dev.up.lms`` that should give you\neverything you need as a companion to this frontend.\n\nNote that it is also possible to use `Tutor`_ to develop an MFE.  You can refer\nto the `relevant tutor-mfe documentation`_ to get started using it.\n\n.. _Devstack: https://github.com/openedx/devstack\n\n.. _Tutor: https://github.com/overhangio/tutor\n\n.. _relevant tutor-mfe documentation: https://github.com/overhangio/tutor-mfe#mfe-development\n\nRequirements\n============\n\nThis component uses ``@edx/frontend-platform`` services such as i18n, analytics, configuration, and the ``AppContext`` React component, and expects that it has been loaded into a micro-frontend that has been properly initialized via ``@edx/frontend-platform``'s ``initialize`` function. `Please visit the frontend template application to see an example. \u003chttps://github.com/openedx/frontend-template-application/blob/master/src/index.jsx\u003e`_\n\n\nEnvironment Variables\n====================\n\n* ``LMS_BASE_URL`` - The URL of the LMS of your Open edX instance.\n* ``LOGOUT_URL`` - The URL of the API endpoint which performs a user logout.\n* ``LOGIN_URL`` - The URL of the login page where a user can sign into their account.\n* ``SITE_NAME`` - The user-facing name of the site, used as `alt` text on the logo in the header.\n  Defaults to \"localhost\" in development.\n* ``LOGO_URL`` - The URL of the site's logo.  This logo is displayed in the header.\n* ``ORDER_HISTORY_URL`` - The URL of the order history page.\n* ``ACCOUNT_PROFILE_URL`` - The URL of the account profile page.\n* ``ACCOUNT_SETTINGS_URL`` - The URL of the account settings page.\n* ``AUTHN_MINIMAL_HEADER`` - A boolean flag which hides the main menu, user menu, and logged-out\n  menu items when truthy.  This is intended to be used in micro-frontends like\n  frontend-app-authentication in which these menus are considered distractions from the user's task.\n\nInstallation\n============\n\nTo install this header into your Open edX micro-frontend, run the following command in your MFE:\n\n``npm i --save @edx/frontend-component-header``\n\nThis will make the component available to be imported into your application.\n\nCloning and Startup\n===================\n\n.. code-block::\n\n\n  1. Clone your new repo:\n\n    ``git clone https://github.com/openedx/frontend-component-header.git``\n\n  2. Use node v18.x.\n\n    The current version of the micro-frontend build scripts support node 18.\n    Using other major versions of node *may* work, but this is unsupported.  For\n    convenience, this repository includes an .nvmrc file to help in setting the\n    correct node version via `nvm \u003chttps://github.com/nvm-sh/nvm\u003e`_.\n\n  3. Install npm dependencies:\n\n    ``cd frontend-component-header \u0026\u0026 npm ci``\n\n  4. Start the dev server:\n\n    ``npm start``\n\nUsage\n=====\n\nThis library has the following exports:\n\n* ``(default)``: The header as a React component.\n* ``messages``: Internationalization messages suitable for use with `@edx/frontend-platform/i18n \u003chttps://edx.github.io/frontend-platform/module-Internationalization.html\u003e`_\n* ``dist/index.scss``: A SASS file which contains style information for the component.  It should be imported into the micro-frontend's own SCSS file.\n\nPlugins\n-------\nThis can be customized using `Frontend Plugin Framework \u003chttps://github.com/openedx/frontend-plugin-framework\u003e`_.\n\nThe parts of this that can be customized in that manner are documented `here \u003c/src/plugin-slots\u003e`_.\n\nExamples\n========\n\n* `An example of component and messages usage. \u003chttps://github.com/openedx/frontend-template-application/blob/3355bb3a96232390e9056f35b06ffa8f105ed7ca/src/index.jsx#L21\u003e`_\n* `An example of SCSS file usage. \u003chttps://github.com/openedx/frontend-template-application/blob/3cd5485bf387b8c479baf6b02bf59e3061dc3465/src/index.scss#L8\u003e`_\n\nDevelopment\n===========\n\nInstall dependencies::\n\n  npm ci\n\nStart the development server::\n\n  npm start\n\nBuild a production distribution::\n\n  npm run build\n\nLicense\n=======\n\nThe code in this repository is licensed under the AGPLv3 unless otherwise\nnoted.\n\nPlease see `LICENSE \u003cLICENSE\u003e`_ for details.\n\nContributing\n============\n\nContributions are very welcome.  Please read `How To Contribute`_ for details.\n\n.. _How To Contribute: https://openedx.org/r/how-to-contribute\n\nThis project is currently accepting all types of contributions, bug fixes,\nsecurity fixes, maintenance work, or new features.  However, please make sure\nto have a discussion about your new feature idea with the maintainers prior to\nbeginning development to maximize the chances of your change being accepted.\nYou can start a conversation by creating a new issue on this repo summarizing\nyour idea.\n\nGetting Help\n===========\n\nIf you're having trouble, we have discussion forums at\nhttps://discuss.openedx.org where you can connect with others in the community.\n\nOur real-time conversations are on Slack. You can request a `Slack\ninvitation`_, then join our `community Slack workspace`_.  Because this is a\nfrontend repository, the best place to discuss it would be in the `#wg-frontend\nchannel`_.\n\nFor anything non-trivial, the best path is to open an issue in this repository\nwith as many details about the issue you are facing as you can provide.\n\nhttps://github.com/openedx/frontend-component-header/issues\n\nFor more information about these options, see the `Getting Help`_ page.\n\n.. _Slack invitation: https://openedx.org/slack\n.. _community Slack workspace: https://openedx.slack.com/\n.. _#wg-frontend channel: https://openedx.slack.com/archives/C04BM6YC7A6\n.. _Getting Help: https://openedx.org/community/connect\n\nThe Open edX Code of Conduct\n============================\n\nAll community members are expected to follow the `Open edX Code of Conduct`_.\n\n.. _Open edX Code of Conduct: https://openedx.org/code-of-conduct/\n\nReporting Security Issues\n=========================\n\nPlease do not report security issues in public. Please email security@openedx.org.\n\n.. |Build Status| image:: https://api.travis-ci.com/edx/frontend-component-header.svg?branch=master\n   :target: https://travis-ci.com/edx/frontend-component-header\n.. |Codecov| image:: https://img.shields.io/codecov/c/github/edx/frontend-component-header\n   :target: @edx/frontend-component-header\n.. |npm_version| image:: https://img.shields.io/npm/v/@edx/frontend-component-header.svg\n   :target: @edx/frontend-component-header\n.. |npm_downloads| image:: https://img.shields.io/npm/dt/@edx/frontend-component-header.svg\n   :target: @edx/frontend-component-header\n.. |license| image:: https://img.shields.io/npm/l/@edx/frontend-component-header.svg\n   :target: @edx/frontend-component-header\n.. |semantic-release| image:: https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg\n   :target: https://github.com/semantic-release/semantic-release","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenedx%2Ffrontend-component-header","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenedx%2Ffrontend-component-header","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenedx%2Ffrontend-component-header/lists"}