Every project I work on, as a thought experiment, I like to think about how I might approach the project from scratch, knowing all the things I know today. Sometimes it leads to actual proposals on new features or architectural changes, based on those thought experiments, but rarely. Obviously it’s not a good idea to actually rewrite things, but it’s fun to think about.
For example, one thing that has come up repeatedly in the last year is thinking of ways to remove React/Vue/etc and the “front end” entirely. Not that it’s necessarily a bad thing, but it results in a lot of duplicated effort (validation, business logic, etc) and maintaining multiple presentation logics (API, front end, mobile apps). I’d probably explore using something like htmx combined with switching off of the Accepts header to return a JSON or HTML response. Or maybe rewriting everything in a language that can run (or be compiled to run) in the browser.
Anyway, knowing everything you know today about your current project, how would you rewrite it to avoid or solve your current pain points?