It only fits about half your criteria, but I'm liking the vscode extension FOAM. https://foambubble.github.io/foam/
it's basically a clone of Roam Resarch as a vscode extension that uses Markdown.
It's markdown, has a desktop app (vscode), since it's just markdown you can put it all in git with easy diffs, vscode allows you to search the entire project for words, it has tags. It even has a window to see your notes as a star map where you see the links between the different markdown files, but they also recently added tags to that starmap.
You also get to use other extensions compatible with markdown like render inline plantuml and stuff like that, which is what is the nicest about it being markdown.
If you're serious about making your own, I would consider contributing to FOAM's project instead.