Requirements

What the server needs, which browsers are supported, and how to switch to PostgreSQL.

Server

Minimum Comfortable
Node.js 20.9 22 LTS
Memory 1 GB 2 GB (the build needs about 1.5 GB)
Disk 1 GB plus your uploads SSD
Database SQLite (included) PostgreSQL 14+ for several servers or heavy traffic

Outbound HTTPS is needed only for Thawani payments and the optional AI service.

Browsers

The last two versions of Chrome, Edge, Safari (macOS and iOS) and Firefox, and Samsung Internet. Pages work without JavaScript for reading (catalogue, course pages, blog); the cart, checkout, quizzes and the dashboard need it.

PostgreSQL

  1. In prisma/schema.prisma, change the provider:
datasource db {
  provider = "postgresql"
  url      = env("DATABASE_URL")
}
  1. Set the connection in .env:
DATABASE_URL="postgresql://maarifa:password@localhost:5432/maarifa?schema=public"
  1. Run npm run setup.

Nothing else changes: the code uses Prisma only, and text search in the catalogue is done in the application so it behaves the same on both databases.

Several servers

The rate limits (sign-in, checkout, quiz attempts) are kept in memory per process. With more than one instance behind a load balancer, use sticky sessions or replace rateLimit() in src/lib/api.ts with a shared store such as Redis. Uploads must live on shared storage too.