In part one of my story about my vibe coding experiment we got a first design and set up a deployment pipeline for my music search application. We ended with a vague feeling of unease that something was missing. In this part, we will learn what it was and also a bit more about security, robustness and accessibility testing with AI. So let’s just dive in where we left off: with my concerns.
Major security issues
Since I could see the code and had to do some manual steps to enable the communication, I noticed that I had been asked to paste all the login details needed into an environment file. And I knew the project was synced with github. So what would happen if someone else actually downloaded the project from there as it was set up as a public project? I asked Cursor about it.
Yup. Major security issue detected! By me. Not Cursor. If not specifically asked to do so, Cursor does not consider the security of what it is developing one bit. Cue major code changes and changes of passwords not only at Supabase but also my hosting provider as those had also been exposed.
Lesson learned: don’t trust a vibe coding tool to consider security when generating code. It is all up to you.
The need for robustness
In the conversation with the other course attendant I mentioned earlier about vibe coding using AI, we agreed that the good practices from ”regular” coding also must be applied there. Based on my experiences so far, having good coding practices is even more important when vibe coding than otherwise. What I mean by that is stuff like documenting the code and working test driven. When you personally write the code by hand, you do understand what it does. If someone else does it for you, finding an issue with it could be very time consuming and difficult. Hence, documenting it is important.
Both Lovable and Cursor happily update large portions of code based on, at best, vague prompts from the user. This can have big effects you don’t find out until much later if you are not careful. Hence, working test driven and ensuring tests are run regularly is important.
I asked Cursor about this and it installed something that apparently runs tests upon both commit and push. It also checks test coverage. So that’s good. But here’s the kicker, it didn’t suggest working like this itself and it tries to avoid it when it can. If I ask it to commit it sometimes tries to skip the tests entirely or, if there are issues found, asks to commit and push the code anyway and ”deal with the issues later”. I know I’m dealing with a non sentient piece of software, but I still feel like a strict parent forcing it to do its homework before it gets to go out and play. I guess there is some configuration file somewhere where I can specify the importance of both security and robustness, but given that these tools will be used by beginners, it would be nice if a bias towards robustness and security was built into the tool itself.
Getting back to Lovable
As I said earlier, the plan was to work on the backend in Cursor and front end in Lovable. When I started out, I generated the base code in Lovable and then went into Cursor. During the process, multiple issues in working with Cursor had us strip down the front end to the very basics, i.e. remove everything basically except for the title, search box, and results. In addition, most of the styling was also removed. This allowed me to focus on the backend issues with the project setup rather than the functionality before adding complexity to it. However, removing all this made Lovable a bit… confused… It did NOT like what we had done with the place so to speak. To get a better understanding of exactly what parts it had issues with, I asked it to look at the code and give me feedback. Interestingly, the feedback was not only on the format of the font end code – it also identified yet another security issue where login credentials were stored in plain sight. Since this was not a front end issue, I copied the feedback and had Cursor fix it before pushing the code again.
A short interlude with accessibility
All this talk about testing made me think of another aspect that should be tested regularly: how accessible the application is. I asked Cursor to help me with this and fed it with the url to the WCAG 2.0 specification. It seems like I wasn’t the only one who had this thought before because not only did it write its own tests (very basic and not very good to be honest), it also installed some kind of testing tool to include in the other set of automatic tests run upon commit and push. It did require some iterations though as getting them to set up a server with the application and run various browsers in the background did not work the first time the tests were run. Did it find any accessibility problems? Yes. Did it improve the accessibility of the very simple app. No idea to be honest. It checks for obvious things like if there are language attributes, titles, if it’s navigational by the keyboard etc. However, if the alt text and such like actually makes sense is something I doubt it can test (yet).
Using Lovable to get design suggestions
Once I was satisfied with the deployment pipeline and test coverage, it was time to work on the actual application. I found the design generated by Lovable to be a bit dull so I went to redo it. It got even worse. I figured, why not try out some other AI tools to get some inspiration. First up Figma Make. It gave me a design that was not as bad but the thing with design is that you shouldn’t just go for the first thing that shows up – you should come up with alternatives. This to be able to go beyond the first idea and hopefully end up with something even better. The thing with both Lovable and Figma Make is that they take a prompt and then spit out one result in full with code and all. You cannot ask them to provide a couple of ideas to just look at and choose from even if they are not functional.
While trying to get new design suggestions in Lovable, I noticed that what it showed me and how it described the designs it generated differed quite a bit. At first I thought it was just crappy at describing, but then I got a bit suspicious. Could it be that the switching between Cursor and Lovable didn’t work as well as I thought it should? A quick check using Cursor to get the code from git confirmed my suspicion: Lovable did update the code as it said it would, but it couldn’t display it for some reason. At that point I decided to stick to just one tool to edit the code for now: Cursor.
Getting to a decent design
Even though I liked the styling Lovable apparently had provided, I wasn’t too happy that it had introduced buttons and other elements into the interface that actually didn’t work. In addition, there were no tests written for the new code. Hence, I asked Cursor to keep the styling, remove the new functionality, and write tests for what now wasn’t covered. It actually turned out pretty well. The lesson learned by this is that it seems fine to start out with one tool and switch to another early in a project, but the more complex it gets, the smaller the chances are it will actually continue to work to do the switch back and forth. No surprise there really. I just wish there was a tool that allowed for the amount of control Cursor provides (even though I don’t understand half of it) while allowing visual edits and feedback the way Lovable and Figma Make does.
Final words(?)
So this is where my story ends. With a search page, a results page with functions and a database full of links. Or who am I kidding – of course I will continue playing around with this! There are still improvements to be done and things to learn. But this is where I leave off for now. Maybe there will be a part 3 of the story at some point.
I leave you with a summary of what I learned from this experience in the hope it will help you with your own experiments in AI land:
- Avoid using AI for something you know nothing about. See next point.
- Solutions suggested by the AI are not always the best. Check for alternatives if you suspect there are better ones. At least when there is money involved, e.g. for hosting, services etc.
- Git integration in the tools is a neat feature! It provides the flexibility to switch tools if you want to or access the code in whichever way you like.
- Cursor’s lack of memory, especially after application restart, is a major source of frustration!
- So far, it seems the AI coding tools available are not biased towards good coding practices such as test driven design or good documentation. It’s up to you to get that going.
- AI coding tools will not take security into account when setting up projects or writing code. Your login details etc. might get exposed and you end up in trouble. If you do, you can’t really blame the AI as it is your responsibility to make sure what you deploy online is secure.
- The AI tools for design I’ve so far tested are currently lacking in supporting the design workflow of coming up with multiple ideas before getting to one to continue with.
- Switching between AI tools once the project gets more complicated is not recommended.
And if you actually want to see what the application currently look like, go to https://ssaasearch.se . If you are curious about the actual code, you can find it at https://github.com/nannis/choir-music-search.


