Skip to content

Commit a8a69df

Browse files
arbrandesclaude
andcommitted
docs: OEP-65 reframe around build-time shell architecture
Reframe OEP-65 to match the frontend-base reference implementation: build-time composition of apps into sites via a shared shell, replacing the dropped runtime module federation approach. Rework the glossary and ADRs to the new vocabulary (App, App Repository, Site, Shell, Shell Architecture, Slot, Widget), rename ADR-0003 to "Frontend Sites", remove the obsolete federation diagrams, and fix the "Composability" label typo. Co-Authored-By: Claude <noreply@anthropic.com>
1 parent e4af7a2 commit a8a69df

10 files changed

Lines changed: 299 additions & 459 deletions

oeps/architectural-decisions/oep-0065-arch-frontend-composability.rst

Lines changed: 84 additions & 139 deletions
Large diffs are not rendered by default.

oeps/architectural-decisions/oep-0065/decisions/0001-unified-platform-repository.rst renamed to oeps/architectural-decisions/oep-0065/decisions/0001-unified-platform-library.rst

Lines changed: 25 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
.. _Create a unified platform repository:
1+
.. _Create a unified platform library:
22

3-
Create a unified platform repository
4-
####################################
3+
Create a unified platform library
4+
#################################
55

66
Status
77
******
@@ -11,14 +11,14 @@ Accepted
1111
Summary
1212
*******
1313

14-
This ADR proposes combining a number of repositories into a single, unified frontend platform library as a migration strategy for implementing :ref:`OEP-65 <OEP-65 Frontend Composibility>`. This library is named `frontend-base <https://github.com/openedx/frontend-base>`_.
14+
This ADR proposes combining a number of repositories into a single, unified frontend platform library as a migration strategy for implementing :ref:`OEP-65 <OEP-65 Frontend Composability>`. This library is named `frontend-base <https://github.com/openedx/frontend-base>`_.
1515

1616
Context
1717
*******
1818

19-
OEP-65 proposes adopting webpack :term:`module federation` for Open edX :term:`micro-frontends <Micro-frontend>` (MFEs) as a means to enable :term:`runtime module loading` and :term:`shared dependencies` in the :term:`Open edX frontend`. The OEP lays out a series of changes necessary to enable these capabilities, which it refers to as building a "reference implementation" of runtime module loading and shared dependencies.
19+
OEP-65 proposes composing the :term:`Open edX Frontend` from independently developed :term:`apps <App>` at build time - into one or more :term:`Sites <Site>` built by a shared :term:`Shell` - as a means to enable build-time composability and :term:`shared dependencies <Shared Dependencies>`. The OEP lays out a series of changes necessary to enable these capabilities, which it refers to as building a "reference implementation".
2020

21-
This reference implementation is effectively a new underlying architecture for our frontend. This ADR refers to this new architecture as the :term:`module architecture`, as opposed to the historical :term:`micro-frontend architecture` that has existed prior to OEP-65.
21+
This reference implementation is effectively a new underlying architecture for our frontend. This ADR refers to this new architecture as the :term:`Shell Architecture`, as opposed to the historical :term:`Micro-frontend Architecture` that has existed prior to OEP-65.
2222

2323
The bulk of the work to build OEP-65's reference implementation is related to the *library repositories* that MFEs depend on:
2424

@@ -28,7 +28,7 @@ The bulk of the work to build OEP-65's reference implementation is related to th
2828
* frontend-component-header
2929
* frontend-component-footer
3030

31-
It will also involve the creation of a new :term:`Shell` to initialize the frontend at runtime and load existing MFEs as :term:`modules <Module>`. Prior to this decision, we might have considered putting the shell in its own repository as well:
31+
It will also involve the creation of a new :term:`Shell` to initialize the frontend and compose existing MFEs into a :term:`Site` as :term:`apps <App>`. Prior to this decision, we might have considered putting the shell in its own repository as well:
3232

3333
* frontend-app-shell
3434

@@ -37,12 +37,12 @@ There are several related concerns which influence our strategy for migrating th
3737
Significant API changes
3838
=======================
3939

40-
The creation of the shell and the move toward using :term:`plugins <Plugin Module>` and module federation is expected to significantly change the API surface across our various libraries.
40+
The creation of the shell and the move toward composing :term:`apps <App>` is expected to significantly change the API surface across our various libraries.
4141

4242
``frontend-platform``
4343
---------------------
4444

45-
As the shell takes responsibility for much of what ``frontend-platform`` provides to MFEs in the micro-frontend architecture, many of the APIs it exposes will become internal to the shell. We will also likely need to add new APIs for interactions between the shell and modules.
45+
As the shell takes responsibility for much of what ``frontend-platform`` provides to MFEs in the :term:`Micro-frontend Architecture`, many of the APIs it exposes will become internal to the shell. We will also likely need to add new APIs for interactions between the shell and apps.
4646

4747
``frontend-build``
4848
------------------
@@ -57,7 +57,7 @@ The header and footer will be owned by the shell and need not be libraries any m
5757
``frontend-plugin-framework``
5858
-----------------------------
5959

60-
We expect ``frontend-plugin-framework`` to be folded into ``frontend-platform`` to unify the two, as they will be intimately tied to each other going forward. We'll also be creating new APIs around loading plugins that support module federation.
60+
We expect ``frontend-plugin-framework`` to be folded into ``frontend-base`` to unify it with the rest of the runtime library, as they will be intimately tied to each other going forward. We'll also be creating new APIs around composing :term:`widgets <Widget>` into :term:`slots <Slot>`.
6161

6262
``frontend-app-*`` Repositories
6363
-------------------------------
@@ -77,7 +77,7 @@ We also feel the need to continue to modernize our library repositories by adopt
7777
Deprecation of the micro-frontend architecture
7878
==============================================
7979

