Maarifa documentation

Run the Maarifa online academy template, make it your own, and find the fix when something breaks.

Maarifa is a complete online academy in Arabic and English, built for the Gulf: prices in Omani rials, card payments through Thawani, Arabic-first lessons that read right to left. One Next.js project holds four parts that share one database:

Part What it gives you Address
Student website Home, course catalogue with filters and search, course pages with syllabus and free preview lessons, cart and checkout, instructors, blog, about, terms, privacy, student sign-up and saved courses /ar, /en
Student area My courses with progress, the lesson player with notes, quizzes with scoring and attempts, printable certificates with a public verification page, orders, messages to instructors, profile /ar/my/..., /ar/learn/...
Admin & instructor dashboard Overview with charts, courses with sections and lessons, categories, instructors, live-session schedule, quiz builder, messages, students, enrolments, orders, earnings, blog, reviews, coupons, admins, admin roles, settings, AI assistant /ar/dashboard
Backend API The REST endpoints both sides use, with role checks; ready for a mobile app /api/...

What you get

  • Arabic first (right to left) with a full English version of every page, including the dashboard and these docs.
  • Courses made of sections and lessons. A lesson is text (Markdown) or a video link (YouTube, Vimeo or an MP4 file) with notes under it. Any lesson can be a free preview.
  • Quizzes with multiple-choice and true/false questions, a pass mark, an attempt limit, and explanations shown after an attempt. Scoring happens on the server; the right answers never reach the browser before an attempt is saved.
  • Progress and certificates computed on the server: a certificate is issued only when every lesson is complete and every required quiz is passed. Each certificate has a code such as MRF-7KQ2-M9XD and a public page anyone can open to verify it.
  • Checkout with coupons: free courses and 100% coupons enrol at once, card payments go through Thawani and are confirmed with Thawani before the course opens, bank transfers wait for an admin.
  • Two dashboard roles: Admin (everything) and Instructor (only their own courses, students, messages, schedule and earnings). The Admin roles page decides which sections instructors may use.
  • Live cohorts: a calendar of sessions with meeting links that enrolled learners see on their course page.
  • Optional AI with any OpenAI-compatible service: course descriptions, quiz questions drafted from a lesson, and a chat that answers questions over your data.
  • A sample academy: 6 categories, 6 instructors, 16 courses with 105 lessons and 16 quizzes, 6 blog articles, 40 learners with enrolments, progress, quiz attempts, certificates, reviews and orders, all with photos generated for this template.

Quick start

npm install
cp .env.example .env
npm run setup
npm run dev

Open http://localhost:3305 for the website and http://localhost:3305/ar/dashboard for the dashboard. The first admin account comes from ADMIN_EMAIL and ADMIN_PASSWORD in .env (see Installation).

Where everything is

prisma/schema.prisma          database tables
prisma/data/*.mjs             the sample academy (courses, lessons, quizzes, instructors, articles)
prisma/seed.mjs               fills an empty database and creates the first admin
messages/ar.json, en.json     every text of the website and the dashboard
src/app/[locale]/(site)       website and student-area pages
src/app/[locale]/dashboard    dashboard pages
src/app/[locale]/docs         these docs (Markdown files in docs/)
src/app/api                   the API
src/lib                       learning rules, pricing, roles, payments, AI, sessions
src/components                website, dashboard and docs components
src/app/globals.css           colours, fonts and shapes (your brand)
public/images                 course covers, instructor portraits, blog and site photos
tests                         unit tests (npm test)
scripts                       end-to-end API test, page checker, image generator

Next steps

  1. Install the project and sign in to the dashboard.
  2. Set your name, contacts and payments in Environment variables and Dashboard > Settings.
  3. Change colours and fonts in Branding.
  4. Read how courses, lessons and quizzes and certificates work, then replace the sample courses with yours.