Skip to content

About

πŸŽ“ LearnPath AI is a prerequisite-aware AI learning advisor that analyzes a student's background, goals, and known skills to build an ordered learning path. It combines a curated course catalogue, deterministic prerequisite resolution, skill-gap analysis, and Gemini-powered explanations to make AI learning recommendations grounded and actionable.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

πŸŽ“ LearnPath AI β€” Prerequisite-Aware AI Learning Advisor

LearnPath AI Banner

Live Demo GitHub Repo

TypeScript React TailwindCSS Express Vite License

Personalized, Graph-Aware Learning Path Generator with Prerequisite Resolution & AI Guidance

🌐 Live Web App: https://learn-path-ai.netlify.app/ Β |Β  πŸ™ GitHub Repository: https://github.com/bikram73/LearnPath_AI


πŸ“‘ Table of Contents

πŸ“– Description
πŸš€ Section
View the project features and capabilities. πŸ‘‰
View the technologies, frameworks, and programming languages used. πŸ‘‰
Explore the project's folder and file organization. πŸ‘‰
Follow the installation steps and local development setup. πŸ‘‰
Understand the complete AI document processing pipeline. πŸ‘‰
Learn about the AI prompting strategy and anti-hallucination techniques. πŸ‘‰
Understand how confidence scores are calculated and interpreted. πŸ‘‰
View all deliverables required for the AI challenge. πŸ‘‰
View the available REST API endpoints and usage examples. πŸ‘‰
Explore the complete system architecture, AI workflow, processing pipeline, data flow, deployment design, and technical decisions. πŸ‘‰
Review implementation details, AI pipeline, performance metrics, benchmarking, validation strategy, privacy, testing, and technical specifications. πŸ‘‰
Review processing speed, latency, and performance benchmarks. πŸ‘‰
Understand the current limitations and known failure cases of the AI extractor. πŸ‘‰

✨ Features

  • 🎯 Intelligent Student Profile Wizard: 4-step wizard capturing academic background, current skills, desired career goal, experience level, weekly study hours, and learning style.
  • 🌳 Prerequisite-Aware Topological Ordering: Builds a Directed Acyclic Graph (DAG) across courses ensuring foundational modules (e.g. Linear Algebra, Python, SQL) precede advanced subjects (e.g. Deep Learning, Distributed Systems).
  • 🧩 Skill-Gap Analysis & Match Score: Evaluates user skills against target career profiles to identify acquired vs missing competencies with precision.
  • πŸ’¬ Interactive AI Learning Advisor: Real-time context-aware chat assistant to discuss study pacing, course alternatives, capstone ideas, and career preparation.
  • πŸ“š Comprehensive Course Catalog: Searchable and filterable course library with difficulty filters, duration tags, prerequisites, and key topic badges.
  • πŸ‘₯ Pre-configured Sample Personas: Instant one-click profiles representing common learner archetypes (e.g. Alex Rivera, Priya Patel, Marcus Chen).
  • πŸ“± Adaptive Responsive UI & Mobile Navigation: Tailored desktop header + pinned mobile bottom navigation bar with fluid transitions.
  • πŸ”’ Privacy-First Zero-Auth Architecture: Stateless computation with no tracking cookies or user login requirements.

πŸ› οΈ Tech Stack

πŸ’» Languages & Runtimes

  • TypeScript 5.8: Strongly typed frontend and backend code
  • Node.js 20+: Backend runtime environment
  • HTML5 & CSS3: Semantic markup and modern styling

🎨 Frontend Framework & Styling

  • React 19: Modern component architecture with functional hooks
  • Tailwind CSS v4: Utility-first styling engine with @tailwindcss/vite
  • Lucide React: Modern iconography system
  • Motion (Framer Motion): Smooth interactive UI transitions

βš™οΈ Backend & API Server

  • Express.js 4.21: High-performance RESTful API endpoints
  • Vite 6.2: Next-generation frontend build tool with middleware mounting in dev
  • tsx: Ultra-fast TypeScript execution engine

🧠 Artificial Intelligence & Reasoning

  • Google Gen AI SDK (@google/genai): Cascade architecture (gemini-2.5-flash / gemini-1.5-flash) for contextual rationale synthesis and conversational tutoring
  • Deterministic Graph Engine: 3-color DFS topological sorting and prerequisite dependency resolution algorithm

πŸ“‚ File Structure

