- ShareButton resolves its link from where the bundle is hosted (profile-config.shareUrl -> embedBaseUrl -> window.MAP_EMBED_BASE_URL -> the bundle's own script URL); profiles pass tree-relative embed pages, so links work in the playground, on doxa.life and on any CDN - Generated leaf pages try token endpoints in order (override -> configured absolute URL -> same-origin) and only then offer the paste-once box; build config points at the canonical https://doxa.life/api/maps/token - Dev playground extracted from vite.config.js into internal/playground/{discover,render,dev-plugin}.mjs; serves /assets/* like the built site so data-driven maps initialise; passes assetsBase + shareUrl to every element; header ladder with a Start-here primer and the five kinds of mounting files (single-element, preset-element, multi-view-element, composite-element, app-shell) - New gates: smoke:playground (every element boots, with status text + data diagnostics), smoke:share (Share URL resolves and reopens the same map), sync:dropin (mirror public/ into a host checkout, never credentials), deploy:dev (build + sync) - MapToolbar + ShareButton on every map profile; UPG-100 composite (map + prayer lists) on the pane layout; shared --map-radius token consumed by the legend components - docs/reference.md: profile types table, profile-config assetsBase/shareUrl/embedBaseUrl, gates |
||
|---|---|---|
| .. | ||
| api | ||
| colors | ||
| components | ||
| composables | ||
| constants | ||
| data | ||
| i18n | ||
| scripts | ||
| stores | ||
| styles | ||
| utils | ||
| index.js | ||
| ProfileLoader.vue | ||
| README.md | ||
library/ (@map) — the shared map template
The other half of the architecture (see ../app-profiles/README.md):
every map in app-profiles/<your-map>/ composes the reusable, parameterized pieces that live here.
Fix something here and every map benefits on the next build; break something here and every map
breaks — read components/WARNING.md before touching shared pieces.
| Folder | What lives there |
|---|---|
ProfileLoader.vue |
The root of every bundle: parses profile-config, loads the profile, provides the stores + config |
components/ |
Shared UI — map, legends, controls, popup (PeopleGroupDetail), tables, charts, hints (README) |
composables/ |
Shared logic — map engine (useMapInstance), provider switch, shadow-DOM styles, theming |
stores/ |
Per-instance Pinia stores (ui / map / data) — provided by ProfileLoader, injected by children |
api/ |
Data-source registry (sources.json) + fetch layer — the JAMstack runtime wiring |
colors/ |
Color sets maps opt into via profile-config.colorSet |
i18n/ |
The shared string catalogs (all maps speak the same languages) |
data/ |
Small shared datasets baked at build time (big served data lives in ../data/) |
constants/ |
Shared constants |
scripts/ |
Maintainer pipelines (posters, research) — not part of any bundle |
The rule of thumb (same as WARNING.md): custom code in your app-profile, reusable code here — and things only move from the first to the second once they've earned it.