LexDNS resolves AT Protocol Lexicon schemas from NSIDs.
It turns names like app.bsky.feed.post into the DNS location that advertises the schema
publisher, follows the publisher’s DID document to its PDS to obtain the matching
com.atproto.lexicon.schema record.
Why I Built This
AT Protocol Lexicons are meant to be named, discoverable schemas.
I wanted a small resolver to add to Ibex that made that discovery path easy so I wouldn’t need to embed generated schema packages into every project.
Features
- REST endpoint for resolving an NSID to source metadata and the Lexicon document
- DNS-over-HTTPS TXT lookup for
_lexicon.<authority-domain>recordsdid=...TXT record discovery for Lexicon publishers- DID document resolution for
did:plcanddid:web - PDS lookup through the
#atproto_pdsservice - Schema fetch through
com.atproto.repo.getRecord
- Response links for the API result and original
at://source record - KV-backed cache with configurable TTL
- Small web UI for trying published Lexicons interactively
- CORS support for browser clients
Architecture
LexDNS runs as a Cloudflare Worker using Hono for routing & templating (JSX).
The resolver:
- validates the NSID
- converts its authority into the
_lexiconDNS name - reads TXT records through DNS over HTTPS
- resolves the publisher DID
- fetches the schema record from the publisher’s PDS.
Successful results are stored in Workers KV so repeated lookups stay cheap.
Status
LexDNS is live.