A magnet generator for a friend
Our chief creative announced he was leaving. I built a magnet generator where every team member entered the nickname he gave them, the absurd profession he invented, and their photo - and got back a ready-to-print magnet. What I planned as a one-week project took two months. Every failure taught something new about prompt engineering, edge functions, and AI that improves itself. We printed the magnets and hung them on a board I designed to look like a fridge. Evia was surprised - and maybe slightly regretted leaving.
The spark
Our chief creative announced he was leaving. The team gathered to think of a farewell gift - an engraved pen, a wine bottle, a gift card. Every option felt like a gift for a generic person, not for Evia.
Evia is one of the funniest people I have met. He gives a nickname to everyone who crosses his path, and invents a profession for them - 'emotional consultant for cats', 'component builder coach by weight'. I thought about all those nicknames, all those years, and it hit me: magnets. Everyone on the team, with their nickname, their profession, their face - framed like a magnet that could have come out of a machine at a 90s Israeli market.
I did not have a persona. I had Evia. And that made every decision - tone, aesthetic, humour - immediately obvious.
The chaos
I planned a week. It took two months.
I had never written a line of code. I tried several vibe coding tools and chose Lovable - and built the entire project alone.
First version - the simple idea that did not work. I wanted everyone to upload their photo, remove the background, and stick it on the magnet. I asked an AI model to return a transparent PNG. It returned a checkerboard pattern - a 'drawing' of transparency inside the image instead of real alpha. At best. At worst it rotated the figure 90 degrees.
The pivot - the bug does not need a solution, it needs cancellation. Instead of continuing to fight background removal, I asked a different question: what if we do not photograph real people at all? I asked the model to draw a cartoon in 90s Israeli style - thick outline, flat colours, exaggerated faces. Drawing on a solid green background is much easier to cut than a real photo. The pivot to cartoon did not fix the bug - it eliminated the need for it entirely.
Unplanned bonus: people felt less exposed. No one had to share a real photo of themselves.
The prompt as a design document. Every visual failure became a new clause in the prompt. The cartoon came out sleepy - added an orientation rule. Text covered the face - added area restrictions. The figure wore a green shirt and chroma-key cut off her body - added a forbidden-colour list for clothing. In the end the prompt was a 40-line document: palette, font style, figure placement, accessories by profession. Every line was a scar from a version that did not work.
When a third party falls - bring it inside. I relied on Replicate for image processing. Credits ran out, the API started returning errors. I wrote a standalone edge function that does all the chroma-key internally - including handling green spill at the edges of faces. Alongside it I added retry with backoff on errors and format detection: HEIC from iPhones, JPEG instead of PNG - each gets a clear message instead of a silent crash.
Kill the bug by killing the need
The background removal failure was not a problem to solve - it was a signal that the entire approach was wrong. The pivot to cartoon did not fix the bug, it cancelled the need for it.
Every visual failure became a prompt clause. By the end the prompt was a 40-line design document. The AI does not read minds - it reads instructions, and you are responsible for every missing instruction.
The abandoned magnets taught more than the approved ones. I added download and send-to-admin buttons not just because I wanted to see what was sent - but because I wanted to see what was not sent. The magnets that were abandoned taught me more than those that were approved.
The product
The form: name, phone, profession, and optional description. With chips of examples you can choose instead of thinking. Short enough that it does not feel like work.
The loading screen: generation takes 10-20 seconds. Instead of a silent spinner, I wrote rotating messages in a style like: 'trying to explain to Saharol what a profession is...', 'preheating Evia's oven...'. The wait time became the most branded moment in the product. Everyone quoted those messages.
The magnet: download and send-to-admin buttons. Not just because I wanted to see what was sent - but because I wanted to see what was not sent. The abandoned magnets taught me more than the approved ones.
The learning loop: an edge function running in the background, comparing sent magnets against abandoned ones, extracting design insights and writing them back into the prompt. The prompt improves itself over time - without human intervention.
First version: an admin panel that showed what the AI had learned. I looked at it once and deleted it. The loop does not need an audience - it needs to work.
What I'd take into the next one
A technical bug is sometimes a sign that the entire approach is wrong. The background removal problem was not a problem to solve - it was a sign the entire approach was wrong. The pivot to cartoon did not fix the bug, it eliminated the need for it.
Building for a specific person is an advantage, not a limitation. I did not have a persona. I had Evia. And that made every decision - tone, aesthetic, humour - more obvious than any product requirements document I have ever written.
The prompt is a design document. Every visual failure became a new clause. In the end there were 40 lines describing palette, orientation, forbidden colours, font style. The AI does not read minds - it reads instructions, and you are responsible for every missing instruction.
I built the entire project in Lovable without writing a single line of code. It was my first experience with vibe coding - and not my last.