Skip to main content
EDTECHLEARNING MANAGEMENTCOMMERCE

IQ ACADEMY: THE COMPLETE DIGITAL CAMPUS FOR SAUDI UNIVERSITIES

Arabic-first EdTech learning OS

15s
Heartbeat interval
3
Video engines unified
0
Exam state lost on refresh
RTL
Arabic-first by default
01 — Overview

The problem worth engineering

IQ Academy is a full-scale EdTech platform built for Saudi university students — covering course discovery, subscription, study, exams, payments, wallet, and post-purchase engagement. The backend is a Laravel API with Sanctum bearer tokens; the frontend is a Next.js 16 App Router application with RTL-first Arabic UX, server-side metadata, and a BFF layer for secure auth cookies.

The hardest problems were not CRUD screens — they were stateful learning flows: exams that survive page refresh, video lectures that report honest watch time via 15-second heartbeats, carts that merge guest and authenticated sessions, and checkout that routes to different success-metadata endpoints depending on whether the user paid via wallet, IQ Pay, or Moyasar gateway redirect. I architected modular domain layers (exam, cart, checkout, study, wallet, notifications) with Zustand persist for client-critical state and TanStack Query for server state, optimistic updates, and cache invalidation.

Auth uses HttpOnly cookies plus a session hint cookie, with Next.js 16's proxy.ts convention for route protection — explicitly handling opaque Sanctum tokens that are not JWTs. The platform enforces Arabic triple-name validation before any signup API call, watermarks protected PDFs with student identity via pdf-lib, and pushes Firebase notifications only after authenticated SDK initialization.

  • Video heartbeat engine (15s) across Vimeo, YouTube, and HTML5 for honest watch-time reporting.
  • BFF auth with HttpOnly Sanctum cookies, guest→auth cart merge, and gateway-aware checkout (wallet / IQ Pay / Moyasar).
  • Exam state that survives refresh, PDF watermarking, and Firebase FCM after authenticated SDK init.
02 — Deep-Dive Modules

How it was built, system by system

01 / 20
Architected a Production Exam Engine with Persisted Attempt State
Core Engine & Business LogicModule 01

Architected a Production Exam Engine with Persisted Attempt State

Built a full take → review → finish → results → attempt-review flow using Zustand persist (v2 with migration). Answers, current question index, and review step survive browser refresh. Server timer is authoritative via API expires_at (including Arabic relative strings); local expiry is intentionally not trusted on resume. Auto-submit fires on timer expiry; finish payload maps every question to { question_id, answer_id } for Laravel.

Core Engine & Business Logic2
Real-Time, Media & Tracking4
Commerce, Checkout & Payments5
Auth, Security & Compliance6
Data, State & Performance1
Interface, Motion & Accessibility2

Related Projects

Explore more of my work

smoke
logo

"If Your Dreams do not scare you, they are too small !"

Got a project? Let’s vibe together and
make it ninjaa-precise—get in touch!

Call Me Now !

mail

noordragon2004@gmail.com

address

from egypt,mansoura

phone

+20 1145838187