https://github.com/fiatjaf/khatru would be a good approach
Looks like a useful foundation. Now I need someone else to write a tutorial so I don't have to think :-)
Maybe this could help you https://sebastix.nl/blog/run-a-nostr-relay-with-your-own-policies/
I assume I need to scroll down to "Khatru as a temporary alternative" and ignore everything above, right? Like a linux manual :-)