I'm very interested in improvement suggestions or comments you may have (just reply to this comment).
For classification and visualization I prefer tags (not necessarily mutually exclusive) rather than categories (too rigid and therefore arbitrary and therefore hard to keep consistent), but then the database management becomes more complicated (need a transactions-tags table or equivalent).
I want to automate the classification as much as possible, so I set up merchant-tags, which are automatically applied to all matching transactions. Again, this means managing a merchants table. It turned out that both the number of repeat merchants is high (so lots of patterns to maintain; these are stored in the DB as part of the merchant record, rather than in the code) and the number of novel merchants is high (so still spend a lot of time on the manual classification).
Part of the motivation for the above complexity was a vision of some kind of dynamic, auto-generated, multi-level breakdown of cost categories. For example, I might want to see a "date night" tag in both food>dining>date night, and entertainment>date night.
Anyway, all the above complexity was fragile, and too much work on top of the manual classification. A few years ago something in the DB broke and I just didn't get around to fixing it. I probably need to restart with something simpler.
Also, I'm considering trying this: https://lunchmoney.app/
+1 on restarting with something similar. If you can get away without a db it might be easier