All projects

LMS Platform

Learnly connects pattern-first practice, personal progress, mentorship, and administration in one full-stack learning platform.

Full-stack productNext.jsTypeScriptMongoDBFirebase
Repository
Role Full-stack product development, learning workflows, backend integrations, and administration
Product Learnly — a pattern-first engineering learning platform
Stack Next.js App Router, React, TypeScript, Node.js, MongoDB/Mongoose, Tailwind, Firebase Cloud Messaging, and Razorpay
Scope Curriculum, personal progress, revision, visualizers, mentorship, squads, and admin tooling
Live product aveshpathaklms.vercel.app
Source github.com/avesh-pathak/opensource-lms

Overview

A learning platform is more than a catalogue of lessons. Students need to know what to do next, keep a reliable record of their work, return to material they are forgetting, and find help when a concept does not click. Operators need to manage the curriculum and the people around it.

Learnly puts those workflows in one application. The student surface connects engineering topics, problems, progress, revision, and visual explanation. Mentorship, squads, and community features add human support. An admin surface owns the operational side rather than treating the database as the only content-management tool.

Learnly dashboard showing recommended topics, daily practice, revision context, and an engineering learning path in a guest session.
The dashboard is a next-action surface, not just a statistics page. This guest-session capture contains no private learner records; zero progress is an initial state, not a measured engagement result.

Product problem

A problem sheet tells a student what exists. It does not necessarily tell them where to resume, which completed problem is due for revision, or how to connect a memorized solution to a reusable pattern.

The platform organizes that work into three responsibilities:

Surface Job
Public discovery Explain the curriculum, demonstrate the visualizer, and introduce mentorship
Student workspace Practice, track progress, revise, and find the next useful action
Administration Manage content, learners, mentors, bookings, notifications, and exports

These surfaces share a deployment and domain logic, but they do not share permission to mutate every record.

My contributions

The implementation work spans the frontend and the request paths behind it: dashboard and topic workflows, personal state persistence, role-aware routing, MongoDB-backed APIs, mentorship pricing and booking, Firebase notifications, and reusable administration/export modules.

The visualizer is a substantial subsystem of this product. Its replayable algorithm engine has a separate case study, so this account concentrates on how the learning platform fits together.

System architecture

flowchart TD P["Public pages"] --> N["Next.js application<br/>server components + route handlers"] S["Student workspace"] --> N A["Admin workspace"] --> G["Session and role checks"] G --> N N --> D["Domain modules<br/>learning · pricing · export · notifications"] D --> M[("MongoDB Atlas")] N --> O["Google / GitHub OAuth"] D --> R["Razorpay<br/>orders and checkout verification"] D --> F["Firebase Cloud Messaging"] D --> C["Cloudinary uploads"]

The current codebase is a Next.js application with same-origin API routes, not a separate React frontend talking to an independently deployed Express service. Route groups organize public, student, and admin screens without adding those group names to the URL.

MongoDB access uses both Mongoose and the native driver. Mongoose models cover schema-driven domain operations, while other modules use native collection reads and aggregations. Connection reuse reduces repeated setup, but the two access paths and legacy database-name choices are real maintenance boundaries—not architectural uniformity that the project has already achieved.

The learning workflow

The dashboard starts with practice: recommended topics, a daily goal, revision context, and an engineering path. A domain view narrows the curriculum; topic pages combine the problem list with progress and learning material.

The useful data boundary is between shared content and personal state. A problem's title, topic, difficulty, and link belong to the curriculum. Completion status, notes, stars, and timestamps belong to the learner. The client combines those sources rather than updating the shared problem document whenever one student solves it.

Personal state and revision

UserStateProvider loads personal state after authentication resolves. An interaction updates the UI optimistically, then persistence is debounced by one second. A sequence counter prevents an obsolete scheduled debounce from sending an older pending snapshot after a newer local update has replaced it.

That is a local scheduling safeguard, not a distributed consistency protocol. The current provider does not establish offline durability, multi-device conflict resolution, or a guarantee that an already-dispatched older network request cannot arrive late. Those are separate problems and useful next steps.

