Advanced Practical Definition #2 — Project: “Online Learning Platform (LMS)”

Perfect 🚀 You already have one advanced exam-style project (E-commerce API with JWT, RBAC, file upload, pagination, Socket.IO).
Now, let’s define another advanced-level practical definition that covers different advanced Node.js concepts — so you get practice across the full spectrum.


🔥 Advanced Practical Definition #2 — Project: “Online Learning Platform (LMS)”

Duration: 2–3 hours practical exam
Focus: Authentication, Authorization, Payments, Microservices, WebSockets, Testing, Caching, Logging, Monitoring


📌 Problem Statement

Build a mini Learning Management System (LMS) backend with these features:

1. Authentication & RBAC

  • JWT-based login/register with refresh tokens.

  • Roles: student, teacher, admin.

  • Rules:

    • teacher can create courses.

    • student can enroll in courses.

    • admin can manage users + all courses.


2. Courses & Enrollment APIs

  • POST /courses (teacher only): create course with title, description, price.

  • GET /courses (any user): list courses with pagination, search, filtering.

  • POST /courses/:id/enroll (student only): enroll in course.


3. Payments Integration (Stripe/Mock)

  • On enroll, call a Payment Service (microservice).

  • If payment succeeds → enroll student.

  • If fails → return error.

  • Mock with simple success/fail simulation if no Stripe key provided.


4. Caching Layer (Redis)

  • Cache GET /courses results for 1 minute.

  • If new course is added, clear cache.


5. WebSockets (Socket.IO)

  • When a student enrolls → notify the teacher in real time:

    • "New student enrolled in your course: {studentName}"


6. Background Jobs (Queue)

  • After enrollment → send welcome email asynchronously (mocked via console.log).

  • Use Bull / Agenda with Redis.


7. API Gateway + Microservices (Optional if time)

  • Split into 2 services:

    • User Service (auth, profile)

    • Course Service (courses, enrollments, payments)

  • Use Express Gateway or a custom API gateway.


8. Advanced Security

  • Rate limiting per IP (100 requests/15 min).

  • Helmet for headers.

  • Input validation with Joi/Yup.


9. Testing (Unit + Integration)

  • Write Jest tests for:

    • Register/login flow.

    • Enroll API (success + failure).


10. Monitoring & Logging

  • Use Winston or Pino logger for structured logs.

  • Add health check endpoint /health returning DB + Redis status.


💡 Bonus Tasks (if extra time)

  • GraphQL endpoint for querying courses + students.

  • CI/CD with Docker + GitHub Actions.

  • Swagger docs (/api-docs).


🎯 Why this is Advanced?

Because it combines:

  • JWT + Refresh tokens (auth lifecycle)

  • Role-based access control

  • Redis caching

  • Socket.IO real-time

  • Background jobs (async email)

  • Payments integration (Stripe/mock microservice)

  • Testing (Jest)

  • Logging + monitoring

  • Optional Microservices & API Gateway


👉 This is the kind of exam top companies give for 2–3 hours practical test.
It touches nearly every advanced Node.js backend concept in one project.


Would you like me to prepare the full project scaffold with code (like I did for the E-commerce one) so you can actually practice it end-to-end?

Previous Post Next Post