In my experience writing web apps for many years (frontend and backend), you either (1) start off with an existing framework, (2) write your own, or (3) end up with a mess.
You really shouldn't be doing (2) unless you've had several go-arounds with (1). (3) is, of course, undesirable.
You really shouldn't be doing (2) unless you've had several go-arounds with (1). (3) is, of course, undesirable.