doxa-maps/library/api
2026-09-11 18:50:31 +00:00
..
_registry.js doxa-maps — portable bundler for embeddable JAMstack maps 2026-09-10 01:53:07 +00:00
apiBaseUrl.js doxa-maps — portable bundler for embeddable JAMstack maps 2026-09-10 01:53:07 +00:00
DataSourceManager.js doxa-maps — portable bundler for embeddable JAMstack maps 2026-09-10 01:53:07 +00:00
README.md docs: simplify all folder READMEs (what's here + graphic + link); migrate complex reference to docs/architecture/{data-sources,i18n,components,app-wrappers,poster-generation}.md 2026-09-11 18:50:31 +00:00
sources.json doxa-maps — portable bundler for embeddable JAMstack maps 2026-09-10 01:53:07 +00:00

library/api/ — where map data comes from

One of the three customization seams (colors/, api/, i18n/). This one decides where people-group data comes from and how its raw fields map onto the field names the map reads. The components are source-agnostic — only the connection knows the source's shape.

  sources.json            DataSourceManager.js         the map
  ┌──────────────────┐    ┌───────────────────┐        ┌──────────────┐
  │ your connection   │──►│ fetch → normalize  │──────►│ map · legend  │
  │ (type, endpoint,  │    │ → cache            │        │ · detail card │
  │  fieldMappings)   │    └───────────────────┘        └──────────────┘
  └──────────────────┘     maps raw rows → system field names
  • sources.json is your surface — add a connection (csv, api, or rest-api) and set activeSource. No code.
  • DataSourceManager.js is shared machinery — you never edit it.
  • Import through _registry.js (SOURCES, getSourceConfig(), listSources(), …).

Adding or overriding a connection? The full contract (required fields, checklist, integration) is in ../../docs/architecture/data-sources.md.