Skip to content

akkki007/learning-management-system

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

11 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸŽ“ AI-Powered Learning Management System

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.

πŸ“‹ Table of Contents


🎯 Overview

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

✨ Key Features

πŸ€– AI Assessment System

  • 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

πŸ—ΊοΈ Learning Roadmap

  • Auto-generated curriculum from assessment results
  • Structured modules organized by programming language
  • Visual progress tracking with completion statistics
  • Chapter-based navigation system

πŸŽ₯ Video Learning Platform

  • 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 Portal

  • Job listing with advanced search and filters
  • Company profiles and job details
  • Application management system
  • Salary and location-based filtering

πŸ“Š Progress Management

  • Multi-level progress tracking (video β†’ chapter β†’ module β†’ course)
  • Learning statistics dashboard
  • Completion milestones
  • Time tracking

πŸ› οΈ Tech Stack

Frontend

  • 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

Backend

  • Runtime: Node.js
  • API: Next.js API Routes
  • Database: MongoDB with Mongoose ODM
  • Authentication: Clerk
  • External APIs: YouTube Data API v3, DeepSeek AI

Development Tools

  • Package Manager: npm
  • Linting: ESLint
  • Type Checking: TypeScript
  • Version Control: Git

πŸ“ Project Structure

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

πŸ”„ Application Flow

User Journey

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

Detailed Flow Breakdown

1. Authentication Flow

User visits site β†’ Clerk authentication β†’ 
User created in DB via webhook β†’ 
Redirect to profile completion

2. Profile Completion Flow

User enters languages & proficiency β†’ 
POST /api/user/complete-profile β†’ 
Profile saved to MongoDB β†’ 
Redirect to dashboard

3. Assessment Flow

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

4. Roadmap Generation Flow

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

5. Learning Flow

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

6. Job Portal Flow

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

πŸš€ Getting Started

Prerequisites

  • 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)

Installation

  1. Clone the repository
git clone https://github.com/yourusername/learning-management-system.git
cd learning-management-system
  1. Install dependencies
npm install
  1. Set up environment variables (see Environment Setup)

  2. Run the development server

npm run dev
  1. Open your browser
http://localhost:3000

βš™οΈ Environment Setup

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

Setting Up Services

MongoDB

  1. Create account at MongoDB Atlas
  2. Create a new cluster
  3. Get connection string
  4. Add to .env.local

Clerk

  1. Create account at Clerk.com
  2. Create new application
  3. Get API keys from dashboard
  4. Configure webhook endpoint: /api/webhooks/clerk
  5. Add webhook secret to .env.local

YouTube API

  1. Go to Google Cloud Console
  2. Create new project
  3. Enable YouTube Data API v3
  4. Create API key
  5. Add to .env.local

DeepSeek AI

  1. Sign up at DeepSeek
  2. Get API key
  3. Add to .env.local

πŸ”Œ API Endpoints

Assessment

  • POST /api/assessment/generate - Generate AI assessment
  • POST /api/assessment/submit - Submit assessment answers
  • GET /api/assessment/results - Get assessment results
  • POST /api/assessment/reset - Reset assessment

Roadmap

  • GET /api/roadmap - Get user's learning roadmap
  • POST /api/roadmap/generate - Generate new roadmap

Learning

  • GET /api/learn/[chapterId] - Get chapter data
  • POST /api/learn/[chapterId] - Update chapter progress
  • POST /api/learn/[chapterId]/complete - Mark chapter complete

Progress

  • GET /api/user/progress - Get user progress
  • GET /api/progress/chapter/[chapterId] - Get chapter progress
  • POST /api/progress/chapter/[chapterId]/notes - Save notes

User

  • POST /api/user/complete-profile - Complete user profile
  • POST /api/user/check-profile - Check profile completion

Jobs

  • GET /api/jobs - Get all jobs
  • GET /api/jobs/[id] - Get job details
  • POST /api/jobs/[id]/apply - Apply for job
  • GET /api/jobs/my-jobs/[email] - Get user's applications

YouTube

  • GET /api/youtube/search - Search YouTube videos

πŸ—„οΈ Database Models

User Model

{
  clerkId: string;
  username: string;
  email: string;
  education?: string;
  career?: string;
  languagesKnown: [{
    name: string;
    proficiency: "Beginner" | "Intermediate" | "Advanced" | "Expert";
  }];
  isProfileComplete: boolean;
}

Course Model

{
  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;
    }];
  }];
}

Assessment Model

{
  userId: ObjectId;
  questions: [{
    question: string;
    options: string[];
    correctAnswer: number;
    userAnswer?: number;
    language: string;
  }];
  score: number;
  isCompleted: boolean;
  createdAt: Date;
}

User Progress Model

{
  userId: ObjectId;
  chapterId: ObjectId;
  videoProgress: number;
  completedVideos: [string];
  notes: [{
    timestamp: number;
    content: string;
    createdAt: Date;
  }];
  isCompleted: boolean;
  lastAccessed: Date;
}

Job Model

{
  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;
  }];
}

πŸš€ Deployment

Vercel (Recommended)

  1. Install Vercel CLI
npm i -g vercel
  1. Deploy
vercel
  1. Add Environment Variables
    • Go to Vercel dashboard
    • Add all environment variables from .env.local

Other Platforms

The application can be deployed to any platform that supports Next.js:

  • Netlify
  • Railway
  • Render
  • AWS Amplify

πŸ“ Available Scripts

# 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 ESLint

🎯 Key Features Explained

Smart Video Filtering

The system uses YouTube API's videoEmbeddable=true parameter to ensure only embeddable videos are selected, resulting in 99% playback success rate.

Intelligent Caching

API responses are cached to reduce external API calls:

  • YouTube search results: 5 minutes
  • Roadmap data: 5 minutes
  • User progress: Real-time updates

Progress Tracking

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

🀝 Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

πŸ“„ License

This project is licensed under the MIT License.


πŸ‘₯ Authors

  • Your Name - Initial work

πŸ™ Acknowledgments

  • 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

Releases

No releases published

Packages

 
 
 

Contributors