doxa-maps-cdn/server/utils
doxa-maps 5dea900183 Plugin Studio branch: the gallery and maps addresses are read per request, never baked
This branch sends readers to the Research Gallery (the public Plugin Studio
on its own subdomain) and loads the site's maps from that subdomain's /cdn.
Both addresses belong to the deployment:
  NUXT_PUBLIC_RESEARCH_GALLERY_URL  https://research.<host>/
  NUXT_PUBLIC_DX_MAPS_BASE          https://research.<host>/cdn/dx-maps

About 4,000 pages are prerendered, and a prerendered page carries the
build's runtime config, so an address read there is baked into the build.
One build could then serve only one deployment; the CDN branch failed that
way. So neither address is in nuxt.config any more:
- the server reads both from its environment per request
  (server/utils/dx-runtime.ts);
- GET /api/dx-runtime answers them, no-store. Every map (DoxaMapSlot via
  useDoxaMap, /research, /embed-test, and the static pages under public/)
  asks it first, then loads its bundle from that tree. The map's element is
  added only once the tree is known, and the map bundle's preload is added
  then, still while Mapbox downloads;
- every gallery link, the Research menu item, and the /regions and
  /countries index rules go to this site's /research-gallery?tab=&lang=,
  which 302s (no-store) to the gallery. It works without JavaScript, and a
  prerendered page names no host;
- old /js/doxa-maps and /embed/doxa-maps-build links are redirected per
  request by server/middleware/legacy-map-links.ts. They were build-time
  route rules.

No fallback host: the maps-dev and research defaults are gone. When a
setting is unset, /research-gallery answers 503 and each map says which
setting to set. Changing an address needs a restart, not a rebuild.
2026-09-29 05:09:37 +00:00
..
activity-logger.ts Implement CMS MCP 2026-04-29 13:06:54 +01:00
auth.ts init 2026-04-21 12:12:54 +01:00
cmsCache.ts Let categories have child categories for nested pages. (#6) 2026-05-21 06:00:54 -05:00
countries.ts Replace country pages with region dashboards (#23) 2026-09-07 11:49:24 +01:00
database.ts build tweaks. 2026-05-20 13:06:54 +01:00
dx-runtime.ts Plugin Studio branch: the gallery and maps addresses are read per request, never baked 2026-09-29 05:09:37 +00:00
email-templates.ts User invitation (#3) 2026-04-28 06:26:59 -05:00
email.ts replace mailgun with sendgrid for transactional email 2026-09-15 11:16:44 +01:00
glossary.ts carry glossary acronyms into translation prompts 2026-09-21 13:32:04 +01:00
openrouter.ts read the glossary from pray.doxa.life instead of a vendored file 2026-09-18 10:06:13 +01:00
rate-limit.ts init 2026-04-21 12:12:54 +01:00
rbac.ts init 2026-04-21 12:12:54 +01:00
renderTiptap.ts Central tiptap block definitions 2026-04-23 11:05:05 +01:00
sendgrid.ts replace mailgun with sendgrid for transactional email 2026-09-15 11:16:44 +01:00
site-settings.ts replace deepl with llm translation via openrouter 2026-09-07 16:30:48 +01:00
storage.ts Implement CMS MCP 2026-04-29 13:06:54 +01:00
tiptapFromMarkdown.ts Implement CMS MCP 2026-04-29 13:06:54 +01:00
tiptapLossyDetector.ts support vimeo video embeds alongside youtube in cms editor 2026-05-21 14:31:27 +01:00
tiptapToMarkdown.ts Implement CMS MCP 2026-04-29 13:06:54 +01:00
tiptapValidate.ts support unlisted vimeo and fix video display. 2026-05-22 10:15:30 +01:00
translate.ts restore source edge whitespace on translated fragments 2026-09-07 16:56:39 +01:00
urlValidation.ts Implement CMS MCP 2026-04-29 13:06:54 +01:00