I’ve been out of a job since the beginning of summer and as the AI revolution is running at full speed while I’ve been away, I figured it was time to catch up a bit. Not having a real, in use codebase to start from was a bit of a challenge for me, but nothing I couldn’t overcome quite easily. (The reason I wanted one was that if I was in a real work life setting, there would be a code base that had been developed and mismanaged for years that I would have to learn to work with.) So what did I do and learn?
Getting something to start with
I started out, as many do, with a basic and vague idea of what I wanted to build. For the purpose of learning, I wanted something straight forward, but that still involved common application infrastructure. Being a member of an all female choir, the idea I eventually chose was a search engine for sheet music for all female choirs.
Having just attended a course in the design of AI agents where we were given a no limit access to such, my initial idea was to use Perplexity (an AI search engine) to handle the search behind a custom made interface. However, even for a hobby project like mine, that would not be feasible cost wise. And it turned out to be a bit over complicated to start with in terms of getting it working. This became evident in my first actual interaction with vibe coding:
Lovable
We’ve all heard of Lovable at this point, I figure. You just write what you want and then it generates an interface to look at and the code to support it. I told it I wanted a search engine for choir music and it gave me a search page for that. I told it I wanted to be able to search for music in multiple languages and it added support for that. Then I searched for Swedish music. Nothing. Tried Latin. Got results. Got curious. ”So how does it actually handle the search?”
Since I do have a bit of a technical background and have been working in software development for quite some time, I went into the code to have a look. The languages that were allowed in the search were hard coded. So were the responses. Lovable had generated a lovely front end, but I knew next to nothing about what was actually behind it. And the free tier of Lovable doesn’t allow the user to manually modify the code even if you can read it. Enter Cursor.
Cursor
At the course I had attended, another attendant I spoke to about this gave me the tip to use git as the way to use more than one tool for the development. I could connect git to Lovable and it would automatically commit and push changes there. I could then set up Cursor on my local PC, pull the project, do changes, commit and push. And then open it in Lovable again if I wanted (or so I thought – back to that later).
Working with the AI agent in Cursor is a bit like working with a very enthusiastic and positive newly graduated developer with dementia. You work on something for a long time one day, shut down the program, return the next day and it has no memory of what has been done before. There is probably a way to fix this, but my efforts so far have been unsuccessful. It can also end up in a loop where it tries something, fails, tries the same thing, gets reminded that it already tried that, apologizes and promises to try something completely different only to do the same thing again…
That said, it is very transparent in what it is doing and asks for permissions for most of it in a way I didn’t experience that Lovable did. I started out asking what the architecture of the Lovable app actually was like and it turned out to be very, shall we say, flat. For demonstrating the idea, it was fine. For actually running a scalable application, it was not. So I started exploring the alternatives in discussion with Cursor.
We landed on a solution where there should be a thin backend layer and a database in which information about songs along with links to the actual sources would be stored instead of running searches at the actual sources every time a user wanted to find something. The hypothesis was that the sources wouldn’t change much over time. To handle any such changes a regular check and update to my projects database would suffice. This solution would also leave me with a very common architecture where I would have to learn to handle a database as a part of a project as well. (I do have basic knowledge about databases, but could learn more about how they actually interact with backend code.)
Hosting the application
Since I do have my own website already I figured I might as well set up a sub site. I even set up a new database for that site before I started to worry a bit: Do I really dare to let an AI loose near the code of my actually working website? The answer was NO. But I did have enough space to set up a new domain and host it so that’s what I did. A clean slate with a clean database.
Cursor and I started working on the application locally, but since I wanted to get something up and running, I actually needed to get the backend and database in place. This is when I ran into some trouble: turns out my hosting provider does not allow for remote calls to their databases. Fair enough – that is a security concern, but at that point I actually wanted to be able to set it up and update it directly using code. Remember – I am no developer really – I’m just trying to learn.
I asked Cursor for alternatives and it came up with a few. A quick google later and I had rejected most of them. Another quick google and I found some other alternatives I presented to Cursor and asked for feedback on. Based on my needs and the cost (free tier!) I decided to go with Supabase. Since then, I noticed that it is the choice in many similar projects and even built in as an option to use in Lovable and Figma Make. Maybe it is the Baader-Meinhof phenomenon, but now I see it everywhere.
Supabase backend and database
The thing about Cursor is that it happily sets up services and installs software in the background. It does ask for permission, but it is easy just to accept everything it does. I honestly have no idea about what half of the things it has installed actually does – I just have to trust what it’s doing. And this leads me to another very important insight into the use of AI: you need to have at least a basic understanding about what you are asking it to help you with, because otherwise it can go wrong. Very wrong. But we’ll get back to that.
To communicate with supabase, it apparently needed to install some software from supabase. It initially didn’t work so I had to do some manual help. Here again it is like an enthusiastic junior: it won’t admit defeat until you really force it to. Instead it goes ”That didn’t work. Let me try this” ”That didn’t work either. Let me try something completely different” and will continue with that until you say enough is enough. Quite often it will end up in a loop as mentioned above where it just tries the same thing over and over and over…
Once we had overcome the initial communication issues, the communication with Supabase went relatively smooth. We developed something and deployed it. No probs. But there was something else that started to gnaw in the back of my mind.
So what happens next?
In the next post you will learn a bit about my findings regarding security, robustness, accessibility and actually designing with AI. And see that my unease was not entirely uncalled for.
