
A full-stack web application combining video course delivery with a multi-level commission and referral system — built on NestJS, Prisma, and PostgreSQL with a React/Vite frontend, org-chart team visualisation, wallet management, and a full admin dashboard for user, plan, and withdrawal control.
The client needed a platform that could do two fundamentally different things simultaneously: deliver structured video courses with progress tracking, and run a multi-level commission system where users earn from both their own activity and the activity of people they refer. No off-the-shelf LMS handles MLM commission logic, and no MLM platform handles course delivery — so the entire system had to be custom-built.
The business model required granular control: admins needed to approve user registrations manually, manage plan tiers, process withdrawal requests, and track the full organisational hierarchy — all from a single dashboard. Without this level of administrative control, the financial integrity of the commission system would break down.
We built a NestJS API structured around feature modules — auth, courses, commissions, wallet, referrals, withdrawals, and admin — each with its own controller, service, and Prisma repository layer. JWT authentication with bcrypt handles security. The commission engine is a scheduled service that recalculates multi-level earnings at defined intervals and posts them to user wallets automatically.
The React frontend uses Redux Toolkit for all server state, giving the UI predictable, debuggable data flows across the course player, org chart, and wallet views. The team hierarchy is rendered as a live org chart using React Org Chart, letting users visualise their referral network in real time. Vimeo was integrated as the course video host to handle delivery infrastructure without building a CDN.
We designed the Prisma schema to handle the hardest problem first: the recursive team hierarchy. A correct referral tree model underpins every commission calculation in the system, so getting this right before building any feature was non-negotiable. Prisma Migrate gave us a clean, version-controlled path to evolve the schema as commission logic was refined.
The admin dashboard was scoped in detail before a single UI screen was built — every user action requiring approval (registration, withdrawal, plan changes) had a clear API endpoint and audit trail first. Winston logging was configured from the start so every financial event was traceable. The full system was deployed with Docker support for both the frontend and API, with Swagger documentation auto-generated from the NestJS decorators.
LMS course delivery and MLM commission engine in a single product
Commission calculations run on schedule — no manual processing
Every financial event logged and traceable via Winston
Ready to build?
Book a free 30-minute strategy call. We'll scope your MVP, define the architecture, and tell you exactly what it takes to launch.
Book a free strategy callarrow_forward