AI Income LabJoin AI Income Lab ↗

Build guide · By · Published · Updated

Rebuild a Site in Codex with Vite and React

Diagram for the Codex site rebuild guide: write a prompt, generate the Vite app, then deploy on Vercel.
Prompt → Build → Deploy

Quick answer

On 21 May 2026 I rebuilt an agency site that started in Lovable. Claude Desktop wrote a Vite and React replication prompt. Codex generated the project, I previewed it locally, pushed to GitHub, and imported it on Vercel with the Vite preset. I said the first version took about ten minutes and the polished one about thirty. PageSpeed Insights showed 90 on mobile and 98 on desktop in that one lab run. I asked for a code review and did not read the results. The custom domain was left for later.

This is a Codex rebuild of my own site, not the general Codex verify-a-change tutorial. For how I split work with Claude Code, see Codex vs Claude Code. Description-footer affiliate links are not pasted here.

1. Write a Codex Vite and React prompt

Some tool links in this guide are affiliate links, so I may earn a commission or credit.

I reviewed the old Lovable layout, which I called clearly vibe coded, and asked Claude Desktop for a detailed prompt that replicates the site in Vite and React. I pasted that prompt into Codex and answered questions about copy and design direction. The long prompt was not read aloud, so it is not copied here.

2. Generate and preview

Codex created components, sections, styles and a written implementation plan: sticky nav, animated hero, pricing toggle, FAQ and a consultation modal. After the first local preview I asked for extra polish such as scroll highlighting and a mobile menu.

3. GitHub, Vercel and PageSpeed

I committed, pushed to GitHub, and imported the project into Vercel with the Vite preset. Then I asked Codex for a full code review of the live build and did not read those notes on camera. PageSpeed Insights in this take showed 90 on mobile and 98 on desktop. That is one lab run, not a field study. The custom domain and DNS step were left for later. I did not measure the old Lovable site on the same test.

Done when

What I didn't cover

Watch the walkthrough

Watch on YouTube: Codex Just Changed How I Build Websites!. Also on this site with notes: the watch page.

From the video

Lines from the video's transcript that this guide does not cover, lightly trimmed. Each time opens the video at that point. Read the full transcript.

FAQ

How long did the rebuild take?

About ten minutes for the first version and about thirty minutes of work in total, on 21 May 2026.

Why leave Lovable?

I found the old site clearly vibe coded and wanted a better design on my own hosting.

What were the PageSpeed scores?

90 on mobile and 98 on desktop in one PageSpeed Insights run.

Can I copy the replication prompt from this page?

No. Claude Desktop wrote it and I did not read it aloud.

Sources

You may also like

Written by . I’ve shipped software since 2013 and test AI tools on real builds for the AI Automation Station YouTube channel. Each guide shows the date it was last updated and lists the sources it relies on.

Build the next one with AI Income Lab

Step-by-step courses, reusable templates, and a community that answers when you get stuck.

Members get the Claude Code & Skills and Codex Tutorials & Courses lessons.

Join AI Income Lab ↗From $29/month. Cancel anytime.
Join 2,900+ members building with AI

Not ready to join? Get the weekly build notes: new guides and tested builds in one short email.