Functional Requirement Document (FRD)
This Functional Requirement Document specifies what EduNest LMS does from a behavioral perspective: its modules, pages, features, learner/instructor/admin flows, validation, and the business rules that govern them. It complements the Business Requirement Document by translating goals into concrete, testable functionality across the storefront, the learner and instructor portals, and the admin CMS — all served from one Next.js 16 application.
Module Overview
EduNest groups functionality into nine functional areas. Course selling and delivery are part of the free core; premium LMS features and additional integration providers unlock via CreativeCape add-on licensing.
| # | Module | Purpose |
|---|---|---|
| 1 | Catalog | Public course/bundle/instructor browsing with categories, search, and reviews |
| 2 | Cart & Checkout | Cart, coupons, gift cards, tax, and order creation |
| 3 | Payments | PayPal online gateway + offline methods (CoD / Bank Transfer); pluggable driver registry |
| 4 | Enrollment & Learning | Enrollment on paid orders, drip unlocking, lesson player, progress, quizzes/surveys/assignments |
| 5 | Learner Dashboard | The /learner portal — courses, progress, grades, orders, subscriptions, messaging |
| 6 | Instructor | The /instructor portal — authoring, enrollments, earnings, payouts, analytics |
| 7 | Admin / CMS | The /admin panel — learning ops, customers, orders, marketing, content, settings |
| 8 | Add-ons & Licensing | 93 built-in add-ons (53 channel providers + 40 LMS features), license/purchase-code activation |
| 9 | Auth | Member and admin sessions, OTP/email verification, social sign-in, RBAC |
Catalog
Public storefront under / (the (site) route group).
| Route | Page |
|---|---|
/ |
Homepage (hero, sections, featured content) |
/courses |
Course catalog with search, category, level, price, and sort filters |
/courses/[slug] |
Course detail — curriculum accordion, reviews, pricing |
/bundles, /bundles/[slug] |
Bundle (learning path) listing and detail with included courses |
/instructors, /instructors/[id] |
Instructor grid and public profile with stats |
/blogs, /blogs/[slug] |
Marketing blog listing and post |
/membership |
Subscription/pricing-plan page |
/gallery, /about, /contact, /faq, /enquiry |
CMS / marketing pages |
/cart, /checkout |
Cart and checkout |
Capabilities:
- Published-course catalog with faceted filtering (category tree, level, language, price) and sorting; results are cached for hot public pages.
- Course detail renders sections and lessons as a curriculum accordion, with preview lessons, ratings (
rating_avg/rating_count), and approved reviews. - Hierarchical course categories with parent/child nodes and per-node published counts.
- Bundles aggregate multiple courses; instructor profiles aggregate course count, rating, and student count.
Cart & Checkout
APIs under /api/v1/checkout.
- Coupon preview —
POST /api/v1/checkout/couponre-prices the cart server-side and returns the discount without creating an order. Coupons supportPERCENTorAMOUNTdiscounts, a minimum total, a max-discount cap, redemption limits, a validity window, and scoping (ALL/PRODUCTS/CATEGORIES). - Gift cards —
POST /api/v1/gift-cards/validatechecks a code isACTIVE, unexpired, in the right currency, and has balance. - Payment methods —
GET /api/v1/checkout/methodslists the active gateways for the method picker. - Order creation —
POST /api/v1/checkoutre-prices the cart server-side, re-validates the coupon, applies tax, and creates atransactionsrow. Free/fully-discounted carts enroll immediately; online gateways return a redirect/approval; offline methods return apendingorder. - Verification —
POST /api/v1/checkout/verifyandGET /api/v1/checkout/return/[provider]confirm payment with the driver and finalize enrollment.
Payments
- Built-in online gateway: PayPal (Orders v2, redirect flow) using client-id/secret with
test/live/sandboxmodes. - Offline methods: Cash-on-Delivery and Bank Transfer — create a
pendingorder fulfilled by admin "Mark as Paid". - Pluggable driver registry: premium gateways (e.g. Stripe, Razorpay, and more) ship as self-contained add-on drivers, configured in admin settings.
- Active gateway configuration is read from the
integration_connectionstable (channelPAYMENTS), with secrets decrypted server-side only.
Enrollment & Learning
Order statuses: pending, paid, failed, refunded.
- Enrollment trigger. When an order becomes paid, enrollments are created automatically — one per course — with the source set to
purchase,bundle,membership, orfree, linked to the originating transaction. The courseenrollment_countis incremented and instructor earnings are recorded for priced courses. - Offline fulfilment.
pendingoffline orders are fulfilled via the admin order action (mark_paid), which re-resolves the stored line items, creates enrollments, setspaid_at, and redeems any coupon. - Lesson types (from
src/lib/lesson-types.ts): Content — video, audio, article, resource (downloadable), slides, external link; Assessment — quiz, practice test, assignment, coding; Engagement — Q&A, survey, checklist, todo task. - Lesson player —
GET /api/v1/learn/[slug]returns the curriculum with per-lesson completion and drip-unlock state; content for locked lessons is withheld. - Drip content — lessons unlock
immediate,days_after_enroll, on adate, orafter_prev; bundles addafter_previous/days_after_purchasecourse-level gating. - Progress —
lesson_progresstracks completion and last video position; completing a lesson recomputesenrollments.progress_pctand flips status to completed at 100%, recordingcompleted_at. - Engagement APIs — mark complete, load/score quiz & survey activities, private notes, lesson discussion, helpful votes, and issue reports.
Learner Dashboard
Portal under /learner (member session, dynamically rendered to reflect live theming).
| Route | Purpose |
|---|---|
/learner/dashboard |
Overview: enrolled courses, progress, upcoming lessons |
/learner/my-courses |
Enrolled courses with progress and access state |
/learner/my-bundles |
Bundle enrollments |
/learner/progress, /learner/grades |
Progress milestones and assessment grades |
/learner/calendar |
Schedule and deadlines |
/learner/orders |
Purchase history |
/learner/subscriptions |
Active membership plan and included courses |
/learner/wishlist |
Saved courses |
/learner/messages, /learner/notifications |
Instructor messaging and in-app notifications |
/learner/analytics |
Personal learning analytics |
/learner/my-mentor |
Mentor assignment and messaging |
/learner/account, /learner/addresses, /learner/profile-summary |
Account, addresses, public profile |
Instructor
Portal under /instructor (same member session, accountType: instructor).
| Route | Purpose |
|---|---|
/instructor/dashboard |
Teaching overview |
/instructor/courses, /instructor/bundles |
Author courses and bundles |
/instructor/students, /instructor/enrollments, /instructor/groups |
Roster, enrollments, cohorts |
/instructor/earnings, /instructor/payouts, /instructor/statements |
Revenue, payout requests, statements |
/instructor/quizzes, /instructor/surveys, /instructor/submissions, /instructor/survey-responses |
Assessments and responses |
/instructor/reviews |
Student reviews with instructor replies |
/instructor/analytics, /instructor/progress |
Engagement and student progress |
/instructor/calendar, /instructor/messages, /instructor/notifications, /instructor/tasks |
Schedule, messaging, tasks |
/instructor/organization, /instructor/settings |
Org settings and instructor profile |
Admin / CMS
Panel under /admin/(panel) (admin session, permission-gated).
- learning — learners, instructors, courses, categories, bundles.
- customers, orders (with per-order detail and Mark as Paid), revenue, dashboard (revenue/analytics).
- marketing — coupons, gift-cards. subscription and plan-changes — pricing plans and plan-change requests.
- Content/CMS — pages, blogs (+ categories), hero-slider, testimonials, why-choose-us, gallery, events, faqs, partners, reviews, about, media.
- leads — contacts, newsletter, enquiries. quizzes, surveys, todo-tasks authoring.
- settings sections include: payments, checkout, tax / tax-rates, currencies, countries, locations, integrations, notifications (email/sms/whatsapp/in-app/push/webhook) + notification-log, languages, invoice, theme, roles, permissions, users, api-tokens, webhooks, backup, advanced, activity.
Add-ons & Licensing
- EduNest ships 93 built-in add-ons: 53 channel integration providers across categories — Payments, Email, Storage, Analytics, Video, Calendar, CAPTCHA, Realtime Chat, AI Chatbot, Live Chat, SMS, Social Auth, Shipping, WhatsApp — plus 40 premium LMS feature plugins (e.g. certificates, advanced exams, forums, gamification/points, AI tutor, analytics).
- Free defaults include SMTP (email), PayPal + CoD + Bank (payments), Cloudflare R2 (storage), GA4 (analytics), and YouTube/Vimeo (video); other providers are premium.
- Gating. A premium provider or feature serves only when unlocked. Activation is per-add-on via an Envato-style purchase code entered in admin → Add-ons, exchanged once for an RS256 JWT bound to
{ addon, domain }and then verified offline on every check; the domain license can also grant entitlements ("*", a channel id, or"channel:provider"). Localhost/dev hosts are unlocked. - Toggling. Server-side gates (
premiumBlock/featureBlock) and the clientuseFeatureActive()hook check installation and entitlement before exposing a feature.
Auth & Permissions
| Aspect | Learner / Instructor | Admin |
|---|---|---|
| Session cookie | member_session (HS256 JWT, 30 days) |
admin_token (HS256 JWT, 7 days default) |
| Routing | accountType (student / instructor) |
Direct admin login |
| Verification | Email/OTP via email, SMS, or WhatsApp | — |
| Social sign-in | OAuth providers (e.g. Google, Facebook) when configured | — |
| Authorization | Role-based portal access | Fine-grained resource:action matrix |
- Auth routes (
/(auth)):login,register,forgot-password,reset-password,verify-email. - OTP/verification delivery channel is admin-configurable; a QA test-contact/test-code bypass exists for staging.
- Admin RBAC —
permissions-catalog.tsdefines resources × CRUD actions;requirePermission(action, resource)enforces per route and returns 403 when denied, emitting an audit event on mutations. System/super roles bypass the matrix.
Validation & Business Rules
- Server-side re-pricing: cart totals, coupons, gift-card balances, and tax are recomputed on the server at order time — never trusted from the client.
- File uploads pass through the server to R2/S3; images are processed (resize/convert) with sharp before storage.
- BR-A Enrollment is created only when an order is
paid; offline orders require admin Mark as Paid. - BR-B Drip and bundle rules decide when owned content unlocks; locked content is withheld server-side.
- BR-C Premium add-ons require a valid entitlement or purchase code (dev/localhost unlocked).
- BR-D Integration secrets are stored AES-256-GCM encrypted and never returned to clients.
- BR-E Admin mutations are permission-checked and audited.
For functional questions or feature requests, contact support at creative-cape.com.
© CreativeCape Solutions · creative-cape.com · support@creative-cape.com