80-
As described in OEP-65, we're migrating from the :term:`micro-frontend architecture`, where each MFE is a standalone, independently deployed app, to a :term:`module architecture` where the MFEs are modules loaded into a common :term:`Shell` which owns the header, footer, initialization, and shared dependencies.
80+
As described in OEP-65, we're migrating from the :term:`Micro-frontend Architecture`, where each MFE is a standalone, independently deployed app, to a :term:`Shell Architecture` where the MFEs become :term:`apps <App>` composed into a common :term:`Shell` which owns the header, footer, initialization, and shared dependencies.
8181

8282
One way or another, this is a paradigm shift that will involve breaking changes and migration work on behalf of community members. We would like to provide a clear a path forward for operators, developers, and maintainers to adopt the module architecture. We believe that a clean break and a cohesive and clear platform for modules is more approachable than a more granular deprecation of certain features and code in the existing library repositories.
8383

@@ -100,24 +100,23 @@ Development tool configurations
100100

101101
The library will provide base ESLint, Jest, TypeScript, and Webpack configurations. ESLint, Jest, and TypeScript will be similar to what ``frontend-build`` provides.
102102

103-
The webpack configurations will support a variety of build targets for the new module architecture, as well as application MFE configurations to enable us to migrate to the new unified platform library in a backwards compatible way. The new build targets include:
103+
The webpack configurations will support a variety of build targets for the new :term:`Shell Architecture`, as well as application MFE configurations to enable us to migrate to the new unified platform library in a backwards compatible way. The new build targets include:
104104

105-
* A production configuration suitable for deploying the MFE's modules to be consumed via module federation.
106-
* A release configuration which will package those same modules to be released as an npm package for use as direct plugins.
107-
* A development server configuration to serve the MFE's modules to be consumed locally via module federation, complete with hot module reloading.
108-
* A development server configuration to serve the MFE's modules inside a shell as direct plugins.
105+
* A production configuration suitable for building an :term:`App` into a deployable :term:`Site`.
106+
* A release configuration which packages an :term:`App Repository`'s :term:`apps <App>` as an npm package for build-time inclusion in a :term:`Site`.
107+
* A development server configuration to serve an :term:`App` inside a :term:`Shell`, complete with hot module reloading.
109108

110109
These webpack configurations will be exposed via a function like ``frontend-build``'s '``createConfig`` so that they can be modified and extended as necessary by the MFEs.
111110

112111
CLI tool
113112
========
114113

115-
Similar to ``fedx-scripts`` provided by ``frontend-build``, the ``frontend-base`` library will provide a CLI tool. This tool will expose commands to run the above webpack configurations, as well as other commands related to frontend projects. The rationale and details of frontend projects and these CLI commands are the subject of a future ADR.
114+
Similar to ``fedx-scripts`` provided by ``frontend-build``, the ``frontend-base`` library will provide a CLI tool. This tool will expose commands to run the above webpack configurations, as well as other commands related to building and developing :term:`Sites <Site>`. The rationale and details of these CLI commands are the subject of a future ADR.
116115

117116
Consequences
118117
************
119118

120-
This approach allows us to treat the :term:`module architecture` as an independent effort, as opposed to a set of features that need to fit in with the existing :term:`micro-frontend architecture`. We greatly reduce or eliminate the risk of regressions in libraries that the entire community relies on while we build a replacement which resembles and borrows code from them, but is otherwise significantly different. This division makes it explicitly clear which features are used by the old architecture and which are used by the new one.
119+
This approach allows us to treat the :term:`Shell Architecture` as an independent effort, as opposed to a set of features that need to fit in with the existing :term:`Micro-frontend Architecture`. We greatly reduce or eliminate the risk of regressions in libraries that the entire community relies on while we build a replacement which resembles and borrows code from them, but is otherwise significantly different. This division makes it explicitly clear which features are used by the old architecture and which are used by the new one.
121120

122121
Further, it means we can migrate to the new architecture in a backwards compatible way by atomically migrating MFEs to use the new `frontend-base <https://github.com/openedx/frontend-base>`_ library, again, without running the risk of destabilizing existing libraries with multiple breaking changes over time.
123122

@@ -126,10 +125,10 @@ We believe this is a reasonable migration strategy given the generally low rate
126125
References
127126
**********
128127

129-
* :ref:`OEP-65: Frontend Composability <OEP-65 Frontend Composibility>`
128+
* :ref:`OEP-65: Frontend Composability <OEP-65 Frontend Composability>`
130129
* :ref:`OEP-65 Frontend Glossary <Frontend Glossary>`
131130
* :ref:`ADR-0002: Frontend App Migrations <Frontend App Migrations>`
132-
* :ref:`ADR-0003: Frontend Projects <Frontend Projects>`
131+
* :ref:`ADR-0003: Frontend Sites <Frontend Sites>`
133132

134133
Change History
135134
**************
@@ -140,6 +139,12 @@ Change History
140139
* Document created
141140
* `Pull request #598 <https://github.com/openedx/openedx-proposals/pull/598>`_
142141

142+
2026-07-13
143+
==========
144+
145+
* Updated terminology to match the ``frontend-base`` reference implementation: build-time composition of :term:`apps <App>` into :term:`Sites <Site>` via the :term:`Shell`, in place of runtime module federation. Renamed "Module Architecture" to :term:`Shell Architecture`.
146+
* Retitled from "Create a unified platform repository" to "Create a unified platform library" (and renamed the file accordingly), since ``frontend-base`` is a library.
147+
143148
2024-09-13
144149
==========
145150

0 commit comments

Comments
 (0)