How I Built Muhasaba — An AI-Powered Islamic Journal App
How I Built Muhasaba — An AI-Powered Islamic Journal App
Quick answer: Muhasaba is a free iOS journaling app built on the Islamic practice of daily self-accounting. You write or speak your reflection, and the app returns AI-generated guidance drawn from Quran and Sunnah — not generic self-help advice. It tracks virtues like sabr and shukr, sends dhikr reminders, and runs on a no-ads Pro subscription model. [Download it on the App Store](https://apps.apple.com/app/islamic-journal-muhasaba/id6774862794) or visit [muhasaba.me](https://muhasaba.me).
The problem I was actually trying to solve
Every night after Isha, I'd sit with my thoughts and try to do muhasaba — reflecting on my day through the lens of my deen. Was I patient? Did I show gratitude? Did I catch myself when I slipped?
The problem wasn't motivation. It was tooling.
Generic journaling apps — Day One, Notion, even the Notes app — are built for productivity or memory. They don't understand the difference between muhasaba and muraqaba. They don't know that shukr is more than just "gratitude." They definitely don't pull from hadith when you write about a moment you lost your temper.
Islamic apps are better on the deen side, but most are Quran players or prayer trackers. The reflective, journaling-focused space was almost empty.
I kept a text file for months. Plain text, no structure, no prompts, no feedback. I'd write a paragraph about something I struggled with and then just... close the file. There was no response. No framework. No reminder of what the Prophet, peace be upon him, said about patience in hardship.
That gap is what I built Muhasaba to fill.
Why the existing Islamic app market misses this
There are some genuinely good Islamic apps. Muslim Pro handles prayer times. Pillars handles Quran learning. But when it comes to reflection, the space is thin.
The reason is nuance. Muhasaba isn't a mood tracker. It isn't a gratitude log. It's self-accounting in front of Allah — an honest audit of your intentions, your actions, your character. The Islamic scholars wrote extensively about it. Ibn Qayyim, al-Muhasibi. This is centuries-old spiritual technology.
The apps that try to cover this usually either go too generic (basically a journaling app with an Islamic skin) or too rigid (structured checklists that miss the personal, emotional reality of the practice). What I wanted was something that responds to what you actually wrote — not a template you fill in.
That's where AI changed everything.
How I built the voice journaling feature
One of the earliest decisions I made was: this app needs to support voice input.
Here's why. For many Muslims, the natural time to do muhasaba is right after Salah. You're already in a reflective state. You've just finished prayer. The last thing you want to do is unlock your phone, open an app, and start typing.
Speaking is more natural in that moment.
I used OpenAI's Whisper API for transcription. The integration itself is straightforward — record audio, send it to the Whisper endpoint, get back a transcript. But the UX decisions mattered more than the API call.
I wanted the recording experience to feel calm, not clinical. No waveform animations that look like a podcast studio. A simple mic button, a soft visual pulse, and silence otherwise. When you're done, the transcript appears for you to review before the AI processes it.
I tested the early voice builds by actually using them after Fajr. The first version had a "tap and hold to record" interaction that felt awkward when you're half-asleep. Changed it to a tap-to-start, tap-to-stop model and that friction dropped immediately.
Crafting the AI prompt — the hard part
The AI guidance is the core of the product. Getting it right took longer than any other part of the build.
The failure mode I was trying to avoid: generic therapeutic advice. "It sounds like you're being hard on yourself. Try to practice self-compassion." That's not what a Muslim doing muhasaba needs. It misses the entire frame.
What I wanted instead: a response that meets the user where they are and responds through the lens of the Quran and Sunnah.
Here's roughly how I approached the system prompt:
- Establish the role: this is an AI guide for the Islamic practice of muhasaba, not a general journaling assistant
- Instruct it to reference specific ayat or hadith relevant to what the user wrote, with proper attribution
- Prioritize sincerity and gentleness — the tone of a wise elder, not a chatbot
- Explicitly prohibit generic self-help language and therapeutic framing
- Anchor responses in the four virtues the app tracks: sabr, shukr, tawbah, tawakkul
The trick with Quran and Sunnah citations is specificity. A vague "as Allah says, be patient" feels hollow. Citing Surah Al-Baqarah 2:286 — "Allah does not burden a soul beyond that it can bear" — with a sentence connecting it to what the user actually wrote is a completely different experience. The prompt engineering is mostly about forcing that specificity.
I also added an explicit instruction: if the user writes something that requires scholarly guidance beyond the scope of this tool, acknowledge the limitation and encourage them to seek a knowledgeable person.
Why SwiftUI
Straightforward choice for this project. I wanted to ship fast and maintain the app as a solo developer. SwiftUI's declarative syntax lets me iterate quickly. The virtue-tracking UI — the sabr/shukr/tawbah/tawakkul display — would have taken much longer to build in UIKit.
The one place SwiftUI pushes back is complex animations and certain custom controls. For this app, the UI is intentionally calm and minimal, so that pressure rarely came up.
The /learn content strategy
Building the app is only half the problem. Discovery is the other half.
The App Store has real search limitations. So I built a content layer at [muhasaba.me/learn](https://muhasaba.me/learn) — articles targeting the actual questions people search for:
- [What is muhasaba in Islam?](https://muhasaba.me/what-is-muhasaba)
- [Islamic journaling prompts](https://muhasaba.me/learn/islamic-journaling-prompts)
- What is muraqaba?
- Best Islamic apps for daily practice
The insight here is that people searching "Islamic journaling prompts" on Google are exactly the people who need this app. They're already doing some version of the practice. They just don't have a tool built for it. A well-written article that answers their question, introduces the app naturally, and links to the App Store is a far more durable acquisition channel than paid ads.
Each article is written for humans first, search visibility second. No keyword stuffing. Just genuinely useful content about the practice.
Pricing: no ads, ever
This was a values decision before it was a business one.
Ads in a spiritual reflection app feel wrong to me. You've just written something vulnerable and honest — a moment you failed, something you're asking for forgiveness about. The last thing that moment should be followed by is a banner ad.
Muhasaba is free to download. The free tier covers a set number of reflections per month so you can genuinely try it. Pro unlocks unlimited reflections, full virtue history, and any features I add going forward.
No ads. No data selling. That's a hard constraint, not a launch-day promise I'll revisit later.
What I learned building this
Specificity beats breadth. An app that deeply serves one practice — muhasaba — is more useful than an Islamic super-app that skims ten things.
The AI prompt is a product decision, not a technical one. How the AI responds determines whether the app feels spiritually grounded or like a chatbot wearing a thobe. That prompt took weeks of iteration and is still evolving.
Voice input changes who can use the app. Older users, users with accessibility needs, users who prefer to speak — Whisper opened the app to people who wouldn't have engaged with a text-first interface.
Content is underrated for app discovery. The /learn articles bring in users who are already motivated, already curious, already practicing. They convert better than any other channel I've tried.
If you practice muhasaba or want to start, [download Muhasaba on the App Store](https://apps.apple.com/app/islamic-journal-muhasaba/id6774862794) and try it after your next Salah. Free to start. No ads.