<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Irfan Ghapar</title>
    <description>The latest articles on DEV Community by Irfan Ghapar (@irfanghapar).</description>
    <link>https://dev.to/irfanghapar</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2110048%2F92942899-e630-4dbf-94bd-6e3d5c493648.png</url>
      <title>DEV Community: Irfan Ghapar</title>
      <link>https://dev.to/irfanghapar</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/irfanghapar"/>
    <language>en</language>
    <item>
      <title>AI Fiqh &amp; Retrieval-augmented generation (RAG)</title>
      <dc:creator>Irfan Ghapar</dc:creator>
      <pubDate>Thu, 22 May 2025 06:39:41 +0000</pubDate>
      <link>https://dev.to/irfanghapar/ai-fiqh-retrieval-augmented-generation-rag-nl8</link>
      <guid>https://dev.to/irfanghapar/ai-fiqh-retrieval-augmented-generation-rag-nl8</guid>
      <description>&lt;h2&gt;
  
  
  Building AIFiqh: Our Journey with Islamic Knowledge and AI
&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;How we're trying to make authentic Islamic scholarship more accessible (and learning a lot along the way)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdhk7q0nbg6dh1j92oo8t.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdhk7q0nbg6dh1j92oo8t.png" alt="Login &amp;amp; Registration Page" width="800" height="629"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Why We Built This Thing
&lt;/h2&gt;

&lt;p&gt;Let me be straight here. When we started AIFiqh, we weren't trying to "disrupt" Islamic knowledge or whatever. We just noticed something annoying: finding reliable Islamic rulings online was a mess.&lt;/p&gt;

&lt;p&gt;You'd search for something simple like "Can I pray with nail polish?" and get buried in forum discussions, random blog posts, and that one guy who's really confident but probably wrong. Meanwhile, there are literally hundreds of thousands of authentic Islamic texts sitting there, but good luck finding what you need without spending hours digging through PDFs.&lt;/p&gt;

&lt;p&gt;So we thought: what if we could build something that actually knows this stuff?&lt;/p&gt;

&lt;h2&gt;
  
  
  When We Realized This Was Actually Hard
&lt;/h2&gt;

&lt;p&gt;Turns out, building AI for Islamic knowledge isn't like building a chatbot for customer service. Islamic jurisprudence is nuanced. Context matters. Scholarly opinions differ. And you can't just throw GPT at it and hope for the best.&lt;/p&gt;

&lt;p&gt;We learned this the hard way when our first prototype confidently told someone that "all fish are halal" without mentioning the Hanafi school's very specific opinions about shellfish. Oops.&lt;/p&gt;

&lt;p&gt;That's when we realized we needed to get serious about this.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why GPT and Claude Fall Short (And Why We Had to Build Our Own)
&lt;/h2&gt;

&lt;p&gt;Before building AIFiqh, we tested the big players. Here's what we found:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Challenge&lt;/th&gt;
&lt;th&gt;GPT-4&lt;/th&gt;
&lt;th&gt;Claude&lt;/th&gt;
&lt;th&gt;AIFiqh (Current)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Source Attribution&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Generic responses, no citations&lt;/td&gt;
&lt;td&gt;Limited Islamic sources&lt;/td&gt;
&lt;td&gt;Every answer traces to specific kitab + page number&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Madhab Awareness&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Mixes schools without distinction&lt;/td&gt;
&lt;td&gt;Occasional mention of differences&lt;/td&gt;
&lt;td&gt;Clearly separates Hanafi, Maliki, Shafi'i, Hanbali opinions&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Arabic Authenticity&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Often paraphrases or translates incorrectly&lt;/td&gt;
&lt;td&gt;Better than GPT but still limited&lt;/td&gt;
&lt;td&gt;Original Arabic text + verified translations&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Classical vs Contemporary&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Can't distinguish scholarly weight&lt;/td&gt;
&lt;td&gt;Similar issue&lt;/td&gt;
&lt;td&gt;Properly weights classical scholars over modern opinions&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Controversial Topics&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Avoids or gives watered-down answers&lt;/td&gt;
&lt;td&gt;Sometimes too cautious&lt;/td&gt;
&lt;td&gt;Presents authentic scholarly positions with context&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Update Frequency&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Knowledge cutoff limitations&lt;/td&gt;
&lt;td&gt;Same issue&lt;/td&gt;
&lt;td&gt;Live updates from contemporary fatwa councils&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Specialized Terminology&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Generic Islamic terms&lt;/td&gt;
&lt;td&gt;Better understanding but limited&lt;/td&gt;
&lt;td&gt;Precise fiqh terminology with explanations&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Infrastructure&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Billion-dollar backing, global CDN&lt;/td&gt;
&lt;td&gt;Well-funded, enterprise-grade&lt;/td&gt;
&lt;td&gt;Running on startup budget (hoping investors are reading this 👀)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;The Real Problem:&lt;/strong&gt; General AI models are trained on everything—Wikipedia articles, random blogs, social media posts about Islam. They can't tell the difference between a authentic hadith commentary and someone's opinion on Reddit.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Our Problem:&lt;/strong&gt; We know exactly what we need to build to compete with the big players, but we're currently bootstrapping this on DigitalOcean droplets while OpenAI has data centers around the world.&lt;/p&gt;

