Skip to content
malekverse
All missions

SaaS2026

QTrust

A multi-tenant SaaS that runs Quranic schools: attendance, schedules, billing and three portals, in Arabic, French and English.

Role
Solo: product, design and engineering
Year
2026
Stack
Next.js 16, React 19, MongoDB, NextAuth, next-intl, Zod, Groq, Upstash, Expo
QTrust cover: the live product on screen, above a dotted planet

The problem

Quranic associations and Hifz schools run on paper registers, WhatsApp groups and spreadsheets. Attendance, schedules, family billing, admissions and memorisation progress are all tracked by hand, usually by volunteers.

What I built

  • QR attendance from a tablet app (Expo), scheduling, rooms, family billing, admissions and Hifz tracking in one place.
  • Three portals on one platform: admins run the school, teachers score recitation and memorisation, students follow their attendance, schedule and results.
  • Arabic, French and English with full right-to-left support: 1,313 translation keys.
  • Multi-tenant from the data model up: plans, entitlements, billing and an audit log per school.
  • An AI admin assistant that answers questions about the school and prepares actions across every module.

How it earns trust

Writes wait for a human

The agent has 43 function-calling tools: 19 read-only and 24 that write. A write never executes directly. It becomes a pending action that an admin approves or rejects.

Every argument is checked

Tool arguments are validated against Zod schemas before anything runs, so a malformed or invented field is rejected instead of written.

Untrusted input stays untrusted

The system prompt has an explicit section on handling untrusted data, and every AI call goes through a per-school quota, a token ledger and an audit trail.

Isolation before features

Before going multi-tenant, a written audit found about 70 unscoped queries and 16 models without a tenant ID. Isolation was fixed before any AI feature shipped. 28 models now carry a tenant ID.

By the numbers

agent tools
43agent tools
writes gated by human approval
24writes gated by human approval
tenant-scoped models
28tenant-scoped models
translation keys (AR, FR, EN)
1,313translation keys (AR, FR, EN)

How it fits together

  1. AdminasksAI assistant
  2. AI assistantruns directlyRead tools
  3. AI assistantproposes writesPending actions
  4. Pending actionsapprove or rejectAdmin
  5. Pending actionsexecutes after approvalMongoDB

01

The admin app

Everything a school runs on, in Arabic first and right to left, with light and dark themes.

QTrust's AI assistant, in Arabic, asking an admin to approve creating a student portal account, with Approve and Reject buttons
The assistant prepares a write, here a student portal account, and stops there. It runs only once an admin approves it.
QTrust admin dashboard in dark mode
The admin dashboard, in dark mode.
QTrust admin dashboard in Arabic: teachers, students, sessions, portal and subscription figures
And in light mode.
QTrust weekly schedule, sessions colour-coded across the week
The weekly schedule across rooms and teachers.
QTrust attendance page with present, late and absent counts per session
Attendance per session, with present, late and absent counts.
QTrust students page selecting students to print QR attendance cards
Pick students and print their QR attendance cards.
QTrust rooms page with capacity and occupancy per room
Rooms, with capacity and how full each one is.
QTrust subscriptions page: each student's monthly payment status with a confirm-payment button
Subscriptions: this month's payments, student by student.
QTrust approval dialog summarising a new student before it is added
Before the agent writes, the admin reads a plain summary of the change.

02

Teacher and student portals

QTrust teacher evaluations: recitation and memorisation scores per student
Teachers score recitation and memorisation, student by student.
QTrust teacher analytics per circle
Teacher analytics, circle by circle.
QTrust student portal dashboard in dark mode with attendance trend
The student portal: attendance, ratings and a three-month trend.
QTrust student results and ratings
Results and ratings over time.

03

The tablet scanner app

An Expo app on a tablet at the door: students hold up their card and are checked in.

QTrust's tablet check-in screen: an attendance QR card held to the camera next to a welcome message
The check-in screen, waiting for a card.
QTrust scanner app scanning a QR card
Scanning.
QTrust scanner app confirming a student's attendance
Checked in.
QTrust scanner app refusing a check-in because the session has not opened yet
Refused: the session hasn't opened yet.

04

The website

QTrust's website home page in English, dark mode
The home page, in English.
QTrust's features page
Features, module by module.
QTrust's home page on a phone, in Arabic
On a phone, in Arabic.

What I'd do next

Wrap the approval flow in an automated test suite. Today it's covered by a written QA plan and an 18-defect QA sweep, which isn't enough for something that writes to billing.

malekverse

© 2026 Malek Maghraoui. Built with Next.js, three.js and GSAP.

Every color on this site is a star temperature, from 3,200 K to 30,000 K. There are no green stars.