Architecture
Adapters
Driving and driven adapters of alexandria-server and alexandria-client and the ports they implement.
Adapters
Server (internal/server/adapters)
| Adapter | Kind | Role |
|---|---|---|
http_v1 | Driving | The /v1 management API: bearer authentication, routing and compact JSON-LD projections. |
http_pub | Driving | The /pub tree, routed by path shape, plus the embedded context and vocabulary. |
http_ui | Driving | The embedded console under /ui/ (with the gui build tag). |
httpx | Shared | Problem documents with @context, status mapping and the Date header driven by the hub clock. |
scheduler | Driving | Periodic listing re-issuance and signing-key checks. |
jwt_jwks | Driven | Token validation A1–A5 with JWKS discovered through OIDC. |
sqlite | Driven | The Store port; immutable tables protected by triggers. |
blob_fs | Driven | Content-addressed blobs on disk. |
signer_file | Driven | The Ed25519 hub key in a PEM file. |
did_resolver | Driven | did:key and did:web resolution. |
fetch_http | Driven | Proxy vocabulary upstreams, with timeouts, redirect limits and the host allow-list. |
compiler_poc | Driven | Draft compiler for the JSON draft format (DP-6). |
compiler_dsl | Driven | Draft compiler for the YAML profile language. |
Client (internal/client/adapters)
| Adapter | Kind | Role |
|---|---|---|
proxy_dsp | Driving | The traffic listeners. Uses the HTTP transport directly so forwarded bytes and headers are untouched. |
status_http | Driving | The admin API. |
http_ui | Driving | The embedded console under /ui/ on the admin listener. |
sync_timer | Driving | Triggers synchronization, garbage collection and the state watcher. |
http_hub | Driven | HubAPI over HTTPS. |
did_resolver | Driven | Hub DID document resolution. |
evaluator_poc | Driven | Offline JSON-LD context check and JSON Schema evaluation (DP-7). |
store_sqlite | Driven | Continuity, rules and agreements. |
package_fs | Driven | Verified packages in atomic directories. |
events | Driven | The event sink. |
metrics | Driven | The OpenMetrics registry. |
Replacing an Adapter
Because use cases depend only on ports, swapping an implementation is a change in module.go:
compiler: pocordslselects the draft compiler.-clock-filereplaces the system clock with a file clock for deterministic replays.- Tests wire in-memory doubles from
internal/testkitbehind the same ports.