Alexandria
Architecture

Adapters

Driving and driven adapters of alexandria-server and alexandria-client and the ports they implement.

Adapters


Server (internal/server/adapters)

AdapterKindRole
http_v1DrivingThe /v1 management API: bearer authentication, routing and compact JSON-LD projections.
http_pubDrivingThe /pub tree, routed by path shape, plus the embedded context and vocabulary.
http_uiDrivingThe embedded console under /ui/ (with the gui build tag).
httpxSharedProblem documents with @context, status mapping and the Date header driven by the hub clock.
schedulerDrivingPeriodic listing re-issuance and signing-key checks.
jwt_jwksDrivenToken validation A1–A5 with JWKS discovered through OIDC.
sqliteDrivenThe Store port; immutable tables protected by triggers.
blob_fsDrivenContent-addressed blobs on disk.
signer_fileDrivenThe Ed25519 hub key in a PEM file.
did_resolverDrivendid:key and did:web resolution.
fetch_httpDrivenProxy vocabulary upstreams, with timeouts, redirect limits and the host allow-list.
compiler_pocDrivenDraft compiler for the JSON draft format (DP-6).
compiler_dslDrivenDraft compiler for the YAML profile language.

Client (internal/client/adapters)

AdapterKindRole
proxy_dspDrivingThe traffic listeners. Uses the HTTP transport directly so forwarded bytes and headers are untouched.
status_httpDrivingThe admin API.
http_uiDrivingThe embedded console under /ui/ on the admin listener.
sync_timerDrivingTriggers synchronization, garbage collection and the state watcher.
http_hubDrivenHubAPI over HTTPS.
did_resolverDrivenHub DID document resolution.
evaluator_pocDrivenOffline JSON-LD context check and JSON Schema evaluation (DP-7).
store_sqliteDrivenContinuity, rules and agreements.
package_fsDrivenVerified packages in atomic directories.
eventsDrivenThe event sink.
metricsDrivenThe OpenMetrics registry.

Replacing an Adapter

Because use cases depend only on ports, swapping an implementation is a change in module.go:

  • compiler: poc or dsl selects the draft compiler.
  • -clock-file replaces the system clock with a file clock for deterministic replays.
  • Tests wire in-memory doubles from internal/testkit behind the same ports.

On this page