Food Label Maker
I joined as tech lead for a US FDA-compliant label SaaS serving 18,000+ businesses. Over the year, I fixed a 3.4-second performance bottleneck that was degrading with growth — and reverse-engineered the export formats of the top 5 competitors to build a migration pipeline that drove 700× new customer acquisition and brought in large businesses for the first time. انضممت كقائد تقني لمنصة SaaS أمريكية للملصقات الغذائية المتوافقة مع FDA تخدم أكثر من ١٨٠٠٠ شركة. على مدار عام، أصلحت اختناقاً في الأداء بلغ ٣.٤ ثانية كان يتفاقم مع النمو — وهندست عكسياً تنسيقات تصدير أبرز ٥ منافسين لبناء خط استيراد دفع اكتساب عملاء جدد بمعدل ٧٠٠× وجلب الشركات الكبيرة إلى المنصة للمرة الأولى.
The Situationالسياق
A growing platform with two problemsمنصة متنامية بمشكلتين
Food Label Maker helps food businesses in the US generate FDA-compliant nutrition labels. By the time I joined, the platform had grown to over 18,000 business customers — and was struggling to keep up. Label generation API calls were timing out at 3.4 seconds, degrading with each new customer cohort. At the same time, acquisition was constrained by a structural market reality: most food businesses already had their product data locked inside a competitor's system, and migrating it manually was painful enough to keep them from switching. تساعد Food Label Maker الشركات الغذائية في الولايات المتحدة على توليد ملصقات التغذية المتوافقة مع FDA. بحلول الوقت الذي انضممت فيه، نمت المنصة إلى أكثر من ١٨٠٠٠ شركة عميلة — وكانت تعاني للمواكبة. كانت استدعاءات API لإنشاء الملصقات تستغرق ٣.٤ ثوانٍ، تتدهور مع كل دفعة عملاء جديدة. في الوقت ذاته، كان الاكتساب مقيداً بواقع سوقي هيكلي: معظم الشركات الغذائية لديها بياناتها مقفلة داخل نظام منافس، والترحيل اليدوي كان مؤلماً بما يكفي لمنعها من التحويل.
The Challengesالتحديات
Fix production without breaking it. Then unlock a locked market.إصلاح الإنتاج دون كسره. ثم فتح سوق مغلق.
The performance investigation had to happen on a live system with 18,000 active businesses — no tolerance for downtime or regressions. The temptation is to optimize what looks slow; the discipline is measuring first and only then cutting. The acquisition challenge was different in nature: competitor export files are deliberately opaque, with no public documentation. Unlocking customer migration meant reverse-engineering those formats from decoded export samples and building an import pipeline robust enough to handle real-world data variability. كان الاستقصاء عن الأداء يجب أن يجري على نظام حي يخدم ١٨٠٠٠ شركة نشطة — لا تسامح مع التوقف أو الانحدار. الإغراء هو تحسين ما يبدو بطيئاً؛ الانضباط هو القياس أولاً ثم القطع فقط. كان تحدي الاكتساب مختلفاً في طبيعته: ملفات تصدير المنافسين مُعتمة عمداً بلا توثيق عام. فتح هجرة العملاء يعني هندسة عكسية لتلك التنسيقات من عينات التصدير المُفكَّكة وبناء خط استيراد متين بما يكفي للتعامل مع تباين البيانات الحقيقية.
Key Decisionsالقرارات المحورية
Four choices that defined the engagementأربعة قرارات شكّلت الانخراط
Two weeks of measurement before any optimizationأسبوعان من القياس قبل أي تحسين
I held back the team from touching any code for two weeks while we instrumented slow queries, logged execution paths, and profiled the label generation pipeline under real load. It revealed that the bottleneck wasn't where anyone suspected — it was in the ingredient lookup layer, not the PDF rendering we'd assumed. Without that data, we'd have spent weeks optimizing the wrong thing. أوقفت الفريق عن لمس أي كود لأسبوعين بينما رصدنا استعلامات الأداء البطيئة، وسجّلنا مسارات التنفيذ، وحللنا خط إنشاء الملصق تحت الحمل الحقيقي. كشف التحليل أن الاختناق لم يكن حيث يشتبه أحد — بل كان في طبقة البحث عن المكونات، لا في تحويل PDF الذي افترضناه. بدون تلك البيانات، كنا سنقضي أسابيع في تحسين الشيء الخطأ.
Composite indexing on the ingredient lookup pathComposite Indexing في مسار البحث عن المكونات
The profiling data pointed to ingredient queries filtering on name, unit, and serving size separately across a table that had grown to millions of rows with no composite index. Adding a composite index on (name, unit, serving_size) accounted for roughly 60% of the total improvement — query planner went from full table scans to index range scans. This is the kind of fix that only surfaces when you measure first. أشارت بيانات التحليل إلى استعلامات المكونات التي تُصفّي حسب الاسم والوحدة وحجم الحصة بشكل منفصل عبر جدول نما إلى ملايين الصفوف دون composite index. إضافة composite index على (name, unit, serving_size) شكّلت ما يقارب ٦٠٪ من إجمالي التحسين — انتقل مخطط الاستعلام من مسح الجدول الكامل إلى مسح نطاق الفهرس. هذا هو نوع الإصلاح الذي يظهر فقط عندما تقيس أولاً.
Eager loading refactor on the label generation pipelineإعادة هيكلة Eager Loading في خط إنشاء الملصقات
The label generation loop had a classic N+1 problem — a label with 40 ingredients meant 40+ separate queries before a single line of output. I refactored the pipeline to eager-load all related data once before the loop, and added request-lifecycle caching for repeated lookups. Together with the indexing fix, this eliminated the remaining 40% of latency and brought response time under 500ms. كان خط إنشاء الملصق يعاني من مشكلة N+1 كلاسيكية — ملصق بـ٤٠ مكوناً يعني ٤٠+ استعلاماً منفصلاً قبل سطر واحد من المخرجات. أعدت هيكلة الخط لتحميل جميع البيانات المرتبطة مرة واحدة قبل الحلقة، وأضفت تخزيناً مؤقتاً لدورة الطلب للبحثات المتكررة. بالتزامن مع إصلاح الفهرسة، أزال هذا ٤٠٪ المتبقية من زمن الاستجابة وأتى به دون ٥٠٠ مللي ثانية.
Reverse-engineering competitor exports to unlock customer migrationالهندسة العكسية لصادرات المنافسين لفتح هجرة العملاء
The biggest barrier to new customer acquisition wasn't pricing or features — it was data. Businesses had years of product data inside competitors' systems, and migrating it manually was a dealbreaker. I analyzed decoded export files from the market's top competitors, reverse-engineered their formats, and built an import pipeline directly into Food Label Maker's system. The largest competitor was covered in 3 months. Within 6 months, we supported the top 5. This removed the single biggest switching cost in the market — turning competitors' lock-in into an acquisition channel. It drove 700× new SME sign-ups, significantly improved retention, and brought large enterprise businesses to the platform for the first time. أكبر عائق أمام اكتساب عملاء جدد لم يكن التسعير أو الميزات — بل كانت البيانات. الشركات لديها سنوات من بيانات المنتجات داخل أنظمة المنافسين، والترحيل اليدوي كان مانعاً حقيقياً للتحويل. حللت ملفات التصدير المُفكَّكة لأبرز المنافسين في السوق، وهندستها عكسياً، وبنيت خط استيراد مباشرة في نظام Food Label Maker. تمت تغطية أكبر منافس في ٣ أشهر. في غضون ٦ أشهر، دعمنا أبرز ٥ منافسين. هذا أزال أكبر تكلفة تحويل في السوق — محوّلاً قفل المنافسين إلى قناة اكتساب. أدى إلى ٧٠٠× اشتراك SME جديد، وتحسّن ملحوظ في الاحتفاظ بالعملاء، وجلب الشركات الكبيرة إلى المنصة للمرة الأولى.
Resultsالنتائج
Faster platform. Unlocked market. New customer segments.منصة أسرع. سوق مفتوح. شرائح عملاء جديدة.
700×٧٠٠×
New SMEs acquiredشركة صغيرة ومتوسطة مكتسبة جديدة
Firstالأول
Enterprise customers acquiredعملاء مؤسسيون مكتسبون
5٥
Competitors reverse-engineeredمنافس تم تحليله هندسياً
3 mo٣ شهر
Biggest competitor coveredأكبر منافس تمت تغطيته
<500 ms<٥٠٠ ms
Response time (from 3.4s)وقت الاستجابة (من ٣.٤ ثانية)