Inspiration

What it does

How we built it## Inspiration

Many people can read vocalized Arabic. They learned the script for the Qur'an, at a weekend school or in a course. Yet they still can't say why a word ends in -u in one sentence and -i in the next. That "why" is naḥw, Arabic grammar. Language apps teach vocabulary and phrases, and the classical grammar books assume a teacher sitting next to you.

Mubtadaʾ is that teacher. It is a private tutor, Hādī, who explains how an Arabic sentence is actually built, in ten-minute lessons written for one learner at a time.

The name comes from the first sentence you learn to parse. In الْكِتَابُ جَدِيدٌ (the book is new), the first word is the mubtadaʾ (the subject) and the second is the khabar (what is said about it).

What it does

  • A 3-minute placement interview. It starts with a reading check, then asks about your goal (Qur'an, classical texts, an exam, or Modern Standard Arabic) and gives you two real grammar questions. Placement follows a fixed ladder of rules: the AI never decides where you start.
  • Your first parse. You tag each word of a real sentence with its type and case ending. The app then explains why each word is what it is: muḍāf, muḍāf ilayhi, the kasra that marks the genitive.
  • Daily lessons written from scratch for you. Each one has teaching cards with word roots, a worked example, and then exercises: pick the correct form, parse a whole sentence, supply the missing ending, and explain the rule in your own words. Hādī grades that last one, with partial credit and exactly what was missing.
  • Spaced review, a word list organised by root, and "Ask Hādī anything".
  • A path of 76 concepts. It uses Arabic: An Essential Grammar (Abu-Chacra) as its reference, and as a guard that no lesson comes before its prerequisites.
  • One new lesson a day, on purpose. Spacing is how grammar sticks. Review and your word list stay open in between.

How we built it

  • Mobile: Expo SDK 57, React Native 0.86, React 19 with the React Compiler, expo-router, Reanimated and react-native-keyboard-controller, with iPad layouts based on screen size.
  • Backend: Convex handles data, functions, auth, scheduled jobs and push notifications. Every rule that costs money runs on the server: the subscription check and the daily-lesson check both happen before any model call.
  • AI: Kimi K3 (Moonshot) writes lessons, grades free-text answers and powers Hādī's chat. It sits behind an adapter that requests structured output and retries once if the output is malformed. Every call logs its token count and cost.
  • Web: a Next.js 16 landing page with a waitlist stored in Convex.
  • Shipping: EAS Build, Submit and Update.

RevenueCat

  • One entitlement, mubtada_pro, and one offering: $19.99/month or $149.99/year, with a 7-day free trial on both stores.
  • The server decides who has access. RevenueCat webhooks update Convex, and the app's own customer info acts as a fallback. The server also checks the expiry date itself, so a webhook that never arrives can't leave a lapsed account unlocked.
  • The trial is promised only to people who can take it. On iOS we check trial eligibility per account, and Google Play only returns offers the account is eligible for. Someone who has already used a trial sees "Subscribe", not "Start free trial".
  • RevenueCat's Customer Center handles cancelling, changing plan and refunds. It also shows sandbox subscriptions, which the App Store's own subscriptions page does not.
  • When there's nothing to sell, the paywall says why. It distinguishes five cases: no store, a restricted device, an unsupported country, a network error, and a configuration mistake on our side. It never shows "try again" to someone whose country the store doesn't serve.
  • The 7-day intro offers were created through the store APIs: 350 App Store introductory offers (175 territories × 2 plans), plus the Play offers.
  • In development we use RevenueCat's Test Store, plus a dedicated build profile for real App Store sandbox purchases without going through TestFlight.

Challenges we ran into

  • Two App Review 2.1(b) rejections.
    • The first time, no products loaded because the Paid Apps Agreement was still waiting on banking and tax details. RevenueCat reports "the store returned no products" as a configuration error, so our paywall said exactly that.
    • The second rejection said "no action occurred when we tapped to manage the subscription". The Customer Center is presented from the app's root screen, and our Profile screen was a modal, so iOS silently refused to show it. We made Profile a normal pushed screen. Along the way we learned that the App Store subscriptions page never shows sandbox purchases.
  • A trial promise the store wouldn't keep. The paywall read the product's trial offer, not whether this account could still use it. We fixed it so every trial line on the paywall depends on one per-account eligibility check.
  • AI cost. Our first measured lesson used 2,332 input and 16,171 output tokens, about $0.25, and around 97% of the output was the model's hidden reasoning. That led to one lesson a day, writing tomorrow's lesson in advance, and enforcing both limits on the server.
  • The keyboard. Our bottom sheet never moved when the keyboard opened. React Native's layout engine places absolutely positioned children relative to the parent's border, ignoring its padding, so the padding that was supposed to lift it did nothing.
  • Positioning. Our first welcome screen assumed every learner came from the Qur'an. We rewrote it around الْكِتَابُ جَدِيدٌ so it assumes nothing except the ability to read the script.
  • Google Play. Creating offers failed with "Region code MN is not billable" until we sent the regions version Play expects (2025/03).

What we learned

  • Every rule that costs money belongs on the server.
  • Test purchases in the real sandbox. A test store proves the UI works, not StoreKit.
  • Honest paywall copy is better for users, and it is also the fastest way through App Review.
  • Reasoning models are expensive per call: generate ahead, cap usage, and measure every call.

What's next

  • Paste any Arabic text and get an instant lesson built on it.
  • Vowel marks that fade as your accuracy rises.
  • Audio for every example sentence.
  • More of the curriculum. -Switch to a more capable AI model.

Built With

  • app-store-connect-api
  • convex
  • convex-auth
  • eas
  • expo-notifications
  • expo-router
  • expo.io
  • google-play-billing
  • google-play-developer-api
  • kimi
  • moonshot-ai
  • next.js
  • playwright
  • react
  • react-native
  • reanimated
  • revenuecat
  • revenuecat-customer-center
  • storekit
  • tailwind-css
  • typescript
Share this project:

Updates

Submission history