CourseLit

Open-source, self-hosted LMS for selling online courses, digital downloads, and building communities on your own branded website.

1.2Kstars
244forks
GNU AGPLv3
TypeScript

CourseLit is a batteries-included, open-source learning management system built for creators who want full ownership of their courses, students, and revenue. It replaces SaaS platforms like Teachable, Thinkific, and Podia with a self-hosted alternative that covers the entire creator stack — from course authoring and payment processing to email marketing, website building, and community management.

Deployed as a single Next.js application backed by MongoDB, CourseLit supports multi-tenancy, allowing a single installation to power multiple independent “schools” each with their own branding, custom domain, and student base. SCORM 1.2 and SCORM 2004 packages are natively supported for e-learning standards compliance, while built-in Stripe, Razorpay, and LemonSqueezy integrations handle global payment processing without third-party plugins.

The platform is organized as a TypeScript monorepo using pnpm workspaces, with a GraphQL API layer cleanly separated by domain — courses, lessons, communities, payments, mails, and notifications. MediaLit, a companion service maintained by the same team, handles media storage across any S3-compatible provider including AWS S3, Cloudflare R2, and Backblaze B2.

CourseLit is actively developed with regular releases, a comprehensive integration test suite, and a public roadmap. It supports deployment via Vercel one-click deploy or Docker Compose for fully self-managed hosting.

What You Get

  • Course Authoring - Build multimedia online courses with video, images, downloadable files, and Tiptap-powered rich text; control lesson publish state and group them into drip-schedule sections.
  • SCORM Support - Upload and deliver SCORM 1.2 and SCORM 2004 compliant e-learning packages natively, enabling compatibility with industry-standard instructional design tools.
  • Digital Downloads - Sell ebooks, templates, PDFs, and other digital assets directly from your branded storefront with automated secure delivery after checkout.
  • No-Code Website Builder - Design landing pages, product pages, and blog sections using a visual drag-and-drop page builder without writing any code.
  • Multi-Provider Payment Processing - Accept payments via Stripe, Razorpay, or LemonSqueezy with one-time, subscription, and EMI payment plans configurable per product.
  • Email Automations & Sequences - Send targeted emails to segmented subscriber lists using built-in sequence and trigger logic, without needing Mailchimp or ConvertKit.
  • Graded Quizzes & Certificates - Add scored assessments to courses and automatically generate customizable completion certificates for students upon passing.
  • Community Spaces - Create paid or free member communities with text, image, and video posts directly embedded within your platform.
  • Multi-Tenancy - Run multiple independent branded schools from a single deployment, each with its own custom domain, theme, and student database.
  • S3-Compatible Media Storage - Integrate MediaLit (the companion service) with any S3-compatible bucket including AWS S3, Cloudflare R2, or Backblaze B2 for flexible, portable media hosting.

Common Use Cases

  • Launching a professional online academy - A software engineer sets up CourseLit on a $10/month VPS and Stripe to sell video courses on system design, keeping 100% of revenue without a platform fee.
  • Delivering SCORM-based corporate training - An HR department uploads compliance training modules built in Articulate Storyline as SCORM packages, delivering them to employees through a branded internal portal.
  • Selling digital templates and guides - A UX designer sells Figma UI kits and design system guides as digital downloads with automated checkout and download link delivery after payment.
  • Running a community-based coaching program - A fitness coach combines a video course library with a paid community space where members post workout videos, ask questions, and receive personalized feedback.
  • Building a multi-school e-learning platform - An edtech startup uses CourseLit’s multi-tenancy feature to host independent course sites for different subject-matter experts under one infrastructure.
  • Managing newsletter and content subscriptions - A writer uses CourseLit’s email sequences and subscriber segments to deliver premium newsletter content and drip-schedule article series to paying members.

Under The Hood

Architecture CourseLit is structured as a TypeScript monorepo with a clear boundary between the Next.js 14 web application (App Router) and a set of independent shared packages covering models, utilities, UI components, and email tooling. The core application follows a GraphQL-first API design where each domain — courses, lessons, users, communities, payments, mails, notifications — owns its own module with queries, mutations, business logic, and tests co-located. A multi-tenant Domain model is the foundational abstraction: all entities are scoped to a domain, enabling a single deployment to serve isolated schools with independent branding and student data. A separate queue microservice handles background tasks, and payments are abstracted behind a pluggable interface that swaps between Stripe, Razorpay, and LemonSqueezy without touching business logic.

Tech Stack The platform is built on Next.js 14 with App Router for both the public frontend and GraphQL API routes, backed by MongoDB via Mongoose ORM with fully typed models. Payment processing integrates Stripe, Razorpay, and LemonSqueezy through a shared payment interface abstraction. MediaLit, the team’s companion media service, handles file storage across any S3-compatible provider including AWS S3, Cloudflare R2, and Backblaze B2 via a dual-bucket architecture. Authentication uses better-auth with SSO support. Email delivery is handled by Nodemailer with configurable SMTP. The rich text editor is built on Tiptap (ProseMirror), and drag-and-drop course structuring uses DnD Kit. The frontend UI is built with Radix UI primitives and Tailwind CSS, while an Astro-based documentation site and a newer Next.js docs app handle documentation delivery.

Code Quality The codebase has extensive integration test coverage with 71+ test files organized within each GraphQL domain module, using mongodb-memory-server to run isolated in-memory MongoDB instances per test suite. Mocking discipline is strong, with external services like MediaLit and payment providers properly mocked via jest.mock. TypeScript strict mode is enforced across all packages, with typed GQL contexts, shared model interfaces, and typed HTTP error objects. Code style is enforced through ESLint, Prettier, and Husky commit hooks. Error handling uses string-keyed response constants and typed HttpError objects consistently throughout the GraphQL layer, preventing ad-hoc error leakage.

What Makes It Unique CourseLit’s multi-tenancy model — where one deployment supports multiple independent schools each with their own domain, theme, and student base — is a rare architectural feature for open-source LMS software. Native SCORM 1.2 and SCORM 2004 support enables compatibility with professional instructional design tools like Articulate Storyline and Adobe Captivate, a capability absent in most open-source alternatives. The companion MediaLit service with its dual S3-bucket architecture provides portable, vendor-agnostic media management. A unified platform covering courses, digital downloads, email sequences, website builder, and communities eliminates the need to integrate multiple third-party SaaS tools for common creator workflows.

Self-Hosting

CourseLit is released under the GNU Affero General Public License v3.0 (AGPL-3.0). In practical terms, this means you can freely run, modify, and distribute the software — including for commercial purposes — but if you distribute a modified version or run it as a network service, you must make the source code of your modifications available under the same AGPL-3.0 terms. For most self-hosters running the platform for their own online school or business, this copyleft clause is not a concern. For edtech companies intending to build and sell proprietary derivative products, the AGPL terms require careful legal review.

Self-hosting CourseLit requires a Node.js environment, a MongoDB database, SMTP credentials for email delivery, and access to a MediaLit instance (either the hosted cloud version at medialit.cloud or a self-deployed instance) for storing course media files. The recommended deployment path is Docker Compose with the provided configuration, covering the web application and queue service. Environment variables cover database connection, authentication secrets, payment provider keys, and email configuration. Database migrations are manual Node.js scripts that must be applied sequentially when upgrading between versions — this is the primary operational burden; administrators need to check migration files with each release and execute them against their MongoDB instance. Infrastructure management, uptime, backups, and scaling are entirely the operator’s responsibility.

The team also offers a managed cloud version at courselit.app with a 14-day free trial. The cloud tier removes all infrastructure management overhead, handles database backups and upgrades automatically, and provides the MediaLit media service out of the box. There is no documented enterprise-specific feature tier with advanced access control, SLA guarantees, or priority support, though the platform supports Single Sign-On configuration for organizations that need it. Teams evaluating CourseLit should weigh the operational cost of managing MongoDB, running manual migrations, and self-serving their media storage against the convenience and reduced overhead of the managed cloud offering.

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack

No spam. Unsubscribe anytime.

Join 750+ subscribers
No spam. Unsubscribe anytime.

Search