AWS Builder Center

Vibe code website development and hosting

Use AI to design a website using Loveable. Enhance the ReactJS website into full-stack application using AWS Amplify. Use DynamoDB database, SES, Lambda, and Cognito for Authorization.

I wanted to experiment with Vibe coding of the website. I want to find out how fast I can go from prompting the AI, to releasing a full stack Web application on AWS.
Firstly, I didn't have a brilliant idea for a killer website. I have a cute dog, though, so I decided that she needs her own Blog website.  https://www.cocodelta.co.za/ 
I used Loveable to generate a simple website. After a few iterations, I was satisfied with the result. The website consisted of a Hero page, which also had a grid of blog entries. It also had a contact page where a user can send an email. Loveable generated the code in ReactJS and Vite, using Tailwind CSS.
I didn't want to use Loveable to host my website. I have some concerns about Vibe coding. My concerns are about scalability of the Application. Will I be able to scale cost effectively on the Vibe coding platform if my website becomes so popular that I need to scale to millions of users? Is security sufficient? I might want to add features, potentially Generative AI, and would rather migrate to a flexible, scalable platform now, than in the future. I want to retain control of the code, keeping it clean and understandable.
Luckily, Loveable allows you to export your code to GitHub as a ReactJS application. I immediately configured it into AWS Amplify hosting, and within a few minutes it was hosted and ready to go live on AWS S3.
I wanted to convert this to a full stack application. The blog entries should be in a database. Users should be able to send emails via AWS-SES (Simple Email Service). The owner should have a page authenticated by Cognito to create Blog entries. I want cost effective storage for my images. And I might have some brilliant ideas for future integration of my website.
The next step is to turn this into an aws-amplify full stack project. The AWS documentation helps with this.
Setting up the backend requires these steps:
1) Define your schema for the DynamoDB database. You can define multiple tables, and you can define relationships between tables. Amplify uses a GraphQL AppSync Interface for CRUD operations.
2) Define Authorization, which can be fine grained depending on requirements.
3) Define your Storage (S3 Buckets).
4) Code your Lambda functions that are deployed with this application. I coded a Lambda function to send an email from the SES service. You also have access to SDKs to enable you to interface with all other parts of the AWS ecosystem.
5) Then you deploy a Sandbox to give you the backend functionality on AWS that enables you to test locally.
Now that the sandbox is deployed, I make the changes to the front-end. This requires setting up forms to load the data and invoke actions for the CRUD commands. I added actions to invoke the Lambda function to send an email. The ReactJS code was modified to use the data from the database, instead of local data. I also set up environment variables for the email configuration.
The final step is to test and then deploy to production, with optionally a dedicated domain.
The bottom line is, how long did this take from prompt to production? I would estimate about 1 to 4 hours if you know what you're doing. There are many copy and paste opportunities, so that a developer can easily replicate similar code across projects. I also made some cosmetic changes and cleaned up some of the AI generated code, with the assistance of Amazon Q Developer. There are many pitfalls along the way, though. The first time around might take a lot longer!
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article