Do you really need a server implementation for this? Surely you could achieve this with a browser extension that grabs queries which begin with "!" and then has a mapping table of postfixes to query formats?
I made `!` easier to type on mobile via double-space (double-tap SPACE to insert `!` similar to how macOS/iOS adds a period with double-space): https://whiz.leftium.com
Still a work in progress; I need to make the UI more intuitive: https://github.com/Leftium/whiz/
You can even configure this as your default search engine so searches from the omnibar work: https://whiz.leftium.com/go
Source code: https://github.com/Leftium/whiz/blob/main/src/service-worker...