How I auto-enrich a brand database with AI on cache miss (Lovable + Claude API)

mamoru kubokawa
Most database designs have two ugly options: Manually seed thousands of rows (impossible for niche data like Japanese wholesale suppliers) Force users to enter everything (terrible UX, dead-on-arrival) Last week I shipped a third option in 30 minutes with Lovable: let the database grow itself . Every search that misses the cache triggers Claude API to generate a real, structured entry — and saves it. The next user gets an instant hit. Here's the exact pattern. The pattern in 4 lines async functi