andrewarrow.dev Email Andrew

Vibe coding.
Build with AI.

Lesson 2

Back to Lesson 1
  1. Time to pick hosting

    Remember at the start we talked about AWS (Amazon Web Services) and Google Cloud and CloudFlare and Supabase and Netlify and Vercel and the list goes on and on...

    You have to just pick one and go. Each has their own strengths and weaknesses. And they affect things like which database you'll store data in, how well your app will scale to 100 users and then 10,000 users, and price.

    Well it's time to pick and I picked CloudFlare. Google about their free plan vs the others and you'll see why. They offer the most generous amount of storage, data transfer, and tons of other things we'll need for the best price. And even when you outgrow that their $5 a month plan is also better than all the rest.

  2. Language and database

    Because we went with CloudFlare it does mean some other choices have been made for us. For example had we gone with Supabase we could use Postgres database which is very powerful. And if we had gone with AWS or Google Cloud we could have used golang or rust or any language we wanted for the backend. But with every decision are trade offs. All the great things about CloudFlare require us to use sqlite vs postgresql. And we'll write our backend in javascript/typescript because that's needed for CloudFlare workers. Not to worry though, even with sqlite CloudFlare will let our app scale to millions!

  3. Your first prompt

    Back in codex lets say something like: "hi codex! lets build the backend for a new website that will be deployed on cloudflare workers. Use hono and zod and make /docs and /openapi.json routes for all our new endpoints. Use sqlite D1 and setup the first migration to make a users table. Make just a few endpoints like create user and get user."

    That's it. That's all you need to say. Make sure the model is set on the best one and also set a medium or high level of effort. After that finishes you are ready for lesson 3.

    Lesson 3