&lt;p&gt;We needed something that actually knows the difference between Ibn Taymiyyah and that guy on IslamQA who's really confident but questionably qualified. But let's be honest, we also need the resources to scale this properly.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Data Mission: 500K Texts and Counting
&lt;/h2&gt;

&lt;p&gt;First things first: we needed the real deal. Not summaries, not interpretations, but actual source texts. So we went hunting.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What we digitized:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The entire Mausu'ah Fiqhiyyah Kuwaitiyah (all 45 volumes)&lt;/li&gt;
&lt;li&gt;Al-Qardhawi's Fiqh Zakat&lt;/li&gt;
&lt;li&gt;Hundreds of contemporary fatwas&lt;/li&gt;
&lt;li&gt;Classical texts on muamalat&lt;/li&gt;
&lt;li&gt;Tabung Haji documentation&lt;/li&gt;
&lt;li&gt;And about 495,000 other texts that nearly broke our OCR budget&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Converting these wasn't just scanning PDFs. Classical Arabic with diacritics, different fonts, handwritten marginalia, weird page layouts—our OCR pipeline had to handle it all. Fun times.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Tech Stack (Or: How We Keep This Thing Running)
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Frontend:&lt;/strong&gt; React + Next.js&lt;br&gt;&lt;br&gt;
Because life's too short for vanilla JavaScript, and we needed SSR for performance.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Backend:&lt;/strong&gt; The fun part we went multi-service:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Python + Flask&lt;/strong&gt; for the heavy AI lifting&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;NestJS&lt;/strong&gt; for our main API (TypeScript makes debugging less painful)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;PostgreSQL + Prisma&lt;/strong&gt; because we like our databases relational and our queries type-safe&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ChromaDB&lt;/strong&gt; for vector storage (more on this later)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;AI Stack:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;TensorFlow&lt;/strong&gt; for our custom models&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Google Gemini&lt;/strong&gt; for the really tricky stuff&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;text-embedding-004&lt;/strong&gt; for turning Arabic text into numbers that actually mean something&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Infrastructure:&lt;/strong&gt; DigitalOcean everywhere&lt;br&gt;&lt;br&gt;
S3-compatible storage, droplets, managed databases—the works. No vendor lock-in headaches.&lt;/p&gt;
&lt;h2&gt;
  
  
  The Two-Tier Cache
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqfssrpeaf6i1o5l1tgmp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqfssrpeaf6i1o5l1tgmp.png" alt="Diagram of Two-tier Cache Flow" width="800" height="530"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here's where it gets interesting. We built this two-tier caching system that's honestly kind of elegant:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Tier 1: The Speed Demon&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
LRU cache in memory. Sub-100ms responses for anything we've seen before. Because nobody wants to wait 3 seconds to find out if their prayer is valid.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Tier 2: The Brain&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
ChromaDB vector database with all our embeddings. When someone asks something new, we do semantic search across our entire corpus. Cosine similarity, 80% threshold, the works.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# This is simplified, but you get the idea
&lt;/span&gt;&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;find_answer&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;question&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="c1"&gt;# Check the fast cache first
&lt;/span&gt;    &lt;span class="n"&gt;cached&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;tier1_cache&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;question&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;cached&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;cached&lt;/span&gt;

    &lt;span class="c1"&gt;# Semantic search in the vector DB
