Conversation
Introduces a new build path for @openedx/frontend-base apps using npm workspaces. A default "frontend-site" is added alongside the existing MFE build, with its own multi-stage Dockerfile, Caddy routing, and site config files for both dev and production environments. New FRONTEND_SITES and FRONTEND_APPS filter hooks allow plugins to register additional sites and apps. The default site includes authn and learner-dashboard, and supports slot injection via FRONTEND_SLOTS.
This was referenced Apr 3, 2026
dcd7829 to
9f50915
Compare
Wire up dev mode for frontend sites, mirroring the existing MFE pattern: site-*-dev and site-*-prod Dockerfile stages, docker-compose dev services for mounted sites (with fallback to the mfe Caddy service for unmounted ones), image build/pull/push registration, and mount support via `tutor mounts add frontend-site-<name>`. Makes the dev server port configurable via the PORT env var. Also simplifies and cleans up the frontend-base implementation. Co-Authored-By: Claude <noreply@anthropic.com>
Remove the FRONTEND_SITES filter and all multi-site abstractions. There is now exactly one site, with its port, home role, repository, and version exposed as MFE_SITE_* config variables. Co-Authored-By: Claude <noreply@anthropic.com>
Route frontend app mounts to the mfe-site service workspace instead of the MFE path. Each frontend app gets a -src Dockerfile stage (empty for apps without a repository) as a build-time substitution point, replacing git clone with COPY --from. Frontend app takes precedence over MFE when both are registered for the same app name. Co-Authored-By: Claude <noreply@anthropic.com>
Use is_frontend_app_enabled() instead of get_frontend_app() so that disabled frontend apps don't override LMS URL settings. Co-Authored-By: Claude <noreply@anthropic.com>
Without it, plugin slots don't work in dev mode. Co-Authored-By: Claude <noreply@anthropic.com>
Let git use the default branch when unspecified. Co-Authored-By: Claude <noreply@anthropic.com>
Production runs behind a reverse proxy, so URLs should not include dev ports. Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Restructure app -repo/-src stages to always create both (fixing mount support for repo-less apps), DRY out site COPY paths via WORKDIR, serve site assets from / instead of /site, and add index.html fallback to the site catch-all handler. Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Rename the image from mfe-site-dev to site-dev and the docker-compose service from mfe-site to site. Extract the mount directory name into a SITE_MOUNT_NAME constant. Co-Authored-By: Claude <noreply@anthropic.com>
The previous node 24.11.0 (npm 11.6.1) was misresolving pre-release semver ranges for frontend-base workspace dependencies, picking alpha.4 instead of alpha.7. Co-Authored-By: Claude <noreply@anthropic.com>
Replace iter_paths with iter_legacy_paths, which yields only MFE names not superseded by an enabled frontend app. Frontend app routes are now handled by the site catch-all. Also fix TS errors in site utils.ts for possibly undefined config fields. Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds support for
@openedx/frontend-base, which takes a different approach to frontend architecture than traditional MFEs. Rather than independent webpack apps each with their own server, frontend-base uses an npm workspaces monorepo (via Turbo) where frontend apps are bundled together into a single site. The default site is defined in a newsite/template that ships with this plugin.The build infrastructure mirrors the MFE pattern closely: multi-stage Dockerfile with
-git,-src,-common,-dev, and-prodstages; image build/pull/push registration; andtutor mounts add mfe-sitesupport for both build-time (--build-context) and runtime (docker-compose volume) bind mounts.In dev mode, the mounted site gets its own
mfe-sitedocker-compose service runningnpm run dev:packages, which delegates to Turbo to watch workspace packages and hot-reload the site. When unmounted, it falls back to themfeCaddy service serving pre-built assets, exactly as unmounted MFEs do.Individual frontend apps that are enabled and mounted also get dev mounts into the same site service.
Frontend apps (
FRONTEND_APPS) are introduced as a new hook type alongside the existingMFE_APPS, with corresponding template helpers and LMS settings patches.Parent issue: openedx/frontend-base#146
TODO
LLM usage notice
Built with assistance from Claude.