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

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
- AdminasksAI assistant
- AI assistantruns directlyRead tools
- AI assistantproposes writesPending actions
- Pending actionsapprove or rejectAdmin
- 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.









02
Teacher and student portals




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




04
The website



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.