Yeah, exactly. I think that https://nrepl.org has plenty of documentation, and you can also check some of the code in cider-nrepl as a reference.
cider-nrepl