
Vibe coding this site: takeaways
Yelling at LLMs for fun and profit
This site is an experiment in vibe coding. Particularly vibe coding with Sanity and Astro. I did this mostly to just experience what it's like. Generally I recommend it.
Sure, the model makes a some mistakes, and there's a lot of backtracking and regressing when stuff gets hard. But I hadn't set up a typescript project with Sanity before and had never used Astro. Here's what I took away from it.
- The wildest thing to me is that all the models - o1, r1, sonnet, gemini - all know Sanity really, really well. They know our schemas. They know GROQ. The hard stuff people complain about when starting, but really appreciate when they get going. They can do that for you.
- The easy stuff mostly just works - refactoring Sanity schemas, a query and visual presentation with one line of prose is inspires awe. Some of the hard stuff works too - you can ask for a recursive packing algorithm that it just single shots.
- I had my legs up and saw 4 feature length movies while building this site. The Witch: recommended.
- Some of the medium difficulty stuff is super brittle. Feels like a combination of too little context and too many things going on. It becomes slippery and the model makes lots of mistakes. Git resets to last known good are frequent.
- The Astro client:island stuff is a good example - model gets confused about what's where - is this code on server or client? Can it use
window
? Where are my tokens? I can totally empathize. That stuff isn't just a bit hard. It's confusing. The abstractions aren't great. It does too much stuff at once. Isn't careful enough. Breaks stuff. Smaller changes made more defensively would work better. - Using Astro was probably not a great choice. It's new-ish, keeps changing and its templating is too flexible - native templates look like React, but aren't. The model got super confused. I got confused as well as I still haven't read docs.
- Just clicking on "sure, go for it" in Cursor's compose means you end up with lots of files that don't get cleaned up during refactor. At one point I read through it and deleted half the footprint.
- I also scrape all my bookmarks to Sanity with custom code for Substack, Apple Podcasts, Substack, web, Instagram, Twitter - I'd never bothered to do that if I didn't have lots of help.
- I still haven't read the Astro docs. I only have a vaguest idea of how it works.
- Also: Cursor is just so much better than VSCode. Deepseek r1 released in the period I was doing this and the wrapper may have been the moat all along.
Most of all though - I had fun. Seeing the model get the grid packing right on the first try. Refactoring models, queries and display in one go. Blows my mind. I also have way to publish now that's not inside bsky, twitter or FB. That feels good as well.