Completion records carry timestamps that the revision system can use when deriving review work. The learning layer overlays personal fields on content fetched from the server, so a curriculum edit does not have to erase a learner's notes or progress.

The repository also retains older progress representations, including profile synchronization and XP-oriented fields. Consolidating those paths is a meaningful follow-up: a single canonical progress model would make totals, leaderboards, and public profiles easier to reason about.

Mentorship and payments

Mentorship separates three concerns: the session catalogue and price, payment recording, and booking fulfilment. The price of a short consultation is not necessarily the mentor's hourly rate.

priceFor(sessionType, hourlyRate) centralizes that distinction. The UI, order route, and booking checks can refer to the same price table instead of maintaining independent constants. The source records why this mattered: comparing flat-price sessions against an hourly rate rejected otherwise legitimate lower-priced bookings.

The order route resolves mentorship pricing on the server. The verification route checks an HMAC over the Razorpay order/payment identifiers and checks for a previously completed transaction before inserting another record. That duplicate lookup expresses retry handling; it is not, by itself, proof of race-safe exactly-once processing.

For fulfilment, the booking route uses a MongoDB transaction to conditionally claim an available time slot and create a booking record. Notifications run after commit and are best-effort, so a push failure does not undo the booking.

The boundary is important: checkout, payment recording, and slot allocation are multiple steps. Production hardening still needs authoritative amount reconciliation, fully scoped slot identity, ownership checks, and a dependable meeting-provider integration. This case study does not describe the existing flow as a completed financial-security audit or an automatic Google Meet provisioning system.

Administration and exports

The admin workspace brings content and cohort operations into the application. Session checks and role checks belong on server requests, not only in a hidden sidebar item. A demo-access guard is available to reject write methods for demo sessions where routes apply it.

Exports are a good example of a deeper reusable module. A dataset adapter decides which documents become rows and which columns they expose. An export engine turns that common result into CSV, XLSX, or PDF.

flowchart LR Q["Admin request<br/>dataset + filters + format"] --> A["Dataset adapter"] A --> D["Columns + rows + summary"] D --> E["Export engine"] E --> C["CSV"] E --> X["XLSX"] E --> P["PDF"]

This avoids implementing every dataset/format combination independently. It also gives resource limits somewhere explicit to live: the documented audit-log adapter caps its output at 500 records rather than loading an unbounded audit history into memory.

Performance decisions

The public problems endpoint projects the fields the interface needs, sorts by curriculum order, and uses Mongoose lean() to avoid document hydration on that read. Its response advertises s-maxage=60 with stale-while-revalidate=300.

That cache boundary is appropriate for a shared content catalogue; it is not permission to publicly cache personal state. Connection reuse, selected fields, stable provider callbacks, and request-specific ownership checks solve different parts of the system and should not be collapsed into a single claim of being “optimized.”

There is no new load-test result or conversion metric claimed in this write-up. Screenshots demonstrate the product surface; source inspection explains the implementation. Neither substitutes for production observability or a benchmark.

Product screenshots

The captures show public or guest-visible product states. No live payment was made, no learner account was edited, and no private admin data is included.

Lessons and next steps

Decision Value Remaining work
One application for public, student, and admin surfaces Shared types, domain modules, and deployment Keep authorization enforced at each server boundary
Content separated from learner state Curriculum changes need not replace personal work Consolidate legacy progress representations
Optimistic, debounced progress Immediate interaction without a write on every click Improve retry, conflict handling, and offline guarantees
Shared mentorship pricing Consistent meaning across session types Strengthen provider-backed reconciliation and fulfilment
Adapter-based exports Add a dataset without rewriting formatters Stream or chunk larger exports

The strongest outcome is not a longer feature list. It is a connected learning loop: discover a pattern, practice it, record the work, revisit it, and get human help when needed. The next engineering gains come from making the data and payment boundaries as consistent as that product loop.

Explore the project

Design by Avesh
© 2026. Crafted in Hyderabad, India.