12-Year-Old Developer Fixes Broken Referral System Using SQL Trigger on Android Phone
Harun, a 12-year-old self-taught developer, built KODA — an AI coding mentor app — entirely on a budget Android smartphone using Vanilla JS, Supabase, Groq, and Netlify. After noticing that his referral system had silently failed for three days, leaving all referred_by fields as NULL across eight users, he traced the bug to a client-side time window that rejected referrals for accounts older than 10 minutes. To fix it, he wrote a server-side SQL trigger in Supabase that automatically credits a referrer and grants Gold Mode status whenever a valid referral is recorded in the database. He bundled this fix alongside several other updates — including a home-screen install button and an upgraded AI tutor feature — to minimize deployment risk on his phone. Harun shared the experience as a lesson in reading database data as a diagnostic story and moving cross-user logic away from client code.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in