A comprehensive, intelligent learning platform that combines AI-powered assessments, personalized learning roadmaps, interactive video learning, and a job portal to create a complete educational ecosystem.
- Overview
- Key Features
- Tech Stack
- Project Structure
- Application Flow
- Getting Started
- Environment Setup
- API Endpoints
- Database Models
- Deployment
This Learning Management System (LMS) is a full-stack web application built with Next.js 16 that provides:
- AI-Powered Assessments - Generate personalized programming questions based on user skill level
- Personalized Learning Roadmaps - Auto-generated curriculum tailored to assessment results
- Interactive Video Learning - YouTube-integrated video player with notes and progress tracking
- Job Portal - Browse and apply for jobs with advanced filtering
- Progress Tracking - Real-time progress monitoring across all learning modules
- Note-Taking System - Timestamped notes synchronized with video playback
- Intelligent question generation using DeepSeek AI
- Multi-language support (JavaScript, Python, Java, etc.)
- Adaptive difficulty based on proficiency level
- Real-time scoring with detailed performance breakdown
- Auto-generated curriculum from assessment results
- Structured modules organized by programming language
- Visual progress tracking with completion statistics
- Chapter-based navigation system
- YouTube API integration for educational content
- Smart video filtering (99% embeddable success rate)
- Interactive player with playlist support
- Timestamped note-taking system
- Video completion tracking
- Job listing with advanced search and filters
- Company profiles and job details
- Application management system
- Salary and location-based filtering
- Multi-level progress tracking (video β chapter β module β course)
- Learning statistics dashboard
- Completion milestones
- Time tracking
- Framework: Next.js 16 (App Router)
- Language: TypeScript
- Styling: Tailwind CSS 4
- UI Components: Shadcn/ui, Radix UI
- Animations: Framer Motion
- Icons: Lucide React, React Icons
- State Management: React Hooks
- Runtime: Node.js
- API: Next.js API Routes
- Database: MongoDB with Mongoose ODM
- Authentication: Clerk
- External APIs: YouTube Data API v3, DeepSeek AI
- Package Manager: npm
- Linting: ESLint
- Type Checking: TypeScript
- Version Control: Git
learning-management-system/
βββ app/ # Next.js App Router
β βββ api/ # API Routes
β β βββ assessment/ # Assessment endpoints
β β β βββ generate/ # Generate AI questions
β β β βββ submit/ # Submit answers
β β β βββ results/ # Get results
β β β βββ reset/ # Reset assessment
β β βββ roadmap/ # Learning roadmap
β β β βββ generate/ # Generate roadmap
β β β βββ route.ts # Get roadmap
β β βββ learn/ # Learning endpoints
β β β βββ [chapterId]/ # Chapter-specific routes
β β β βββ route.ts # Get chapter data
β β β βββ complete/ # Mark chapter complete
β β βββ progress/ # Progress tracking
β β β βββ chapter/ # Chapter progress
β β βββ user/ # User management
β β β βββ complete-profile/ # Profile completion
β β β βββ check-profile/ # Check profile status
β β β βββ progress/ # User progress
β β βββ youtube/ # YouTube integration
β β β βββ search/ # Search videos
β β βββ jobs/ # Job portal API
β β β βββ route.ts # Get all jobs
β β β βββ [id]/ # Job details
β β β β βββ route.ts # Get job
β β β β βββ apply/ # Apply for job
β β β βββ my-jobs/ # User's applications
β β βββ webhooks/ # Webhook handlers
β β βββ clerk/ # Clerk webhooks
β βββ dashboard/ # Assessment dashboard
β βββ roadmap/ # Learning roadmap page
β βββ learn/[chapterId]/ # Video learning page
β βββ complete-profile/ # Profile completion
β βββ jobs/ # Job portal pages
β β βββ page.tsx # Job listings
β β βββ [id]/ # Job details
β β βββ create/ # Create job (admin)
β β βββ my-jobs/ # My applications
β βββ sign-in/ # Authentication
β βββ sign-up/ # Registration
β βββ layout.tsx # Root layout
βββ components/ # React Components
β βββ ui/ # Shadcn UI components
β βββ assessment-results.tsx # Assessment results display
β βββ learning-roadmap.tsx # Roadmap component
β βββ video-learning.tsx # Video player component
β βββ youtube-player.tsx # YouTube player wrapper
β βββ sidebar-nav.tsx # Navigation sidebar
β βββ mobile-navigation.tsx # Mobile navigation
β βββ navbar.tsx # Main navigation
β βββ job-portal/ # Job portal components
β βββ JobCard.tsx # Job card component
β βββ JobBanner.tsx # Search banner
β βββ JobSidebar.tsx # Filter sidebar
β βββ Newsletter.tsx # Newsletter component
βββ lib/ # Utility Libraries
β βββ cache.ts # Caching system
β βββ connectDB.ts # MongoDB connection
β βββ youtube-service.ts # YouTube API service
β βββ utils.ts # Helper functions
βββ models/ # MongoDB Models
β βββ user.models.ts # User schema
β βββ course.models.ts # Course/roadmap schema
β βββ assesment.models.ts # Assessment schema
β βββ userProgress.models.ts # Progress schema
β βββ job.models.ts # Job schema
βββ hooks/ # Custom React Hooks
β βββ use-mobile.ts # Mobile detection hook
βββ public/ # Static Assets
1. Landing Page (/)
β
2. Sign Up / Sign In (/sign-up, /sign-in)
β
3. Complete Profile (/complete-profile)
- Add programming languages
- Set proficiency levels
- Add education & career info
β
4. Dashboard (/dashboard)
- Take AI-powered assessment
- Answer programming questions
- View instant results
β
5. Learning Roadmap (/roadmap)
- View personalized curriculum
- See modules organized by language
- Track overall progress
β
6. Video Learning (/learn/[chapterId])
- Watch curated YouTube videos
- Take timestamped notes
- Mark videos as complete
- Navigate between chapters
β
7. Progress Tracking
- View completion statistics
- Monitor learning milestones
- Track time spent
User visits site β Clerk authentication β
User created in DB via webhook β
Redirect to profile completion
User enters languages & proficiency β
POST /api/user/complete-profile β
Profile saved to MongoDB β
Redirect to dashboard
User clicks "Take Assessment" β
POST /api/assessment/generate β
AI generates questions (DeepSeek) β
User answers questions β
POST /api/assessment/submit β
Calculate scores β
Display results β
Generate roadmap
Assessment completed β
POST /api/roadmap/generate β
AI creates curriculum structure β
For each chapter: Search YouTube API β
Filter embeddable videos β
Save roadmap to database β
Display roadmap to user
User clicks chapter β
GET /api/learn/[chapterId] β
Fetch chapter data & videos β
User watches videos β
Take notes (POST /api/progress/chapter/[chapterId]/notes) β
Mark video complete β
Mark chapter complete (POST /api/learn/[chapterId]/complete) β
Update progress
User visits /jobs β
GET /api/jobs β
Display job listings β
Filter/search jobs β
Click job β
GET /api/jobs/[id] β
View job details β
Apply (POST /api/jobs/[id]/apply) β
Track applications
- Node.js 18+ installed
- MongoDB database (local or Atlas)
- YouTube Data API key
- Clerk account for authentication
- DeepSeek AI API key (optional, for AI features)
- Clone the repository
git clone https://github.com/yourusername/learning-management-system.git
cd learning-management-system- Install dependencies
npm install-
Set up environment variables (see Environment Setup)
-
Run the development server
npm run dev- Open your browser
http://localhost:3000
Create a .env.local file in the root directory:
# Database
MONGODB_URI=your_mongodb_connection_string
# Clerk Authentication
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=your_clerk_publishable_key
CLERK_SECRET_KEY=your_clerk_secret_key
NEXT_PUBLIC_CLERK_SIGN_IN_URL=/sign-in
NEXT_PUBLIC_CLERK_SIGN_UP_URL=/sign-up
NEXT_PUBLIC_CLERK_AFTER_SIGN_IN_URL=/dashboard
NEXT_PUBLIC_CLERK_AFTER_SIGN_UP_URL=/complete-profile
WEBHOOK_SECRET=your_clerk_webhook_secret
# YouTube API
YOUTUBE_API_KEY=your_youtube_api_key
# AI API (DeepSeek)
DEEPSEEK_API_KEY=your_deepseek_api_key- Create account at MongoDB Atlas
- Create a new cluster
- Get connection string
- Add to
.env.local
- Create account at Clerk.com
- Create new application
- Get API keys from dashboard
- Configure webhook endpoint:
/api/webhooks/clerk - Add webhook secret to
.env.local
- Go to Google Cloud Console
- Create new project
- Enable YouTube Data API v3
- Create API key
- Add to
.env.local
- Sign up at DeepSeek
- Get API key
- Add to
.env.local
POST /api/assessment/generate- Generate AI assessmentPOST /api/assessment/submit- Submit assessment answersGET /api/assessment/results- Get assessment resultsPOST /api/assessment/reset- Reset assessment
GET /api/roadmap- Get user's learning roadmapPOST /api/roadmap/generate- Generate new roadmap
GET /api/learn/[chapterId]- Get chapter dataPOST /api/learn/[chapterId]- Update chapter progressPOST /api/learn/[chapterId]/complete- Mark chapter complete
GET /api/user/progress- Get user progressGET /api/progress/chapter/[chapterId]- Get chapter progressPOST /api/progress/chapter/[chapterId]/notes- Save notes
POST /api/user/complete-profile- Complete user profilePOST /api/user/check-profile- Check profile completion
GET /api/jobs- Get all jobsGET /api/jobs/[id]- Get job detailsPOST /api/jobs/[id]/apply- Apply for jobGET /api/jobs/my-jobs/[email]- Get user's applications
GET /api/youtube/search- Search YouTube videos
{
clerkId: string;
username: string;
email: string;
education?: string;
career?: string;
languagesKnown: [{
name: string;
proficiency: "Beginner" | "Intermediate" | "Advanced" | "Expert";
}];
isProfileComplete: boolean;
}{
userId: ObjectId;
modules: [{
title: string;
description: string;
language: string;
chapters: [{
title: string;
description: string;
difficulty: string;
videos: [{
videoId: string;
title: string;
duration: string;
thumbnail: string;
}];
isCompleted: boolean;
}];
}];
}{
userId: ObjectId;
questions: [{
question: string;
options: string[];
correctAnswer: number;
userAnswer?: number;
language: string;
}];
score: number;
isCompleted: boolean;
createdAt: Date;
}{
userId: ObjectId;
chapterId: ObjectId;
videoProgress: number;
completedVideos: [string];
notes: [{
timestamp: number;
content: string;
createdAt: Date;
}];
isCompleted: boolean;
lastAccessed: Date;
}{
jobTitle: string;
companyName: string;
companyLogo: string;
jobLocation: string;
minPrice: string;
maxPrice: string;
salaryType: string;
employmentType: string;
experienceLevel: string;
postingDate: string;
description: string;
applicants: [{
email: string;
appliedAt: Date;
}];
}- Install Vercel CLI
npm i -g vercel- Deploy
vercel- Add Environment Variables
- Go to Vercel dashboard
- Add all environment variables from
.env.local
The application can be deployed to any platform that supports Next.js:
- Netlify
- Railway
- Render
- AWS Amplify
# Development
npm run dev # Start development server
# Production
npm run build # Build for production
npm start # Start production server
# Code Quality
npm run lint # Run ESLintThe system uses YouTube API's videoEmbeddable=true parameter to ensure only embeddable videos are selected, resulting in 99% playback success rate.
API responses are cached to reduce external API calls:
- YouTube search results: 5 minutes
- Roadmap data: 5 minutes
- User progress: Real-time updates
Multi-level progress tracking:
- Video Level: Individual video completion
- Chapter Level: All videos in chapter completed
- Module Level: All chapters in module completed
- Course Level: Overall course completion percentage
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License.
- Your Name - Initial work
- Next.js Team - Amazing framework
- Shadcn - Beautiful UI components
- Clerk - Seamless authentication
- YouTube - Educational content platform
- MongoDB - Flexible database
- DeepSeek - AI capabilities
Made with β€οΈ for developers, by developers