&lt;/span&gt;    &lt;span class="n"&gt;embedding&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;embed_text&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;question&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;similar_texts&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;vector_db&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;search&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;embedding&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;threshold&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mf"&gt;0.8&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;similar_texts&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;answer&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;synthesize_answer&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;similar_texts&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;tier1_cache&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;set&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;question&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;answer&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;answer&lt;/span&gt;

    &lt;span class="c1"&gt;# Fall back to Gemini for novel questions
&lt;/span&gt;    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;gemini_generate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;question&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;our_knowledge_base&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The cool part? If we don't have a good match in our vector DB, we fall back to Gemini but feed it relevant context from our texts. Best of both worlds.&lt;/p&gt;

&lt;h2&gt;
  
  
  Making Arabic Text Behave
&lt;/h2&gt;

&lt;p&gt;Working with Arabic is... special. Different diacritics, right-to-left text, multiple valid spellings for the same word. Our preprocessing pipeline handles:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Normalization:&lt;/strong&gt; Converting different Arabic fonts and diacritics to a standard form&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Context preservation:&lt;/strong&gt; Keeping track of which mazhab (school of thought) each text comes from&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Citation tracking:&lt;/strong&gt; Every piece of knowledge traces back to its source&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We spent weeks just getting Arabic text to embed properly. Turns out, most embedding models are trained on English and get confused by Arabic morphology.&lt;/p&gt;

&lt;h2&gt;
  
  
  The UI: Making Knowledge Accessible
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fweto0ysciymdfmr87nw4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fweto0ysciymdfmr87nw4.png" alt="Answer Section" width="800" height="862"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The interface is deliberately simple. Chat style interaction because that's what people expect from AI. But under the hood:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Source attribution&lt;/strong&gt; for every answer (with Arabic text + translation)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Multiple perspectives&lt;/strong&gt; when scholars disagree&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Related questions&lt;/strong&gt; to guide learning&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Progressive disclosure&lt;/strong&gt; so beginners don't get overwhelmed&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We tried to make it clean, focused, and respectful. No flashy animations, just solid information architecture.&lt;/p&gt;

&lt;h2&gt;
  
  
  Testing Against the Big Players: A Reality Check
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7cpl2in6hewd97cq27gx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7cpl2in6hewd97cq27gx.png" alt="Open AI Response" width="719" height="795"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx3g03pchw77ucl8200nm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx3g03pchw77ucl8200nm.png" alt="Claude Response" width="677" height="899"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsm2o8r4gs95nyloynn8m.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsm2o8r4gs95nyloynn8m.png" alt="AI Fiqh Response" width="732" height="749"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We ran some side-by-side comparisons during our beta. Here are real examples:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Query: "What's the ruling on cryptocurrency in Islam?"&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;GPT-4 Response:&lt;/strong&gt; "Cryptocurrency is generally considered permissible in Islam, though some scholars have concerns about volatility and speculation..."&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Claude Response:&lt;/strong&gt; "Islamic scholars have different views on cryptocurrency. Some consider it halal while others have reservations due to gharar (uncertainty)..."&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;AIFiqh Response:&lt;/strong&gt; "Contemporary scholars differ on cryptocurrency. &lt;strong&gt;Hanafi perspective&lt;/strong&gt; (Dr. Monzer Kahf, 2018): Permissible as long as not used for gambling. &lt;strong&gt;Maliki perspective&lt;/strong&gt; (European Council for Fatwa, 2019): Cautious approval with conditions. &lt;strong&gt;Concerns raised&lt;/strong&gt; by Dar al-Ifta Egypt (2017): Excessive gharar and lack of intrinsic value. &lt;strong&gt;Source:&lt;/strong&gt; Mausu'ah Fiqhiyyah Kuwaitiyah, Vol 31, pp. 234-237, plus contemporary fatwa compilation."&lt;/p&gt;

