If you have GPT-4 access, it is very likely you can access GPT Store (GPTs). Here are the major steps:
- Click "Explore GPTs"
- Search the third party app "Screenshot To Code GPT"
- Click "Start Chat"
- Upload a screenshot
- Wait for the application to finish generating results
- Copy code to a static HTML file
- Open the HTML file in browser to preview the website
A video for using "Screenshot To Code GPT" is used below:
GPTs_screen2code.mp4
Vercel, the creator of NestJS, also provides an AI tool for you to convert website screenshot to frontend code in React.
Here are the major steps:
- Go to the website: https://v0.dev/
- Upload the image
- (Optional) Choose either "Speed" or "Quality" mode
- Click submit to let the AI run
- After AI stops running, click "Code" button on top right to see the corresponding code
- A link is provided to install the created code using npx package manager locally (e.g., npx v0 wq23fn4sef)
- In your NextJS project, cd into your app folder, and install the v0 package by running "npx v0@latest init"
- Then, copy the command from the website (e.g., npx v0 wq23fn4sef)
- Choose the name corresponds to the AI generated component
- In your webpage, load the component.
- Use "npm run dev" to run the app locally, go to the page to see the generated component
A video for using "Vercel V0" is used below: