Back to BlogIndustry Guides

How to Build an LMS From Scratch, and When Not To

Rupak Amin

Founder & Lead Engineer, RAITHub

10 min read

Build an LMS from scratch only when the learning model is your product: courses, enrolments, attempts and grades are the core, and each attempt is stored as an event. If you need standard courses, quizzes and grading, Moodle, which is free and open source, or a hosted platform will be running far sooner than the 6–9+ months Cleveroad expects for a custom LMS.

A learning management system (LMS) is the software that holds courses, enrols learners, delivers content, runs assessments and records grades. This guide is for founders and product leads deciding whether to build one, and for teams who have decided to and want the architecture right. For the wider concerns of any learning product, such as accessibility, student-data privacy and exam-time load, read the edtech software development guide; this post stays on the LMS itself.

Should you build an LMS from scratch at all?

Usually not. Build only when the way your product teaches, assesses or sells cannot be expressed in an existing LMS without fighting it, and that difference is what customers pay for.

The default is strong. Moodle's public statistics list 146,945 registered sites in 236 countries (checked 29 September 2026), and Moodle is distributed under the GNU General Public License, so you can run and modify it without a licence fee. Moodle also offers a hosted service, MoodleCloud, if you do not want to run servers. A custom build competes with all of that on day one.

Your situationUsually the right choiceWhy
A school, college or training team delivering standard coursesMoodle, self-hosted or MoodleCloudCourses, quizzes, gradebook and plugins exist already; your effort goes into content
An expert or creator selling courses to individualsA hosted course platformPayments, video hosting and a storefront are included; you need none of the engineering
A company that needs its brand on a standard LMSA white-label or themed existing LMSBranding is a configuration problem, not a build
A product whose teaching method is the differentiator: adaptive practice, a tutor, a new assessment modelCustom, or custom around a standard coreThe part customers pay for cannot be bought
A platform other LMSs must plug into, or a marketplace of courses from many providersCustom, with LTI as a first-class featureYour data model and integrations are the product

A middle path is common and often wise: keep an existing LMS for enrolment and grading, and build only the differentiating tool, launched from inside it through LTI. That keeps the institution's workflow intact and puts your engineering where it earns money.

What does an LMS need, as a minimum?

Seven modules. A first version can be thin in each, but it cannot skip any, because learners, teachers and administrators all touch them.

ModuleWhat it doesFirst-version scope
Identity and rolesAccounts, organisations, learner, instructor and admin rolesEmail sign-in, three roles, one organisation per customer
Course structureCourses, modules, lessons and their orderOrdered lessons and quizzes inside a course
EnrolmentWho is in which course, in which role, from whenManual and invite-link enrolment
Content deliveryText, video, files, embedded activitiesRich text and video from a hosting provider
AssessmentQuizzes, assignments, markingAuto-marked quizzes; assignment upload with manual marking
Gradebook and progressScores, completion, what each learner has doneDerived from attempts, exportable as CSV
Administration and reportingManaging users and courses, seeing activityCourse completion and learner activity per course

Discussion forums, certificates, gamification, a course marketplace and live classes are all real features, and all belong after the first version, once learners are using the core.

How should you design the LMS data model?

Store every attempt as an immutable event, and derive grades and progress from that history. Never keep progress as a number that code overwrites, because you will need to explain, re-mark or audit it later.

A minimal PostgreSQL core, assuming orgs and users tables already exist:

create table courses (
  id uuid primary key default gen_random_uuid(),
  org_id uuid not null references orgs(id),
  title text not null,
  published_at timestamptz
);

create table enrolments (
  course_id uuid not null references courses(id),
  user_id uuid not null references users(id),
  role text not null check (role in ('learner', 'instructor', 'assistant')),
  enrolled_at timestamptz not null default now(),
  primary key (course_id, user_id)
);

create table items (
  id uuid primary key default gen_random_uuid(),
  course_id uuid not null references courses(id),
  kind text not null check (kind in ('lesson', 'quiz', 'assignment')),
  position int not null,
  max_score numeric
);

-- Append-only: a new attempt is a new row, never an update.
create table attempts (
  id bigint generated always as identity primary key,
  item_id uuid not null references items(id),
  user_id uuid not null references users(id),
  score numeric,
  payload jsonb not null,
  submitted_at timestamptz not null default now()
);

-- The gradebook is derived from attempts, not typed in.
create view latest_scores as
select distinct on (item_id, user_id)
  item_id, user_id, score, submitted_at
from attempts
order by item_id, user_id, submitted_at desc;

Three choices in that schema matter more than they look. The org_id on courses is the tenant boundary, so every query and every row-level security policy scopes to it. The payload keeps the learner's actual answers, so a marking bug can be fixed and every affected attempt re-marked. And the view makes "latest attempt counts" a policy you can change to "highest attempt counts" in one place, instead of a value scattered across tables.

Tenant isolation is the same problem as in any B2B SaaS. The patterns, including row-level security, are in the multi-tenant SaaS guide.

Where do LTI, SCORM and xAPI fit in a custom LMS?

They answer three different questions: LTI connects tools to an LMS, SCORM packages courses so any LMS can play them, and xAPI records learning activity anywhere. Decide early which ones your buyers will ask for.

StandardWhat it doesWhen you need it
LTI 1.3 and LTI AdvantageLets an LMS launch an external tool securely and exchange grades and rostersYour product must plug into schools' existing LMS, or accept tools inside yours
SCORMA packaging format for courses that LMSs can import and trackCustomers bring existing course libraries, common in corporate training
xAPIRecords learning experiences as statements, online or offlineYou track learning outside the LMS: simulations, mobile, in-person activity

According to 1EdTech, which maintains it, LTI allows learning management systems to integrate remote tools and content in a standard way; LTI 1.3 uses a security framework based on OAuth 2.0 and JSON Web Tokens, and LTI Advantage adds Assignment and Grade Services, Names and Role Provisioning Services, and Deep Linking. The xAPI overview describes xAPI as an IEEE-approved standard that captures data about a wide range of learning experiences, online and offline, in a consistent format.

Each standard is weeks of work to implement and test against the specific platforms your buyers use, so price them as separate lines. If none of your first customers needs one, leave it out of version one and design the data model so it can be added.

In what order should you build a custom LMS?

  1. Identity, organisations and roles, with tenant isolation from the first table.
  2. Courses, items and enrolment, so an instructor can build a course and invite learners.
  3. Attempts and marking, with the strictest tests in the codebase, because a scoring bug is a fairness problem.
  4. Gradebook and progress, derived from attempts, with CSV export.
  5. Content delivery beyond text: video hosting, file uploads.
  6. Payments, if learners or organisations pay directly.
  7. Standards (LTI, SCORM, xAPI) as buyers require them.
  8. Engagement: forums, certificates, notifications, once the learning loop works.

How long and how much does a custom LMS take?

Cleveroad's June 2026 edtech guide says a basic edtech MVP may take 3–5 months and a custom LMS or marketplace 6–9+ months, and puts a full-featured LMS with analytics, payments and integrations at $150,000–$250,000 or more. Those are market figures, not RAITHub quotes.

A narrow first version, one organisation type with the seven modules at first-version scope and no standards, is much smaller than a full LMS. RAITHub's fixed-scope norm for a focused first release is 4–6 weeks; whether an LMS first version fits that depends on how many roles, content types and integrations it has, which is what the audit establishes. The MVP cost estimator gives a quick range, and the MVP development service describes how a fixed-scope first release is run.

What does RAITHub's experience cover, and what does it not?

RAITHub built PadhAI, an AI tutoring platform, not a general LMS. Its hardest parts carry over directly; some LMS work would be new.

  • Carries over: adaptive assessment driven by knowledge tracing, a Socratic tutor with math verification and retrieval-augmented generation (RAG), a 70/20/10 model router for AI cost, 11 services (9 Node/TypeScript, 2 Python/FastAPI), the same learning experience across a PWA, WhatsApp and Telegram, and 9 payment gateways behind one abstraction.
  • Would be new work: LTI and institutional SSO are not part of PadhAI's published description, and RAITHub's published work does not include a SCORM or xAPI implementation. On your project, those are estimated and tested as new work.

The PadhAI architecture is on the work page and in the PadhAI case study (PDF). RAITHub does not publish PadhAI user numbers or learning outcomes.

Why RAITHub for a custom LMS

  • The learning core is built before. Assessment, progress from attempt history, and an AI tutor that checks itself are PadhAI's foundations.
  • Multi-tenant data done properly. Sundor Skin, a B2B platform RAITHub built, runs 146 PostgreSQL tables with row-level security and 530+ tests, the isolation an LMS serving many organisations needs.
  • Honest about the build-or-buy call. The free 15-minute technical audit may conclude you should use Moodle, and the written memo will say so.
  • Fixed scope, your IP. A fixed written quote after the audit; you own the code and the IP, and an NDA is standard.

When you don't need us

  • Your courses fit a standard LMS. Use Moodle or a hosted platform and spend the budget on content.
  • You need instructional design or course content. RAITHub builds the platform, not the curriculum.
  • You need a vendor with shipped LTI or SCORM integrations today. RAITHub's published work does not include one.
  • You need a SOC 2 or ISO 27001 certified vendor. RAITHub is not certified; see the security page.

What RAITHub builds for learning products is on the EdTech page. If a custom LMS is the right call, book the free 15-minute technical audit and bring your learners, roles and the standards your buyers ask for.

Last reviewed: 29 September 2026. External sources checked on 29 September 2026.

Frequently asked questions

Is it worth building an LMS from scratch?

Only when your teaching or assessment model is the product and cannot be expressed in an existing LMS. For standard courses, quizzes and grading, Moodle or a hosted platform is faster and cheaper.

What are the core features of an LMS?

Identity and roles, course structure, enrolment, content delivery, assessment, a gradebook with progress tracking, and administration with reporting.

How long does it take to build a custom LMS?

Cleveroad's June 2026 guide expects 6–9+ months for a custom LMS. A narrow first version with no standards integrations is much smaller; RAITHub scopes it after a free 15-minute audit.

What is the difference between LTI, SCORM and xAPI?

LTI lets an LMS launch an external tool and exchange grades and rosters. SCORM packages courses for import into an LMS. xAPI records learning activity anywhere, online or offline, as statements.

Is Moodle free?

Moodle is open source under the GNU General Public License, so there is no licence fee. You still pay for hosting, or for its hosted service, MoodleCloud, and for any customisation.

Has RAITHub built an LMS?

RAITHub built PadhAI, an AI tutoring platform with adaptive assessment and a Socratic tutor, not a general LMS. LTI, SSO, SCORM and xAPI would be new work on your project.

how to build an LMSLMS from scratchcustom LMSMoodleLMS data modelSCORMxAPILTI

Ready to discuss your project?

Book a free 15-minute technical audit with our engineering team.