Installation

From the downloaded files to a running academy with sample data in five minutes.

What you need

  • Node.js 20.9 or newer (22 LTS recommended) and npm.
  • Nothing else for a first run: the database is a SQLite file created inside the project. See Requirements for production and PostgreSQL.

Steps

npm install
cp .env.example .env        # on Windows: copy .env.example .env

Open .env and set at least:

Variable Why
AUTH_SECRET Signs sign-in cookies. Use 32+ random characters: node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"
ADMIN_EMAIL, ADMIN_PASSWORD The first admin account (password of 8+ characters)

Then create the tables and the sample academy:

npm run setup
npm run dev

npm run setup runs prisma generate, prisma db push and node prisma/seed.mjs. It prints the accounts it created.

Sign in

Where Account
Dashboard, admin: http://localhost:3305/en/dashboard ADMIN_EMAIL / ADMIN_PASSWORD (demo: admin@maarifa.test / maarifa-demo-2026)
Dashboard, instructor khalid@maarifa.test (and reem, noor, saeed, laila, daniel) with DEMO_INSTRUCTOR_PASSWORD (demo: maarifa-teach-2026)
Website, student (only with SEED_DEMO_STUDENT="1") student@maarifa.test / maarifa-student-2026

The sample learners (40 of them) have random passwords and cannot sign in; they exist so the dashboard has real-looking data.

Useful commands

Command
npm run dev Development server on port 3305
npm run build then npm start Production build and server
npm run db:seed Fill an empty database (safe to run again: it skips what exists)
npm test Unit tests: learning rules, quiz scoring, certificates, pricing, coupons, roles, filters, translations
npm run lint Type check
python scripts/e2e_api.py End-to-end API test against a running server with a fresh demo database
python scripts/check_pages.py Every page in both languages and every docs link answers 200

Start over

Stop the server, delete prisma/maarifa.db and run npm run setup again.

Start without the sample academy

Run npx prisma generate && npx prisma db push, then create only your admin with node prisma/seed.mjs after emptying the arrays in prisma/data/*.mjs, or delete the sample courses from the dashboard (courses with learners can be archived instead). Set DEMO_INSTRUCTOR_PASSWORD="" so no sample instructor accounts are created.

Next: Manual setup and deployment.