I'm a non-developer who runs a lead generation company that's making low seven figures a year. Over the past year, I've built a fully functional internal web platform using AI-assisted development tools. It's made up of two Next.js 15 apps, utilizes TypeScript with strict settings, Tailwind, and a Supabase backend, along with various other components. While I'm proud of what I've created, I also recognize there's technical debt accumulating, such as long files, duplicated logic, and some old experiments still lingering in the code. I'm seriously thinking of bringing in a senior engineer to perform a thorough audit, identify areas for improvement, and set up better coding conventions. Is this a wise investment at this point, or is it overkill? What key areas should I focus on first for the highest return on investment when it comes to cleaning up a messy codebase that is still functional?
5 Answers
I think it’s impressive what you’ve achieved without a traditional dev background, but you should prioritize security first. Bring in someone to audit things like your Supabase RLS policies; that’s critical to ensure your platform remains safe. Once that's squared away, then focus on tidying up the codebase.
First off, great job getting it to production! It might be wise to get a team rather than just one dev, especially if you think there's a lot to unravel. They could help identify risks in your architecture while also setting up better practices for the future. Don't let anyone talk you into a complete rewrite just yet, though; leverage what's working!
Honestly, bringing in a real engineer now could be a smart idea. They can help you identify the low-hanging fruit in your code and set up solid practices moving forward. Just be prepared that they might suggest a lot of rewrites since improperly structured code can create more issues later on. It's not necessarily a sign you failed; just the nature of working with DIY solutions.
Definitely, but make sure to find someone who'll help you clean it up instead of just starting from scratch. A good developer will know how to address the main issues without overturning everything you've already built.
You’re right to be cautious, especially with AI-generated code. It can lead to strange dependencies or gaps in security. So even if things are running fine now, a thorough audit isn’t a bad move. Just remember, a rewrite can be costly; maybe start with an assessment and take it from there.
You might not need a complete rewrite, but hiring an engineer for a focused cleanup is probably your best bet. Get them to consolidate those migrations and tighten up your RLS rules. The rest of the cleanup, like duplicated logic, can wait a bit since it won’t crash your operations immediately.
Right! Security should always come first. Plus, a good engineer will help you transform what you have into something cleaner without losing its functionality.

For sure! Having a professional handle security could save you from bigger headaches down the road. Just make sure they’re thorough about it!