Urgent.News

the world's headlines, one feed

Editions

Tech

What I Learned Building a Production LMS with Node.js, MongoDB & AWS in 2026

Building an LMS looks simple at the beginning. You need users, classes, payments, attendance, recordings, homework, notifications, and reports. Then you move into production. Suddenly, you are dealing with authentication, permissions, concurrent requests, payment verification, background jobs, database indexes, cloud costs, logging, deployments, backups, and uptime. I have been working on a…

Building a production Learning Management System (LMS) using Node.js, MongoDB, and AWS proved to be more complex than initially anticipated. The project required handling various components such as user authentication, permissions, concurrent requests, payment verification, background jobs, and database indexing, among others. The author shares their experiences, lessons learned, and recommendations for future development.

The architecture of the LMS, which includes Node.js NestJS, MongoDB, AWS services, and external APIs, was deemed effective. However, what truly matters is how the system is designed around this technology. The author emphasizes the importance of proper system design over the choice of technologies.

Regarding Node.js, the author confirms that it can handle a serious production system with a large amount of I/O work. However, performance problems typically arise from poor database queries, missing indexes, excessive database round trips, unnecessary API calls, blocking work within request handlers, poor background job design, large payloads, weak caching strategies, and slow APIs. The author stresses the importance of addressing these issues before considering a technology stack replacement.

When using MongoDB, the author recommends avoiding treating schema design as optional. Instead, they advocate for dedicated collections to manage data growth and facilitate indexing, querying, and archiving. Proper database architecture is essential, even when working with MongoDB.

The attendance system in an LMS is more complex than it seems. It involves handling various factors such as class start time, student join time, late arrival, and session validity. To prevent duplicate attendance records under concurrent requests, the author suggests protecting the invariant at the database level by creating a unique index on the student, class, and session fields.

Payments in the LMS must be idempotent, meaning that the system should handle multiple payment callbacks without causing any issues. The author advises storing a unique reference from the payment provider and enforcing uniqueness at the database level to avoid processing the same transaction multiple times.

In summary, building a production LMS with Node.js, MongoDB, and AWS presented numerous challenges. The author shares their technical decisions, the problems they encountered as the system grew, and offers guidance on improving system design, database queries, attendance handling, and payment processing.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — it may contain errors, so check the original before relying on it.

Read the original at dev.to →

More in Tech

How ReactJS Can Improve User Experience and Boost Your Bottom Line?

Most content about ReactJS and business value follows the same template: virtual DOM makes it fast, components make it reusable, fast and reusable means good for business.

  • ReactJS improves user experience with virtual DOM updating only changed components.
  • Component reusability speeds development, reduces bugs, and enhances codebase stability.
  • React Native enables cross-platform app development, lowering maintenance costs.

Three checks in our codebase that could not fail

Last night I found three checks in our own codebase that could not fail. Not checks that were failing to catch things. Checks that were structurally incapable of ever going red, while reporting green…

  • Three code checks in the system are structurally incapable of failing
  • First check uses verifier with line-for-line copy of the rule it enforces
  • Second check asserts its own arithmetic, reporting PASS with mismatched assertions

Head-of-Line Blocking in HTTP

An asynchronous HTTP/1.1 server can handle many connections concurrently while still serializing work within each connection.

  • Head-of-line blocking delays fast HTTP requests in slow connections
  • HTTP/2 solves this at application layer with independent streams
  • HTTP/3 uses QUIC transport-level streams to avoid blocking