Architecture decision record · ADR-0006

Capability interfaces and defineMeridian

@meridian-ts/core defines one interface for each capability: geocoding, places, routing, elevation, timezone, staticMap, ipLocation.

Status
Proposed
Deciders
Joe Gaudet
Created
Updated
PRD
PRD
Related
None

Context

Geocoding, places, routing and other services come from many providers with different APIs. The application must select providers in configuration and change them with no change to its components.

Decision drivers

Not recorded in the original ADR.

Options considered

Not recorded in the original ADR.

Decision

  • @meridian-ts/core defines one interface for each capability: geocoding, places, routing, elevation, timezone, staticMap, ipLocation.
  • Each provider is one package that exports a factory. The factory result implements the capabilities that the provider has, and a supports list.
  • defineMeridian({ geocoding: photon(), routing: stadia({...}) }) gives a plain object that the application imports.
  • An adapter calls REST with fetch. It does not use the provider SDK.
  • Results have normalized types (Place, Route) and a raw field.

Consequences

  • No Ember service. A test passes a fake object.
  • One provider can serve one capability and a different provider can serve a second one.
  • A provider feature that the interface does not have is available through raw only.

Confirmation

Not recorded in the original ADR.

Interview record

Each question of the interview with its answer and its source. A fact from the code or a document, a question that the author did not ask, and an assumption are rows too.

QuestionAnswerSource
Where does the text of this page come from?From the Markdown file docs/adr/0006-provider-layer.md at commit ece53da. The text of each section is the text of the Markdown file. A section that the Markdown file does not have says so.Document: docs/adr/0006-provider-layer.md

Changelog

DateAuthorChange
2026-12-02Joe GaudetStatus in the Markdown file: Proposed (plan, 2026-12-02). M0 confirms it.
2026-12-02Joe GaudetCommit bca5c8f: Add the plan and the decisions for Meridian
2026-12-04Joe Gaudet (agent)Converted from docs/adr/0006-provider-layer.md to this page. The text is the text of the Markdown file.

The adr skill of skillsaw wrote this page. The HTML in this file is the source of truth. The diagrams are the Mermaid sources in it.