Here's a screenshot of a PyQt5 app I'm making. It renders LaTeX by calling latex and dvipng from a MikTeK installation.
I want to make this diagram tool that acts as a notebook and perhaps diagram chasing tool.
There's a problem though. How does the user specify the math symbols? Clearly the set of possible strings from a category theory book is much different from general math.
The app will have to do at least some category theory in order to be a tool you'd want to use. However representing all possible objects that would occur in a book seems daunting and error-prone.
I was thinking, maybe a \cdot could always mean that's where some morphism or functor composes, so in order to take the functor of a diagram, it's simple text replacement processing. That is an example of a simplifying assumption.
Please give me some ideas of what I could do as general mathematical language processing is way too difficult.

Perhaps you could work with the macros in the 'diagrams' package collection? Either have the user enter the relevant macros directly, or create an interface on top of those macros.