doxa-maps-cdn/embeddables/micro-frontends
corsacca 0262bb4219 sync all ten site languages with the glossary
- site strings, map widget locales and /terms editions for ar, de, es,
  fr, hi, it, pt, ro, ru and zh
- patch the standalone map bundle in place (it has no build profile) and
  rebuild the two profiled bundles from the updated source locales
- fix defects the sweep surfaced: the ru vision headline read "all
  unmarried people will be married by 2033", ro used popor (nation) as
  the people-group label including the homepage h1, and ar inverted
  "moves from unengaged to engaged"
- correct en.ts, which claimed UUPG and WAGF stay unchanged in every
  edition; es ships GENANC/FMAD, pt PNANE and de UVG/VUVG
- render the filter dropdown's empty-state through i18n, so the
  no_options translation it already computed reaches the component
2026-09-22 09:30:34 +01:00
..
1040-maps sync all ten site languages with the glossary 2026-09-22 09:30:34 +01:00
README.md Maps: Fly, share, bug fixes (#8) 2026-05-28 10:13:51 -05:00

micro-frontends/

Full-application-sized custom elements (Vue + Vite) that bundle into single IIFE files and register as custom elements. Not to be confused with web-components/ (small/single-purpose things).

What lives here

  • _template/ — shared blueprint: components, composables, config loaders that every micro-frontend imports from. The leading underscore marks this as "not a shippable micro-frontend."
  • <name>/ — one folder per micro-frontend. Each has its own package.json, vite.config.js, src/. Built output goes either:
    • ../../public/js/<name>.iife.js (public — served at /js/<name>.iife.js)
    • ./app/<name>.iife.js (private — stays inside the widget, never served)

Naming

  • No -mfe suffix on folder names. The parent micro-frontends/ folder makes the category clear.
  • Custom-element tag name matches the folder name in kebab-case (e.g. <doxa-simple-map>).

Build

cd micro-frontends/doxa-simple-map
npm install
npm run build

Build output lands at doxa-life/public/js/doxa-simple-map.iife.js. Nuxt serves it as a static asset; any external site can <script src="https://doxa.life/js/doxa-simple-map.iife.js">.

Sharing via _template/

Each widget's vite.config.js adds an alias to the shared blueprint:

resolve: {
  alias: {
    '@':         fileURLToPath(new URL('./src', import.meta.url)),
    '@template': fileURLToPath(new URL('../_template/src', import.meta.url))
  }
}

Then import in code:

import Legend from '@template/components/Legend.vue'      // shared
import Profile from '@/app-profiles/doxa-simple-map.vue'   // local to this micro-frontend

Vite traces imports + tree-shakes — each micro-frontend bundles only what it actually imports.

See also

  • web-components/ — smaller, single-purpose custom elements.
  • doxa-life/public/js/ — where public bundles are served from.