I have been contracting for a startup for a couple of years now and have built them a pretty substantial system - this includes various cross-platform mobile apps, landing pages, admin panels, dashboards, API's and a ton of background jobs processing GB of daily data updates (along with constant normalisation of this data and processing of various user events with it). This system is basically the entire product and supports a dozen or so staff, turning over a few million per year.<p>Now, all that sounds faintly impressive as a one-man job. Not exceptional but it's decent enough. However I know what's behind the scenes: lots of PHP code on old frameworks, no tests, super hacky code in a lot of places and no cohesive overall architecture or design docs to speak of. Some of this I can explain away given time constraints - everything is urgent (yeah, I know), general startup needing to move super quickly and so on, but the rest of it is myself.<p>I sometimes justify this to myself as tiredness or burnout and just not having the energy to go the extra (required?) mile - but whether that's true or not...<p>However, now we are at a point where new recruits are going to be coming in and I can feel my days are numbered. One look at some parts of the codebase and I know what will be said.<p>What would you advise in my situation? There's just no way I have the time to refactor and update everything (2 new apps need be built!) - if indeed I have the full ability to do so. Should I just accept the inevitable and start looking for new work? I've seen new devs come and immediately declare all code terrible and push for rewrites too many times to not expect it, but maybe I've just been unlucky?<p>Or am I overthinking this? Any perspective from those who have been in a similar position would be most appreciated - or indeed a founder who has been in this situation. TIA.