ATProto Lexicon Utilities
A couple of premises
- It's better to express lexicon in CUE, where we can be more expressive. From there we can generate the lexicon docs and much better SDKs for working with them.
- Do what you want (from Paul's post-ATConf blog post), herein lies a bunch of experiments to inform various discussions in ATProto
This is a new project, here's what the plan is
- CUE schema for lexicon
- Validate according to the spec
- Validate based on best practices
- Generate lexicon json
- (tbd) generate client/server/sdk in a TS/Go/Py
- Various existing lexicon and generated content
- Several popular app's lexicons and content
- Fork and add your own to reuse these utilities
- Several extensions to vanilla lexicon
- Versioning
- Edit History
- grafana/thema / schema lenses / Schema negotiation
- Module & dependency management
- SDKs for these extensions
- CLI wrapping the above
We'll write up how to design lexicon with our CUE schemas and utilities.
For now, poke around the ./design directory.
- CUE(lang) is a purpose built language for configuration, schemas, and data
- hof is a code gen tool and more powered by CUE. It already implements some of the more advanced lens like features too!
Ensure CUE and Docker are installed, as well as language runtimes (go, py, ts). Consider installing https://github.com/hofstadter-io/hof too, we may use it for code gen in the short-term. Long term the Flexicon CLI will handle code gen and much more
# fetch TS deps
pnpm i