Learnix
Learning Management System
A full-featured Learning Management System, written in TypeScript end to end. It covers course creation, video delivery, Stripe checkout, threaded Q&A and reviews, real-time admin notifications and analytics, on a Redis-cached Express API.

- 6
- API domains
- 5 min
- Access token
- 3 days
- Refresh token
- 100 / 15 min
- Rate limit
Demo video
Demo video coming soon
A full walkthrough of Learnix will be added here.
Course purchase, learning experience and admin panel.
Overview
Learnix LMS is a Learning Management System built with Next.js and TypeScript on the frontend and Node.js, Express and TypeScript on the backend. The API manages online courses, authentication, enrolment, payments, content delivery and analytics, and follows a multi-layered architecture with a clear separation between routing, business logic and data access.
The system is designed to support:
- Multi-role user management for admins and regular users
- Course creation and content management with video streaming
- Secure payment processing through Stripe
- Interactive learning with questions, replies and reviews
- Administrative analytics and reporting
- Dynamic layout management for frontend content
Project Goals
Learnix is a community-driven platform built to help beginner developers grow into confident, industry-ready engineers. It bridges the gap between theory and practice with curated lessons, real-world projects and expert guidance, with the focus on learning by doing rather than consuming tutorials.
Beginner-friendly, practical learning
Real-world application of concepts to build strong engineering foundations.
Community-driven growth
Mentorship, collaboration and peer feedback in a supportive environment.
Progress through consistency
Learners improve one commit, one concept and one breakthrough at a time.
System Architecture
Learnix follows a three-tier architecture: a Next.js frontend, a Node.js and Express backend, and a MongoDB database with Redis in front of it. The split keeps the system modular and makes the client and server easy to scale independently.
| Layer | Description | Key components |
|---|---|---|
| Backend | Express.js REST API for the core LMS operations. | User management, course management, order processing, notifications, analytics and layout. Rate limited to 100 requests per 15 minutes per IP, with middleware for errors and cookies. |
| Data | MongoDB with Mongoose for modelling and schema validation. | User model with bcrypt hashing and JWT tokens, course model with content, videos, reviews and discussions, and an order model for purchase tracking. |
| Frontend | Next.js and React for a seamless learner experience. | Redux Toolkit with RTK Query, Socket.io client, NextAuth sessions and modular API slices for analytics, layout and orders. |
| Security | Data safety and controlled access across the system. | JWT access tokens (5 minutes) and refresh tokens (3 days), CORS locked to the frontend origin, and bcrypt password hashing. |
Key Features
Learnix combines technical depth with collaborative learning, so learners move beyond tutorials and start shipping production-ready applications.
Course management
- Video-based learning with thumbnails, demo URLs and structured video sections
- Benefits and prerequisites that state outcomes and entry requirements up front
- Reviews and ratings from 1 to 5 stars
- Q&A with threaded replies between students and instructors
Course creation and administration
- Multi-step creation workflow covering name, description, pricing, tags, category, level, demo URL and thumbnail
- Structured video content with titles, descriptions, length tracking and resource links
- Full CRUD through dedicated API endpoints
- Course dashboard as a data grid with ratings, purchase counts, dates and edit or delete actions
Interactive learning
- Students post questions tied to a specific video
- Instructors are notified of every new question
- Reviews with star ratings, calculated averages and review counts
- Admins reply to reviews through access-controlled responses
Student learning experience
- Authenticated access to purchased content only
- Previous and next controls that disable at course boundaries
- Tabbed player view for Overview, Resources, Q&A and Reviews
- Category filtering, search and responsive course cards for discovery
Payment and enrolment
- Stripe integration with dynamic pricing
- Purchase verification so enrolment is limited to users who bought the course
Real-time admin notifications
Socket.io pushes events to the admin panel the moment they happen.
- Course purchased: a live notification with sound and the buyer's details
- New review: the admin is told as soon as a student reviews a course
- Q&A activity: discussions surface the issues students are facing
Platform capabilities
- Real-world workflows: every module reflects actual engineering practice
- Community collaboration with accessible mentorship and visible progress
- Dark and light themes with smooth transitions
- Landing hero, course catalog, reviews and FAQ sections managed from the admin layout tools
API Architecture
Endpoints are grouped by business domain for clarity and scalability.
| Domain | Endpoints |
|---|---|
| User authentication and profiles | /api/v1/user/* |
| Course catalog | /api/v1/course/* |
| Order processing | /api/v1/order/* |
| Notification system | /api/v1/notifications/* |
| Analytics and reporting | /api/v1/analytics/* |
| Layout customisation | /api/v1/layout/* |
Tech Stack
Backend
- Node.js and Express.js for the API server
- TypeScript for type safety
- MongoDB with Mongoose for data modelling
- Redis (ioredis) for caching and session management
- JWT and bcryptjs for authentication
- Stripe for payments
- Nodemailer with EJS templates for email
- express-rate-limit for API rate limiting
Frontend
- Next.js and React for the application
- Redux Toolkit and RTK Query for state and data fetching
- TypeScript throughout
- Tailwind CSS and Material UI for styling and components
- NextAuth for session management
Media and real-time
- Cloudinary for cloud media storage
- VdoCipher for protected video streaming
- Socket.io for real-time notifications
Development and deployment
- ts-node-dev and dotenv for local development
- Vercel for the frontend
- Render for the backend API and the dedicated socket server
Database Design
Courses are the centre of the model. Each course holds its lesson content, and each lesson holds its own questions, replies and resource links, which keeps discussions attached to the exact video they are about.
Application Flow
A visitor either signs in or browses first. Both paths meet at the course details page, where purchase status decides between the Stripe payment flow and direct access to the player.
User and Admin Flows
Challenges and Solutions
| Challenge | Solution |
|---|---|
| JWT setup was confusing because of the access and refresh token lifecycle | Implemented proper token rotation and refresh logic for a seamless authentication flow. |
| Purchased count not updating during order creation | Used Mongoose's $inc operator to increment the count reliably as part of order processing. |
| Cache not updating after data changes | Added logic to refresh the Redis cache after every mutation so reads stay consistent. |
| VdoCipher errors while fetching and displaying videos | Debugged the API flow end to end and fixed the frontend and backend sync issues for smooth playback. |
| TypeScript model and relationship errors | Learned more advanced TypeScript patterns and corrected the model definitions and schema joins. |
| Tailwind screen config breaking responsive classes | Researched the breakpoint setup and corrected the screen configuration. |
| UI and UX issues in the admin panel and course overview | Refactored layout and logic to improve design and usability in the critical admin views. |
| Business logic errors in course creation and reviews | Refined the controller logic and added validation for review and course data. |
| Nested Q&A replies and review threading | Adjusted the schema and frontend rendering to support recursive replies and admin moderation. |
Best Practices
TypeScript on both sides
The whole project is typed across frontend and backend. Strict definitions catch errors early and keep complex modules such as course management, authentication and data processing maintainable.
Access and refresh tokens
Short-lived access tokens paired with refresh tokens strengthen session security and let sessions renew silently, so users are not asked to log in repeatedly.
State management with RTK Query
Automatic caching, fetching and revalidation of API calls removes boilerplate and keeps the interface responsive and current under heavy data flow.
User experience
Clear navigation, consistent interface elements, a responsive layout and immediate feedback make courses, dashboards and content easy to use on any device.
Conclusion
Learnix LMS is a complete, production-deployed Learning Management System that brings learners, instructors and administrators into one collaborative ecosystem. With robust authentication, a TypeScript architecture, Redis-backed performance and RTK Query on the client, it stays reliable as it grows, and it does what it set out to do: help developers turn theory into practice.