&lt;p&gt;See the difference? We're not just giving opinions—we're showing you exactly where these opinions come from and how different schools approach the issue.&lt;/p&gt;

&lt;h2&gt;
  
  
  Real Talk: What We Got Wrong (And Fixed)
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Performance Issues:&lt;/strong&gt; Our first vector search was slow. Like, really slow. We fixed it with better indexing and parallel processing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Cultural Blindspots:&lt;/strong&gt; Beta users taught us things we never considered. Like how different communities have different transliteration preferences.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Source Weighting:&lt;/strong&gt; Initially, we treated all texts equally. Bad idea. Classical scholars carry more weight than contemporary opinions, and our algorithm now reflects that.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Context Window:&lt;/strong&gt; Arabic sentences can be really long. We had to tune our embedding strategy to capture complete thoughts without losing nuance.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Numbers (Because Everyone Loves Metrics)
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fauhjee3bflfx8yh0tcbl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fauhjee3bflfx8yh0tcbl.png" alt="Dashboard Analytics" width="800" height="112"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhublhvdxmob20nxftbpt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhublhvdxmob20nxftbpt.png" alt="Query Analytics" width="800" height="164"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Current Performance:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;555 active beta users across 50+ countries&lt;/li&gt;
&lt;li&gt;33.35s average response time (we're working on this!)&lt;/li&gt;
&lt;li&gt;4,562 total queries processed&lt;/li&gt;
&lt;li&gt;66 queries today and growing&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Data Scale:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;500,000+ source texts processed&lt;/li&gt;
&lt;li&gt;2.3M+ individual rulings extracted&lt;/li&gt;
&lt;li&gt;50+ languages of source material&lt;/li&gt;
&lt;li&gt;2MB average storage per user&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What's Next (If We Can Keep the Servers Running)
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Short term:&lt;/strong&gt; We're working on voice interface (imagine asking fiqh questions while driving) and better mobile optimization. Assuming our DigitalOcean bill doesn't get too scary.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Medium term:&lt;/strong&gt; Multi-language support, starting with Malay and Urdu. Also planning a scholar verification system—verified Islamic scholars can review and validate AI responses. This stuff needs proper funding though.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Long term:&lt;/strong&gt; We want to build a complete Islamic knowledge graph. Imagine connecting every hadith to related Quranic verses and fiqh rulings automatically. Think Google's knowledge graph, but for Islamic scholarship. Obviously, this requires resources that match the ambition.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Reality Check:&lt;/strong&gt; We're currently a free tool serving 5,000+ users with bootstrap-level infrastructure. ChatGPT has billions in funding and global data centers. We have passion, authentic sources, and really good coffee.&lt;/p&gt;

&lt;p&gt;If any investors are reading this: we've proven the concept works. Now we need to scale it properly. The Muslim community deserves AI that actually understands Islamic knowledge, not generic responses from models trained on Wikipedia.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Human Element
&lt;/h2&gt;

&lt;p&gt;Here's the thing about AI and religious knowledge: the technology is just a tool. We're not trying to replace scholars or traditional learning. We're trying to make authentic knowledge more accessible.&lt;/p&gt;

&lt;p&gt;Every response includes source citations. We encourage users to verify important matters with qualified scholars. When scholars disagree, we show multiple perspectives.&lt;/p&gt;

&lt;p&gt;The goal isn't to be the final authority it's to be a reliable starting point for learning.&lt;/p&gt;

&lt;h2&gt;
  
  
  Privacy &amp;amp; Ethics (The Boring But Important Stuff)
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;We don't sell user data. Ever.&lt;/li&gt;
&lt;li&gt;Sensitive processing happens client-side when possible&lt;/li&gt;
&lt;li&gt;Users can delete their data completely&lt;/li&gt;
&lt;li&gt;We're transparent about our sources and limitations&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Islamic knowledge is sacred. We treat it and our users with respect.&lt;/p&gt;

&lt;h2&gt;
  
  
  Behind the Scenes
&lt;/h2&gt;

&lt;p&gt;Building this required more than just coding. We worked with Islamic scholars, studied classical Arabic, learned about different schools of jurisprudence. Our team spent months just understanding the domain before writing any code.&lt;/p&gt;

&lt;p&gt;The technical challenges were real, but the cultural responsibility was bigger. Every design decision considered: "Does this serve the Muslim community well?"&lt;/p&gt;

&lt;h2&gt;
  
  
  Try It Yourself
&lt;/h2&gt;

&lt;p&gt;AIFiqh is live at &lt;a href="https://aifiqh.com" rel="noopener noreferrer"&gt;aifiqh.com&lt;/a&gt;. We're still in beta, still learning, still improving.&lt;/p&gt;

&lt;p&gt;If you're a developer interested in Islamic tech, hit me up. If you're a scholar who wants to help improve our accuracy, we'd love to collaborate.&lt;/p&gt;

&lt;p&gt;And if you're just someone who's ever struggled to find a clear Islamic ruling online well, that's exactly who we built this for.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Built with ❤️ by Muslims, for Muslims. Technical leadership by yours truly, with an amazing team of engineers and Islamic knowledge experts.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Current status: Beta (which means it's pretty good but we're still fixing things)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Questions? Feedback? Email us at &lt;a href="mailto:hello@aiafiqh.com"&gt;hello@aiafiqh.com&lt;/a&gt; or better yet, try the platform and ask it directly.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>fiqh</category>
      <category>rag</category>
      <category>webdev</category>
      <category>phase1</category>
    </item>
    <item>
      <title>Building DuitWise: A Personal Financial Management Solution for Malaysia</title>
      <dc:creator>Irfan Ghapar</dc:creator>
      <pubDate>Wed, 04 Dec 2024 02:39:29 +0000</pubDate>
      <link>https://dev.to/irfanghapar/building-duitwise-a-personal-financial-management-solution-for-malaysia-8n1</link>
      <guid>https://dev.to/irfanghapar/building-duitwise-a-personal-financial-management-solution-for-malaysia-8n1</guid>
      <description>&lt;p&gt;When our team won &lt;em&gt;PayHack 2024, Malaysia's premier Open Finance hackathon&lt;/em&gt;, it wasn't just about building another fintech app. It was about solving a real problem that affects millions of Malaysians. &lt;/p&gt;

&lt;p&gt;As the Technical Lead for DuitWise, I want to share our journey of building a solution that bridges the gap between traditional banking and modern financial needs while tackling the critical challenges of financial literacy and inclusion in Malaysia.&lt;br&gt;
‎ &lt;/p&gt;
&lt;h2&gt;
  
  
  The Challenge: Why We Built DuitWise
&lt;/h2&gt;

&lt;p&gt;‎ &lt;/p&gt;
&lt;h3&gt;
  
  
  The numbers were stark:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;64%&lt;/em&gt; of Malaysian adults are financially illiterate&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;49.22%&lt;/em&gt; of bankruptcy cases are due to financial loans&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;6.1 out of 10&lt;/em&gt; Malaysians struggle to access bank loans&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;48.4%&lt;/em&gt; still prefer cash transactions (rising to 63.5% in rural areas)&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;We saw an opportunity to create something that wasn't just another banking app, but a comprehensive financial companion that could help users like Mr. Hazwan, a Grab rider, and Mei Lin, a semi-urban farmer to make better financial decisions.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7wmrw4nz43cff2744io6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7wmrw4nz43cff2744io6.png" alt="User Persona" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Technical Architecture
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvhld467vuyni27wsnk6t.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvhld467vuyni27wsnk6t.jpg" alt="High Level Achitecture" width="800" height="450"&gt;&lt;/a&gt;&lt;br&gt;
‎ &lt;br&gt;
At its core, DuitWise is built on &lt;strong&gt;three&lt;/strong&gt; main pillars:&lt;br&gt;
‎ &lt;/p&gt;
&lt;h3&gt;
  
  
  1. Backend Infrastructure
&lt;/h3&gt;

&lt;p&gt;‎ &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Client-Side Processing&lt;/strong&gt;: We implemented a unique approach where computationally intensive tasks run on the mobile device, reducing server costs and improving response times&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Mistral 7B Integration&lt;/strong&gt;: A lightweight LLM for personalized financial advice&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;OCR Donut Transformer&lt;/strong&gt;: For receipt processing and categorization&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Python Scripts&lt;/strong&gt;: For financial calculations and stress testing
‎ ‎&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;‎ &lt;/p&gt;
&lt;h3&gt;
  
  
  2. Open Banking Integration
&lt;/h3&gt;

&lt;p&gt;‎ &lt;br&gt;
We plan to integrate with major Malaysian banks through their Open APIs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Maybank M2U Pay&lt;/li&gt;
&lt;li&gt;CIMB API Gateway&lt;/li&gt;
&lt;li&gt;Bank Islam Open Banking&lt;/li&gt;
&lt;li&gt;GX Bank API
‎ &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;‎ &lt;/p&gt;
&lt;h3&gt;
  
  
  3. Frontend Development
&lt;/h3&gt;

&lt;p&gt;‎ &lt;br&gt;
&lt;strong&gt;React Native&lt;/strong&gt;: For cross-platform mobile development&lt;br&gt;
&lt;strong&gt;Tailwind CSS&lt;/strong&gt;: For consistent and responsive UI&lt;br&gt;
&lt;strong&gt;Custom Components&lt;/strong&gt;: Built reusable components for:&lt;br&gt;
‎ &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Multi-bank dashboard&lt;/li&gt;
&lt;li&gt;Financial fitness scoring&lt;/li&gt;
&lt;li&gt;Loan stress testing&lt;/li&gt;
&lt;li&gt;Digital receipt management&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;‎&lt;br&gt;
‎ &lt;/p&gt;
&lt;h2&gt;
  
  
  Key Technical Features
&lt;/h2&gt;

&lt;p&gt;‎ &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. ResitNow - Intelligent Receipt Management&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F765ecewm7tilkee1mtmv.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F765ecewm7tilkee1mtmv.jpeg" alt="ResitNow" width="590" height="1280"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Computer Vision model for receipt content extraction&lt;/li&gt;
&lt;li&gt;Real-time tax relief and subsidy eligibility mapping&lt;/li&gt;
&lt;li&gt;Automated categorization using Python backend&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;2. Financial Stress Testing&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm3oo8cnrt0dgu2lkhly0.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm3oo8cnrt0dgu2lkhly0.jpeg" alt="Stress Testing" width="590" height="1280"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Real-time DSR (Debt Service Ratio) calculation&lt;/li&gt;
&lt;li&gt;Integration with multiple bank APIs for comprehensive assessment&lt;/li&gt;
&lt;li&gt;Machine learning model for personalized recommendations&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Core Formula: Debt Service Ratio (DSR)&lt;/strong&gt;&lt;br&gt;
‎ &lt;br&gt;
The foundation of our loan stress testing is an enhanced version of the traditional Debt Service Ratio:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;DSR = (New_Monthly_Commitment / Total_Income) × 100

where:
New_Monthly_Commitment = Current_Total_Loan + Current_Total_Commitment + New_Monthly_Payment
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;However, we knew this basic formula wasn't enough for gig workers. Here's how we enhanced it:&lt;/p&gt;

&lt;p&gt;For &lt;em&gt;gig workers&lt;/em&gt;, we implemented a weighted average system:&lt;/p&gt;

&lt;p&gt;Income Stability Assessment&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Weighted_Monthly_Income = (3M_avg × 0.5) + (6M_avg × 0.3) + (12M_avg × 0.2)

where:
3M_avg = Average income for last 3 months
6M_avg = Average income for last 6 months
12M_avg = Average income for last 12 months
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;3. DuitSmart AI Agent&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbkhztf79l9k781vjlhd8.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbkhztf79l9k781vjlhd8.jpeg" alt="AI Agent" width="590" height="1280"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Locally-run LLM for personalized financial advice&lt;/li&gt;
&lt;li&gt;Real-time transaction analysis&lt;/li&gt;
&lt;li&gt;Proactive investment suggestions based on user profile&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The magic happens in how we process financial data. Here's a peek at our scoring algorithm:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Financial_Fitness = (0.3 × SR) + (0.25 × DM) + (0.2 × EFR) + (0.15 × IU) + (0.1 × ID)&lt;br&gt;
&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;‎ &lt;br&gt;
‎&lt;/p&gt;

&lt;h3&gt;
  
  
  Engineering Challenges and Solutions
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;1. Scale and Performance&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;To handle our projected user base (from 12k to 120k users), we implemented:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Client-side processing for CPU-intensive tasks&lt;/li&gt;
&lt;li&gt;Efficient data storage (2MB per user)&lt;/li&gt;
&lt;li&gt;Optimized API calls using caching&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;2. Security and Compliance&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;End-to-end encryption for financial data&lt;br&gt;
Compliance with Bank Negara Malaysia regulations&lt;br&gt;
Secure multi-bank authentication&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. User Experience&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Offline-first architecture for rural users&lt;/li&gt;
&lt;li&gt;Progressive enhancement for varying device capabilities&lt;/li&gt;
&lt;li&gt;Sub-second response times for critical features&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;‎ &lt;/p&gt;

&lt;h3&gt;
  
  
  Impact and Results
&lt;/h3&gt;

&lt;p&gt;Our solution has the potential to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Increase &lt;strong&gt;financial literacy&lt;/strong&gt; by 35%
‎ &lt;/li&gt;
&lt;li&gt;Streamline targeted &lt;strong&gt;subsidy claims&lt;/strong&gt;
‎ &lt;/li&gt;
&lt;li&gt;Empower 4 million &lt;strong&gt;gig workers&lt;/strong&gt; with loan approval tools
‎ &lt;/li&gt;
&lt;li&gt;Help 15 million &lt;strong&gt;taxpayers&lt;/strong&gt; with documentation
‎ 
‎ &lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;DuitWise demonstrates how technology can solve real-world problems at scale. By combining AI, open banking, and user-centric design, we've created a solution that makes financial management accessible to all Malaysians.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8zfbx5uuglpviuoea1ry.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8zfbx5uuglpviuoea1ry.png" alt="Onboarding" width="692" height="1452"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The Team Behind the Tech&lt;br&gt;
As Technical Lead, I worked with an amazing team:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F91m0x9pvj36t2856gp81.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F91m0x9pvj36t2856gp81.png" alt="Team" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;This project was developed for PayHack 2024 by Team Barracuda. I served as the Technical Lead, focusing on architecture and implementation.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>astoryworth20k</category>
    </item>
    <item>
      <title>How I Built Be U Commit at Bank Islam</title>
      <dc:creator>Irfan Ghapar</dc:creator>
      <pubDate>Tue, 12 Nov 2024 13:35:30 +0000</pubDate>
      <link>https://dev.to/irfanghapar/how-i-built-be-u-commit-at-bank-islam-1p5d</link>
      <guid>https://dev.to/irfanghapar/how-i-built-be-u-commit-at-bank-islam-1p5d</guid>
      <description>&lt;p&gt;&lt;strong&gt;&lt;em&gt;A Journey of Transforming Developer Productivity at Bank Islam&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp8n3w2v2ncu5ds06aw5v.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp8n3w2v2ncu5ds06aw5v.jpg" alt="Developer Productivity Dashboard" width="800" height="399"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Sometimes the biggest innovations start with the smallest commits&lt;/em&gt;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Be U Commit dashboard: Transforming raw git data into actionable team insights&lt;/strong&gt;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;p&gt;It was a warm August morning in Kuala Lumpur when I walked into &lt;strong&gt;Bank Islam's Digital Banking&lt;/strong&gt; division as a fresh-faced intern. Armed with nothing but my laptop and an unhealthy addiction to coffee, I was ready to take on the world - or at least try not to break the production environment.&lt;/p&gt;

&lt;p&gt;Little did I know that within two months, I'd be building something that would change how one of Malaysia's largest banks thinks about developer productivity.&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  From Documentation to Discovery
&lt;/h4&gt;



&lt;p&gt;Using an open-source AI approach, I transformed what was typically a time-consuming, error-prone documentation process into something more efficient. Instead of manually writing README files, I developed an injection script that could analyze repositories and generate comprehensive documentation automatically. What used to take a full day could now be completed in hours.&lt;/p&gt;

&lt;p&gt;The same principle worked for our API documentation. Rather than having developers run separate libraries each time they needed to access API lists, we created a centralized system that made documentation accessible across all repositories. Small wins, but they hinted at bigger possibilities.&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  The Turning Point
&lt;/h4&gt;



&lt;p&gt;Around day 25 of my internship, after swimming through oceans of &lt;strong&gt;README&lt;/strong&gt; files and &lt;strong&gt;API&lt;/strong&gt; docs, I noticed something. Our teams were scattered across different locations, working remotely, and no one had a clear picture of what was happening. &lt;strong&gt;AWS CodeCommit&lt;/strong&gt; was being sunset, and our tech leads were struggling to track developer productivity.&lt;/p&gt;

&lt;p&gt;"How do we know if our teams are truly productive?" I asked En. Hatta during one of our daily standups.&lt;/p&gt;

&lt;p&gt;His response? &lt;em&gt;"Why don't you figure it out?"&lt;/em&gt;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Building the Magic Machine
&lt;/h4&gt;



&lt;p&gt;That's when Be U Commit started taking shape. I dove deep into research from &lt;em&gt;Google's DevOps&lt;/em&gt; teams and &lt;em&gt;Microsoft's&lt;/em&gt; assessment frameworks, but reading papers wasn't enough because we needed something &lt;strong&gt;real&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0428cqzfd33897ib5do0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0428cqzfd33897ib5do0.png" alt="Developer Productivity Metrics" width="800" height="450"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Developer productivity metrics framework based on Google's DevOps research and Microsoft's assessment methodology&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Starting with rough sketches that turned into wireframes, I designed three core interfaces:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;A Dashboard page showing total commits and pull requests&lt;/li&gt;
&lt;li&gt;A Developers page displaying team metrics and rankings&lt;/li&gt;
&lt;li&gt;Individual Developer profiles tracking personal growth&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;As a Product Engineer, I wasn't just designing but I need to build. Every component had to work seamlessly in our AWS infrastructure. The pipeline wasn't just about moving data but it was about transforming it into something meaningful.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftkz5s1mmihd1h1n39w3d.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftkz5s1mmihd1h1n39w3d.gif" alt="Image description" width="700" height="560"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;From git commits to actionable insights: Be U Commit's data pipeline&lt;/em&gt;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Making Magic Happen
&lt;/h4&gt;



&lt;p&gt;Bringing the MVP to life was like solving a puzzle where the pieces kept changing shape. &lt;/p&gt;

&lt;p&gt;We needed to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Process git logs in real-time&lt;/li&gt;
&lt;li&gt;Calculate efficiency scores that actually meant something&lt;/li&gt;
&lt;li&gt;Present data in a way that inspired rather than intimidated&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The interface had to be more than just pretty charts where it needed to tell stories. Pull requests that used to take 16 hours started taking 9, not because we were pushing harder, but because we could see the bottlenecks clearly.&lt;/p&gt;

&lt;p&gt;We built something special. Developers could see their impact in real-time. Team leads could identify who needed help before they even asked for it. The dashboard became less about metrics and more about mentorship.&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  The End (Or Is It?)
&lt;/h4&gt;



&lt;p&gt;They say the best solutions come from really understanding the problem. In my case, it came from documenting hundreds of repositories and drinking way too much coffee. But isn't that how all good tech stories start?&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;p&gt;Remember: Every git commit tells a story. We just built the storyteller.&lt;br&gt;
&lt;br&gt;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;p&gt;Written by Irfan Ghapar, who went from being terrified of git merge conflicts to building a productivity dashboard that even git would be proud of.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;P.S. No repositories were harmed in the making of this story.&lt;/em&gt; :)&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>beu</category>
    </item>
  </channel>
</rss>
