Codex rebuild of a Lovable site: Vite, React and Vercel
Watch on YouTube ↗ Subscribe on YouTube ↗
Written guide: Rebuild a Site in Codex with Vite and React
Rebuild an agency website that was first made in Lovable, using Claude Desktop to write a replication prompt and Codex to generate a Vite and React site. The first version runs in about ten minutes and the polished one in about thirty. It is pushed to GitHub and deployed on Vercel, with PageSpeed scores of 90 on mobile and 98 on desktop. The custom domain and the code review results are not finished.
Video summary
How to build a website with OpenAI Codex — from vibe-coded mess to production landing page.
The video covers 10 parts: -- Introduction and redesign goals, -- Reviewing the original website layout, -- Creating the replication prompt with Claude, -- Inputting the prompt into Codex, -- Codex generating the project files, -- Reviewing the Codex landing page plan, -- Previewing the local development server, -- Pushing to GitHub and connecting Vercel, -- Requesting a Codex code review on the live build, and -- Running a PageSpeed Insights performance test.
What this video covers
What you build
A Vite and React landing page with a sticky nav, animated hero, pricing toggle, FAQ and consultation modal, deployed on Vercel from a GitHub repository.
Tools used
Key steps
- 1:05 - Ask Claude Desktop for a detailed prompt that replicates the current site in Vite and React.
- 1:26 - Paste the prompt into Codex and answer its questions about copy and design direction.
- 2:18 - Watch Codex create the components, sections, styles and a written implementation plan.
- 5:35 - Preview the local dev server and ask for extra polish such as scroll highlighting and a mobile menu.
- 7:03 - Commit and push to GitHub, then import the project into Vercel with the Vite preset.
- 9:10 - Ask Codex for a full code review of the live build.
- 11:33 - Run PageSpeed Insights and read the mobile and desktop performance scores.
Not covered
- The results of the code review, which Mike requests but does not read out.
- Connecting the custom domain. The site runs on a Vercel domain and the DNS step is left for later.
- A measured comparison with the old Lovable site. The claim it would be slower is not tested.
- Accessibility, SEO and real visitor performance, since PageSpeed here is a single lab run.
In this video
- 0:00 -- Introduction and redesign goals
- 0:45 -- Reviewing the original website layout
- 1:05 -- Creating the replication prompt with Claude
- 1:26 -- Inputting the prompt into Codex
- 2:18 -- Codex generating the project files
- 4:02 -- Reviewing the Codex landing page plan
- 5:35 -- Previewing the local development server
- 7:03 -- Pushing to GitHub and connecting Vercel
- 9:10 -- Requesting a Codex code review on the live build
- 11:33 -- Running a PageSpeed Insights performance test
Questions and answers
How long did the Codex rebuild of the Lovable site take?
About ten minutes for the first version and about thirty minutes of work in total, according to Mike.
Why leave Lovable?
Mike found the old site clearly vibe coded and wanted a better design on his own hosting.
What were the speed scores?
90 on mobile and 98 on desktop in one PageSpeed Insights run.
Keep learning
Transcript
Hey there, welcome to the channel. In this video, I'm going to be completely redesigning my website for my AI automation agency. It was previously built by myself in Lovable, and I just don't really like the design. It's clearly vibe coded. It doesn't look that great. So, in this tutorial, I'm going to be redesigning it using Codex, which is now my favorite AI coding tool. I've recently switched over from Claude Code.
you'll see how fast we're going to be able to redesign the site and I'm also going to put it on its own domain using Vercel. So, without further ado, let's get into the tutorial. Please go ahead subscribe to the channel if you haven't already and I look forward to showing you how to redesign your website inside Codex. Hey there, welcome to the channel. In this video, I'm going to be completely rebuilding my website, automic.com.
Read the rest of the transcript
This is my AI automation agency which I built pretty quickly and lovable. You can tell right away that it's 100% vibecoded and I don't really like the design all that much. So in this case, we're just going to be completely recreating the website. I'm going to put it up on its own domain. I've just gone ahead and told Claude Desktop to create a detailed prompt to replicate the website built in Vite and React and Codex.
And what it did was it came up with this complete detailed prompt over here. So now it's just a matter of copying this and pasting it into Codex as I've already done over here. You can see I've pasted in the complete detailed prompt and now it's getting to work within a few seconds rebuilding my website. Just says, "One decision I need from you before I look at the design. Should I match the live homepage's current copy and section order as closely as possible?
Or should I follow your provided spec verbatim, even if that diverges slightly from what's on automoic.com? I'm just going to say diverge. And now it'll get to work building out the website. It's going to match the live homepage, current copy, and section order as closely as possible. And then it's just going to take liberty with the copy. And now it's also asking for the design proposal over here as well. Just going to enter in three here. And now it's going to use this design proposal.
And then we should be able to completely redesign the site using Vite and React instead of just a crappy lovable template. And it should be building out all of the files over here in my projects directory under Automoic. You can see it's now building out all of the files over here, including the CSS and also the TSX files as well. And yeah, it's getting to work over here. It's just going to install all of the dependencies.
So these are all of the node packages that it needs access to in order to rebuild my website. And it shouldn't take that long to build this out. Probably I would say about 10 15 minutes. So now within a few seconds, it is getting to work and creating all of these files that it needs to rebuild the website within seconds here. And this is one of the reasons why I like codec so much. It's just super super fast. It can do everything for you.
I've decided to make the switch over to Codex from Claude Code because it is just absolutely incredible what Codex can come up with. You can see it's creating all the files over here. We could take a look at them under source. It's got the components for the UI. So, it's built out all of those. It's also building out all of the sections for the website, as well as the layout, the footer, and the navbar, the libraries, and also the hooks over here, as well as the
assets. It's just cranking out all of the files over here. Don't mind this. This is my stock trading app. It's also building out a stock trading app while I'm building my website as well. So, we're just going to go ahead and minimize that. And yeah, you can see it's creating all the CSS. It's creating the Tailwind config file and it's just doing all of this within less than five minutes. So, it's not going to take very long to re completely recreate my website using codecs.
It's using the superpowers to come up with a full plan here. So, that's exactly what it's done. And if we want to take a look at that, we can come into Docs superpowers plans. And you can see here's the complete landing page implementation plan. Now obviously it's already built a lot of the files that it needs. This is the detailed implementation plan that it came up with using the superpowers skill which is built directly into Codex.
So now it says it built the automoic landing page in the empty vite app and it kept it aligned to the spec with a dark indigo violet design. I can always change the design scheme later. That's no big deal. with an animated hero workflow, sticky navbar, modal consultation form, pricing toggle, fact accordion, and all request requested sections. That sounds good. I would actually want to completely redesign it, but we'll see how it looks once it finishes here.
And now it's saying, it's asking me if I want to tune the page to be even closer to the live visual rhythm or add subtle polish, blah blah blah. So, I want to add some polish to it. So, we're just going to go ahead and select option number two. So, it's going to add the polish section spy highlighting in the sticky nav, a slide fade mobile menu, and scroll offsets. So, the anchor jump jumps land cleanly below the header.
I don't know exactly what that means, but it's just gone ahead and done everything for me here. And now it's just going to add all the polish and it's going to run the npm run build again. And then after that's done, we can just do npm rundev as it exists right here. So, I'm just going to click on localhost and we're going to open this up in my local dev server. And right away, I say that does look quite a bit better right off the bat.
It still needs quite a bit of work, but it definitely looks better than I would say than the the site exists right now. And it's got the pricing in here and everything, so I would need to connect that up. If I click on book a free consultation, it pops up nice looking uh dialogue right here to book a free call. So that looks great. I also like the fact section as well. It's very cleanly designed. Looks fantastic.
And yeah, overall I would say right away I like it much better than what I have now. This just looks kind of hacky and not very good. So ultimately I want to turn it into something like this. And now I can tell it to run the implementation plan as well. So if I want to fix this up even more, I can say run the superpowers implementation plan.
And it should be able to just pull in this file that we have over here and implement all of these changes as well. I'm not sure if it's actually gone ahead and implemented all of these. So that's the next step. And as you can see over here, it says the implementation plan is already fully run in this workspace. So it's already finished this. And now it's asking if I want to deploy it to GitHub.
So in this particular case, I'm going to create a GitHub which I can then push up to my Vercel account. I've already got the GitHub URL here and I'm just going to say get commit and push to that GitHub URL. And what that's going to do is just going to push it up to GitHub. And then I can also uh deploy it over here inside Versil as well. So all I have to do is click on create a new project.
And you can see it just pulled in Automoic right here, but it's it's still in the process of pushing it up to GitHub. And now it's done. So as you can see here, it committed and pushed to that particular URL. If I go ahead and refresh that, it now has all of my files right here that we've just created. This has literally taken about 10 minutes to completely rebuild my website. How amazing is that?
So now if I come over to Versil, all I have to do is import this particular project from GitHub. So I'm going to click on import and then we can just give it a name. So it's just it's just going to be called Automoic. And then the application preset I want to use Vite. In this case, it wasn't able to pull that in. We don't have to worry about any of the environment variables, I don't think, because it shouldn't have uh environment variables.
So, we're just going to click on deploy. And what that's going to do, it's just going to pull everything in from my GitHub repository, and it's going to start building the app so that I have a live version ready to go on its own domain name through Vercel. Now, if you're not already familiar with Vercel, it is the best platform, especially for deploying Nex.js JS apps. This is what my main software as a service is built in.
Tube analytics and it's also where my new website is going to be hosted as well. So you can see here, congratulations, you just deployed a new project. And now I can click on view deployment. And what that's going to do, it's just going to open up the website. So as you can see within about 10 minutes here, we've got our new website deployed on Vercel. And now I'm just going to continue building this out.
One of the things I like to do is a full code review. So I can say do a full code review and suggest improvements for design and functionality. It's going to do a full code review and it's just going to suggest improvements just like I told it to do. So we'll see what it comes up with and then we should just be able to implement those changes and push it back up to GitHub.
And then every time I push to GitHub, it's automatically going to deploy a new version on my Vercel account over here. There's my latest deployment. It's ready to go. It's in production mode. And if I click on this, I can see this is the domain automoic.app. And I can easily add my own domain as well. So I just come on down to domains and I can connect up my own domain or I can add an existing one.
So, if I wanted to connect this up to automoji.com, all I have to do is enter it in here, and it's going to be the production environment, and we're just going to save that. So, it should be able to automatically connect it up to Automoic, but I will need to do some stuff with the DNS over here, and then it'll be on automoic.com.
So, if you want to check out my new website once it's finished, I'll leave a link down below, and you feel free to book a free consultation call with me. we can discuss how AI powered automations can both save you time and money for your business. So, after some more time spent inside Codex about 30 minutes or so, you can see the website is really coming together nicely now and it doesn't look so clearly vibe coded anymore.
It's got the what we build section as well as some of the results and the yep results and then it's also got the clients here as well as the pricing as well. So, here's the pricing. So, when you click on one of these buttons, it will just pop up the form so that you can enter in your details and then the next step is going to be going to the calendar where they can actually book a call.
So, overall, I really like the way it looks and it is now live on Vercel. So, if you guys want to check out the website, if you want to book a free consultation call to discuss how AI can help your business to save time and money, then go ahead and go ahead and do so. The link is down below. Also, another really, really nice thing about the new website is that it is absolutely blazing fast.
I just did a page speed insights report, and as you can see here on mobile, it's a 90% for performance, green across the board, and then for desktop, it's 98%. So, it runs blazing fast. If I were to do that same speed test on my other website, it would probably be quite a bit slower because it's running through Lovable and this one is running on Vercel and they have some of the best servers in the world.
So, this is another advantage of building your own website out using something like Codex. With that being said, thank you so much for watching this video. Please go ahead subscribe to the channel. Take care. Stay safe. Peace from Thailand. Sign it off.



