A full-stack LMS covering:
- Admin bulk-invites trainees from an uploaded Excel list
- Trainers build chapters (video/slides/GitHub repo), quizzes, and a capstone/peer-reviewed assignment; trainees get a progress bar; completers get an encrypted, QR-verifiable transcript
- Trainee dashboard: resume where you left off, assignments due, notifications
- Peer review (never your own submission) averaged with the trainer's score for the final grade
- Calendar / timetable for live sessions
- Trainer-submitted curricula require super-admin approval before becoming a live course
Stack: Node.js/Express + PostgreSQL (plain SQL via the pg driver — no ORM binary downloads to worry about) and Next.js + Tailwind on the frontend.
You said you already run Postgres locally, so:
- Create a database:
createdb uneca_lms # or, from psql: # CREATE DATABASE uneca_lms;
- Edit
backend/.envand setDATABASE_URLto your real credentials:DATABASE_URL="postgresql://YOUR_USER:YOUR_PASSWORD@localhost:5432/uneca_lms?schema=public" - Also change
JWT_SECRETandTRANSCRIPT_ENC_KEYin that file to your own random strings before going anywhere near production — the checked-in values are dev placeholders only. - Load the schema:
(or just
psql "$DATABASE_URL" -f backend/db/schema.sqlpsql -h localhost -U YOUR_USER -d uneca_lms -f backend/db/schema.sql)
That's it — no migration engine, no binary downloads. backend/db/schema.sql is the single source of truth for the schema.
cd backend
npm install
node src/seed.js # creates the first Super Admin account (prints email/password)
npm run dev # starts on http://localhost:4000By default, invite emails just print to the console (src/utils/email.js) so you can develop without SMTP. To send real email, set SMTP_HOST, SMTP_PORT, SMTP_USER, SMTP_PASS, SMTP_FROM in backend/.env.
Uploaded files (submissions, invite spreadsheets, generated transcripts) are written to backend/src/uploads/ and served at /uploads/.... For a real deployment, point this at a persistent disk or swap in S3-compatible storage.
cd frontend
npm install
npm run dev # starts on http://localhost:3000frontend/.env.local has NEXT_PUBLIC_API_BASE=http://localhost:4000 — change this if your backend runs elsewhere.
- Log in as the seeded Super Admin (credentials printed by
node src/seed.js). - Admin → create a cohort, then either invite one person or bulk-upload an
.xlsxwith columns Full Name, Email, and optionally Role (TRAINEE/TRAINER). - Each invited person gets an emailed (or console-logged) link to
/accept-invite/<token>to set their password. - Log in as the trainer → submit a curriculum → log back in as Admin → approve it (this auto-creates the live course) → enroll trainees (currently done via
POST /admin/enrollments; a UI button for this is a natural next addition). - Trainer → build chapters, content, quizzes, and the capstone assignment.
- Trainee → work through chapters (progress bar updates), take quizzes, submit the capstone.
- Trainer → "Randomly assign peer reviewers" on the capstone, then grade submissions yourself; the final grade is the average of the peer and trainer scores.
- Trainer → Course Settings → once a trainee has completed everything, click "Generate" to produce their signed, QR-coded transcript PDF. Anyone can scan the QR (or visit
/verify/<code>) to verify it without logging in.
Built and tested end-to-end:
- All 6 requested workflows, backend routes, and a full Next.js UI for admin/trainer/trainee
- AES-256-GCM encrypted, HMAC-signed transcripts with QR codes (visually verified)
- Peer review correctly blocks self-review; grade averaging tested
Recommended before a real UNECA rollout:
- Email: wire up real SMTP (or an ESP like SES) — currently console-only in dev
- File storage: move
uploads/to S3 or equivalent for durability and backups - Enrollment UI: enrolling a trainee into a course currently has an API but no admin-console button yet
- Password reset / account recovery flow (not built yet — only invite-based account creation)
- Rate limiting, HTTPS, and a proper secrets manager for
JWT_SECRET/TRANSCRIPT_ENC_KEYin production - Automated backups of the Postgres database
- A security review before handling real trainee data, given this is UN-affiliated infrastructure