How adanyc/ng-micro-frontends-native-federation works
Project Type and Purpose
• This is a micro-frontends demo built with Angular and Webpack Native Federation. It contains three separate Angular applications in one repo:
a. Shell (the host/orchestrator)
b. Micro-Frontend “Mars” (remote)
c. Micro-Frontend “Venus” (remote)
• The Shell dynamically loads the Mars and Venus frontends at runtime via Webpack Module Federation.
File-Structure Analysis
• Top-level folders:
• ng-shell – the host application (“shell”)
• ng-mfe-mars – remote “Mars” application
• ng-mfe-venus – remote “Venus” application
• Each app has:
• angular.json, package.json, tsconfig.*.json
• federation.config.js – Webpack Module Federation settings
• src/ (standard Angular sources: bootstrap.ts, main.ts, app folder, index.html, styles.scss)
• Shell’s public/federation.manifest.json plus each remote’s federation.config.js define remoteEntry URLs and exposed modules.
• In src/app:
• app.routes.ts – defines host routes for loading remotes
• micro-frontend utilities (connect-router.ts, create-micro-frontend.ts)
• shell folder (in ng-shell) contains loader logic and location-strategy adaptations.
Key README Insights
• Shell orchestrates micro-frontends via native federation.
• Mars and Venus run standalone (for local dev) and as remotes when federated.
• Each app exposes a set of Angular components/views (atmosphere, volcanoes, planet view).