learnpath-ai/
β”œβ”€β”€ πŸ“„ .env.example                 # Environment variables template
β”œβ”€β”€ πŸ“„ .gitignore                   # Git ignore configuration
β”œβ”€β”€ πŸ“„ index.html                   # HTML entry point with Inter font & SEO meta
β”œβ”€β”€ πŸ“„ metadata.json                # Project metadata & capabilities manifest
β”œβ”€β”€ πŸ“„ package.json                 # Project dependencies and npm scripts
β”œβ”€β”€ πŸ“„ server.ts                    # Express backend + Vite dev middleware server
β”œβ”€β”€ πŸ“„ tsconfig.json                # TypeScript compiler configuration
β”œβ”€β”€ πŸ“„ vite.config.ts               # Vite configuration with Tailwind CSS plugin
β”œβ”€β”€ πŸ“„ ARCHITECTURE.md              # Detailed architecture & workflow documentation
β”œβ”€β”€ πŸ“„ TECHNICAL_REPORT.md          # Technical specifications & benchmark report
β”œβ”€β”€ πŸ“„ TEST_PLAN.md                 # End-to-end testing & hardening plan
β”œβ”€β”€ πŸ“„ TEST_REPORT.md               # Measured test suite results matrix (63/63 PASS)
β”œβ”€β”€ πŸ“„ README.md                    # Main project documentation
β”‚
β”œβ”€β”€ πŸ“ tests/                       # Automated Verification & Hardening Suite
β”‚   └── πŸ“„ e2e-test-suite.ts        # Comprehensive E2E test runner (npm test)
β”‚
└── πŸ“ src/                         # Application source code
    β”œβ”€β”€ πŸ“„ App.tsx                  # Root React application layout & state routing
    β”œβ”€β”€ πŸ“„ main.tsx                 # Client entry point
    β”œβ”€β”€ πŸ“„ index.css                # Global Tailwind CSS imports & theme rules
    β”œβ”€β”€ πŸ“„ types.ts                 # Central TypeScript interfaces & types
    β”‚
    β”œβ”€β”€ πŸ“ components/              # Modular UI Components
    β”‚   β”œβ”€β”€ πŸ“„ Navbar.tsx           # Desktop top navigation header & brand identity
    β”‚   β”œβ”€β”€ πŸ“„ MobileBottomNav.tsx  # Pinned mobile bottom navigation bar
    β”‚   β”œβ”€β”€ πŸ“„ LandingPage.tsx      # Hero section, feature showcases, testimonials & FAQ
    β”‚   β”œβ”€β”€ πŸ“„ StudentProfileWizard.tsx # Multi-step interactive student questionnaire
    β”‚   β”œβ”€β”€ πŸ“„ RecommendationDashboard.tsx # Visual roadmap, milestone cards & AI chat
    β”‚   β”œβ”€β”€ πŸ“„ CourseCatalog.tsx    # Filterable catalog with search & prerequisite badges
    β”‚   β”œβ”€β”€ πŸ“„ SampleProfiles.tsx   # Ready-to-use learner profile personas
    β”‚   β”œβ”€β”€ πŸ“„ UserProfileModal.tsx # LocalStorage student profile management modal
    β”‚   β”œβ”€β”€ πŸ“„ AboutPage.tsx        # System architecture breakdown & methodology
    β”‚   └── πŸ“„ Footer.tsx           # Brand footer & navigation links
    β”‚
    β”œβ”€β”€ πŸ“ data/                    # Local Datasets (Zero External DB)
    β”‚   β”œβ”€β”€ πŸ“„ courses.json         # Course catalog & prerequisite definitions
    β”‚   β”œβ”€β”€ πŸ“„ career_paths.json    # Target career competency matrices
    β”‚   └── πŸ“„ student_profiles.json # Pre-configured learner persona datasets
    β”‚
    └── πŸ“ lib/                     # Algorithms & Shared Libraries
        β”œβ”€β”€ πŸ“„ recommendationEngine.ts # DAG resolver, cycle detector & AI rationale layer
        └── πŸ“„ storage.ts           # Browser LocalStorage synchronization helpers

πŸš€ Installation

1️⃣ Prerequisites

  • Node.js: v18.0.0 or higher
  • npm or bun / yarn / pnpm

2️⃣ Clone Repository & Install Dependencies

git clone https://github.com/bikram73/LearnPath_AI.git
cd LearnPath_AI
npm install

3️⃣ Set Up Environment Variables (Optional)

Create a .env file in the root directory:

cp .env.example .env

Add your optional AI API key if utilizing generative rationale generation:

GEMINI_API_KEY=your_api_key_here
PORT=3000

4️⃣ Start Development Server

npm run dev

Open your browser at http://localhost:3000 to explore LearnPath AI.

5️⃣ Build for Production

npm run build
npm start

πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                   User Interaction                     β”‚
β”‚         (Profile Wizard / Persona Selector / Search)   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                           β”‚ POST /api/recommend
                           β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚         Express REST API (`server.ts`)                 β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                           β”‚
             β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
             β–Ό                           β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Course Knowledge Graph  β”‚ β”‚  Skill Gap Resolution   β”‚
β”‚  (courses.json / DAG)   β”‚ β”‚   (Career Target Matrix)β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
             β”‚                           β”‚
             β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                           β”‚
                           β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Topological Sort Engine (Prerequisite Resolver)       β”‚
β”‚  - Checks user acquired skills vs. course requirements β”‚
β”‚  - Enqueues required prerequisite courses strictly     β”‚
β”‚  - Ensures DAG validity & cycle-free ordering          β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                           β”‚
                           β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  AI Rationale Synthesis Layer (LLM Engine)             β”‚
β”‚  - Injects ordered courses + student profile context   β”‚
β”‚  - Generates custom benefits, milestones & timeline    β”‚
β”‚  - Fallback deterministic heuristic synthesis on error β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                           β”‚
                           β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Recommendation Dashboard & Interactive Chat           β”‚
