How openedx/frontend-template-application works
Project type and purpose
• This is a React-based micro-frontend template for the Open edX platform (“frontend-template-application”).
• Its goal is to provide a ready-to-use scaffold (including design tokens via Paragon, i18n support, feature-based organization) so teams can spin up new MFE components that plug into a devstack or Tutor-based LMS host.
File structure
• Top-level:
• Configuration & toolchain (.env*, .eslintrc.js, jest.config.js, webpack/module.config.js, Makefile)
• CI/CD pipelines under .github/workflows (lint, commit-lint, CI, version checks)
• docs/ (ADR decisions, how-tos, images)
• public/ (index.html shell)
• src/ (all application code)
• src organization:
• src/index.jsx + index.scss – application entrypoint
• feature folders under src/ following the Feature-Based Application Organization ADR (e.g., src/example)
• src/plugin-slots – extension point definitions (FooterSlot, etc.)
• src/i18n – internationalization initialization
• assets and styling under src/assets & src/*.scss
• Build & test: npm scripts (start, build, test), Webpack/Module Federation (via module.config.js), Jest for unit tests.
Key README insights
• It is a Template Repository (use “Use this template” to create your own MFE).
• Runs against Devstack or Tutor for backend LMS services.
• Relies on Node 18.x, Paragon design-token support, and the frontend-platform i18n module.
• Encourages feature-based directory structure and plugin-slot integration.
a. Main components
• Developer Workstation (git clone + npm start)
• Source Repository (GitHub)
• CI/CD (GitHub Actions workflows: lint, test, build, codecov)
• npm / Webpack build pipeline (npm run build → static asset artifacts)
• Development environment
– Devstack or Tutor (LMS backend containers)
– MFE Dev Server (Webpack Dev Server on localhost:8080)
• Production deployment
– Static asset host (e.g., CDN or LMS static files)
• Runtime in the Browser
– LMS Shell (host app)
– Micro-frontend container (Module Federation remoteEntry)
– Feature modules (e.g., ExamplePage)
– Plugin slots (FooterSlot extensions)
– i18n module + design tokens (Paragon)
b. Relationships & interactions
• Developer pushes to GitHub → triggers CI workflows → publishes build artifacts
• MFE Dev Server connects to Devstack/Tutor LMS (for API and shell)
• LMS Shell loads the MFE bundle via Module Federation at runtime
• Feature modules render into plugin-slots defined by the host
• i18n subsystem provides localized strings to UI components
c. Architectural patterns & principles
• Micro-frontends via Webpack Module Federation
• Feature-based folder organization (per ADR 0002)
• Plugin-slot extensibility
• Separation of concerns: config, build, src, docs, CI
d. Key technologies & frameworks
• React + ReactDOM
• Webpack (Module Federation)
• Paragon design tokens
• Jest + Testing Library
• GitHub Actions for CI
• Devstack / Tutor for backend host
• npm / Node 18.x