doxa-maps/documentation/architecture
doxa-maps-88655c70 3a2cf0e8f2 Research Gallery: embed on someone else's page, in both modes
The gallery is going onto the DX-life research page, and nothing had tried
it on a page it didn't generate. From a second origin, a bare
<script> + <doxa-maps-spa> drew over the host's header, and 8 of 13 tabs
showed an error card.

Three causes, each fixed in the shell:

- No :host box. The layout root is position:absolute, so it anchored to the
  viewport instead of the element. :host is now a positioned block with a
  default height the host can override.
- A foreign page sets none of the globals a leaf page bakes. Every data call
  hit the host's own origin and got HTML back. The manifest now publishes a
  `runtime` block (apiBaseUrl + the public token every leaf already carries).
  The shell fills window.MAP_APP_API_URL / window.MAP_TOKEN only when the page
  hasn't set them, and forwards tk in profile-config.
- Nested elements resolved assets to <tree>/../assets, a sibling pool the
  publisher doesn't ship (404 live). The shell now forwards an absolute
  <tree>/assets. This also fixes the iframe mode, where Cities with Internet
  and Gospel Resources were failing the same way.

Also adds a `tab` attribute (plus ?tab=) to deep-link into one map, and a
`tab-change` event for the host.

check:gallery-embed drives every tab in both modes from a second origin. It
passes here and fails on the previous tree (7 findings).

EMBED.md documents the contract. The Traefik template now sends CORS for the
whole tree: live manifest.json answers without Access-Control-Allow-Origin.
2026-09-24 19:03:37 +00:00
..
app-wrappers.md Document why a gate cannot import plugin source, and stop teaching public binds 2026-09-22 17:40:11 +00:00
color-strategies.md consolidate docs into documentation/ and deployment shells into deployment/ 2026-09-21 23:23:23 +00:00
components.md consolidate docs into documentation/ and deployment shells into deployment/ 2026-09-21 23:23:23 +00:00
data-sources.md consolidate docs into documentation/ and deployment shells into deployment/ 2026-09-21 23:23:23 +00:00
embeddability.md Research Gallery: embed on someone else's page, in both modes 2026-09-24 19:03:37 +00:00
file-map.md consolidate docs into documentation/ and deployment shells into deployment/ 2026-09-21 23:23:23 +00:00
i18n.md consolidate docs into documentation/ and deployment shells into deployment/ 2026-09-21 23:23:23 +00:00
patterns-and-provenance.md consolidate docs into documentation/ and deployment shells into deployment/ 2026-09-21 23:23:23 +00:00
poster-generation.md consolidate docs into documentation/ and deployment shells into deployment/ 2026-09-21 23:23:23 +00:00
README.md consolidate docs into documentation/ and deployment shells into deployment/ 2026-09-21 23:23:23 +00:00

documentation/architecture/ — the deep end

Everything complex lives here, on purpose. The rest of the docs stay simple ("what it does"); when a simple doc says "full contract in architecture/…", this is where it points.

Doc What it holds
file-map.md every file, one line each, with the gotcha each carries
data-sources.md the api/ seam — connection contract + add-a-source checklist
color-strategies.md the color-strategy contract + legend wiring
components.md shared component catalog + shadow-DOM conventions
i18n.md the locale contract + add-a-language checklist
embeddability.md the generated per-map pages + manifest that make every map embeddable by default
app-wrappers.md the SPA shell: nav.js + PROFILES contracts, bun run shell pipeline
poster-generation.md the poster/preview generator pipeline
patterns-and-provenance.md the two multi-map patterns in depth + where the design comes from

Simple docs: ../why.md · ../tutorial.md · ../how-to.md · ../reference.md · ../explanation.md