β”‚  - Visual Timeline Roadmap                             β”‚
β”‚  - Career Readiness Score & Match Breakdown            β”‚
β”‚  - Interactive AI Advisor Drawer                       β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

🧠 Prompt Strategy

To eliminate hallucination and guarantee zero phantom course recommendations, LearnPath AI utilizes Strict Grounding & Constrained JSON Output:

  1. Deterministic Catalog Injection: The AI model is strictly provided only the candidate courses resolved by the topological sorting engine. It is forbidden from inventing unlisted course IDs.
  2. Schema Enforcement: Requests use responseMimeType: "application/json" with exact key bindings (aiSummary, careerOutcome, readinessScore, courseRationales).
  3. Low Temperature Sampling: A temperature of 0.2 is configured to favor logical consistency and analytical precision over creative divergence.
  4. Fallback Redundancy: If network latency or API rate limits occur, the system immediately switches to a built-in deterministic graph synthesizer without failing the user experience.

πŸ“Š Confidence & Readiness Metrics

The Career Readiness Score is calculated strictly via Deterministic Skill Coverage & Prerequisite Analysis:

$$\text{Career Readiness Score} = \text{clamp}\left(30, 96, \text{Baseline Skill Coverage} + \text{Roadmap Curriculum Boost}\right)$$

Where:

  • Baseline Skill Coverage: $$\text{Baseline Coverage} = \left(\frac{|\text{Acquired Target Skills}|}{\max(1, |\text{Total Target Skills}|)}\right) \times 100$$

  • Roadmap Curriculum Boost: $$\text{Roadmap Boost} = \min\left(45, \left(\frac{|\text{Ordered Courses}|}{\max(1, |\text{Candidate Courses}|)}\right) \times 40\right)$$

  • Current Skill Coverage: The baseline percentage of prerequisites and target competencies the student currently possesses.

  • Projected Skill Coverage After Roadmap: 100% (guaranteed prerequisite and skill gap closure upon completing all ordered sequence courses).

  • Composite Readiness Metric: Calibrated purely deterministically from acquired prerequisite foundation plus roadmap curriculum coverage, completely eliminating arbitrary or non-deterministic AI score fluctuation.


πŸ“„ Challenge Deliverables

Deliverable Status Description
Interactive Profiling Wizard βœ… Complete 4-step wizard with real-time feedback & validation
Prerequisite Resolution Engine βœ… Complete Graph topological sort respecting all course dependencies
Course Catalog Dataset βœ… Complete Multi-disciplinary modules covering AI, Web, Cloud & Data
Visual Roadmap Dashboard βœ… Complete Timeline milestones, skill badges, and progress tracking
AI Advisor Chat Assistant βœ… Complete Real-time tutoring & roadmap adjustments
Responsive Mobile Experience βœ… Complete Pinned bottom navigation & fluid mobile-first layouts

🌐 API Documentation

GET /api/courses

Returns all available courses in the catalog.

GET /api/profiles

Returns pre-populated sample learner personas.

POST /api/recommend

Generates a prerequisite-resolved learning path.

Request Body:

{
  "name": "Alex Rivera",
  "background": "Computer Science Student",
  "skills": ["Python", "Basic Git"],
  "goal": "AI Engineer",
  "experienceLevel": "Beginner",
  "weeklyHours": 12,
  "learningStyle": "Hands-on Projects"
}

POST /api/chat

Converses with the AI Learning Advisor.

Request Body:

{
  "message": "Which course should I focus on first?",
  "context": { "goal": "AI Engineer" }
}

⚑ Performance Benchmarks & Invariants

Benchmark Environment: Node.js 20+ / Vite 6.2 / TS 5.8
Test Suite Runs: 50 Iterations
Pipeline Step Median Latency P95 Latency Notes
Deterministic DAG Sort < 1.0 ms < 2.5 ms 3-color DFS topological graph engine
Skill Gap Resolution < 0.2 ms < 0.5 ms In-memory tokenized set intersection
AI Rationale Generation ~600 ms ~1200 ms Google Gen AI SDK (@google/genai)
Deterministic Fallback < 0.5 ms < 1.0 ms Instantaneous rule-based synthesizer
Client Bundle Size < 180 KB < 180 KB Gzipped SPA bundle with Tailwind CSS v4

⚠️ Known Limitations

  1. Fixed Catalog Scope: Recommendations are bound to courses defined within the local catalog dataset (courses.json).
  2. Concurrent Multi-Goal Roadmaps: Currently optimizes for one primary target career path at a time.
  3. Offline Mode: AI conversational chat requires active internet connectivity for generative insights (graph roadmap generation functions 100% offline).

Built with ❀️ for passionate learners worldwide β€’ Β© 2026 LearnPath AI

About

πŸŽ“ LearnPath AI is a prerequisite-aware AI learning advisor that analyzes a student's background, goals, and known skills to build an ordered learning path. It combines a curated course catalogue, deterministic prerequisite resolution, skill-gap analysis, and Gemini-powered explanations to make AI learning recommendations grounded and actionable.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages