The Ultimate Intelligent Learning Platform
LearnSphere AI is an advanced, AI-powered educational ecosystem designed to streamline the journey from beginner to expert. By combining Large Language Models (Gemini, Llama-3), Vector Search (RAG), Real-Time WebSockets (Socket.IO), and Redis-backed Performance Optimization, it delivers personalized roadmaps, high-fidelity coding practice, AI mock interview simulations, and a verified knowledge libraryβall tracked via a gamified Analytics engine.
- β¨ Key Features
- ποΈ System Architecture
- β‘ Performance & Database Optimization
- π‘οΈ Admin & Control Engine
- π§ Core Modules Detailed
- π§ͺ Testing & Benchmarking
- π Tech Stack
- π Rapid Deployment
- π Environment Configuration
| Feature | Description |
|---|---|
| AI Mock Interview Studio | Real-time voice & text technical/behavioral interviews with automated AI feedback and scoring. |
| AI Roadmap Architect | Generates 8-15 module progressive paths with real video & doc verification. |
| RAG Study Material | Upload PDFs to generate custom curricula based strictly on your documents. |
| Coding Arena | Monaco-powered editor with real-time C++, Python, and JS execution. |
| Knowledge Base | High-density docs with ELI5 intuition, complexity analysis, and code snippets. |
| Dynamic Analytics | Real-time mastery tracking through quizzes, roadmaps, and interview evaluations. |
| AI Tutor Chat | 1-on-1 real-time tutoring using Llama-3 (Groq) with conversation memory. |
| Admin OS | Fully integrated CRUD dashboard with AI content generation tools. |
Engineered for scale and millisecond latency.
We implement a multi-tier caching strategy using Redis to reduce MongoDB load by ~85%:
- Knowledge Base Detail: Individual topic pages cached for 1 hour.
- Community Roadmaps: Public list cached for 30 minutes; individual details for 1 hour.
- Analytics Overview: Heavy aggregation results cached for 10 minutes per user.
- Problem Lists: Paginated search results cached for 10 minutes.
Optimized query execution using compound and text indexes:
Roadmap:{ user: 1, createdAt: -1 }for instant dashboard loads.Submission:{ user: 1, question: 1, status: 1 }for checking problem solve status.Interview:{ candidateId: 1, createdAt: -1 }for fast history retrieval.QuizAttempt:{ user: 1, roadmap: 1 }for module completion checks.
- Lean Queries: All read-only operations use
.lean()to bypass Mongoose hydration overhead. - Partial Projections: Fetching only required fields (
.select()) to minimize network payload. - Standardized Pagination: Uniform
pageandlimit(default 15) across all Admin and Library endpoints.
The power to manage an entire curriculum.
The Admin Dashboard provides a professional-grade interface for content curators:
- Problem Management: Create, Edit, or AI-Generate coding problems including test cases and starter code.
- Knowledge Library: Bulk manage documentation. Includes an AI Knowledge Generator that creates 500+ word deep-dives, ELI5 intuition, and complexity markers.
- Roadmap Operations: Create official roadmaps or "Officialize" community-generated ones.
- Validation Suite: Built-in logic to test and validate problem correctness before publishing.
Unlike standard AI lists, LearnSphere roadmaps are Hyper-Linked Ecosystems:
- Resource Sourcing: Dynamically fetches the top 2-4 YouTube tutorials for every module.
- Library Integration: Automatically links module topics to our internal Knowledge Base entries.
- Effort Estimation: Provides reading and practice time estimates (minutes) for every module.
- Unlock Criteria: Gamified gating ensuring users master a module (Quiz 70%+) before proceeding.
Integrated with Judge0 for high-performance code execution:
- Languages: Full support for
JavaScript,Python, andC++. - Infrastructure: Test case runner that compares
STDOUTagainst expected outputs with precision. - Feedback: Instant pass/fail status with detailed error logs and time/memory execution metrics.
Our knowledge nodes are more than just text:
- Intuition (ELI5): Real-world analogies for complex concepts (e.g., "Think of a Hash Table like a Library Catalog").
- Multi-Lang Examples: Most topics include code in 3+ languages.
- Complexity Analysis: Big O time and space complexity clearly tagged for interview prep.
- Further Reading: Curated links to official MDN, GeeksForGeeks, or documentation.
Upload study guides or textbook PDFs to generate customized roadmaps and quizzes grounded strictly in the uploaded materials using vector embeddings and LangChain.
A comprehensive, end-to-end simulated technical and behavioral interview studio:
- Multi-Stage Engine: Automated stage flow covering
Warm-UpβIntroductionβResume Project Deep-DiveβDSA / CodingβSystem DesignβHR RoundβComprehensive Evaluation Report. - Voice & Speech Intelligence: Powered by Web Speech API for speech-to-text input and natural TTS speech synthesis output. Includes live confidence meters and speaking duration timers.
- Silence Watchdog: Proactively provides warm nudges if the user is silent, gracefully helping candidates think through complex problems.
- Embedded Code Workspace: Monaco Editor integrated inside the interview room allowing candidates to solve live DSA problems while explaining their logic to the AI interviewer.
- Comprehensive Analytics: Auto-evaluates candidates on Technical Competency, Communication, Problem Solving, and Confidence with an actionable improvement roadmap.
We take performance seriously. Use these scripts to verify your setup:
verifyDbSetup.js: Checks MongoDB index presence and Redis connectivity.dbBenchmark.js: Measures API response times (Cold vs. Warm cache) for Analytics, Library, and Roadmaps.geminiStressTest.js: Validates AI API rate-limiting handling and key rotation.
| Layer | Technologies |
|---|---|
| Frontend | React 18, Vite, Framer Motion, Tailwind CSS, Lucide React, Monaco Editor, Socket.IO Client. |
| Backend (Dual Architecture) | Option 1: Node.js, Express, Socket.IO Option 2: Java 17, Spring Boot, Spring Security |
| AI Models | Google Gemini 2.0 Flash, Meta Llama 3.3 (Groq). |
| Database/Cache | MongoDB Atlas, Upstash Redis. |
| Execution | Judge0 API (Remote Compiler). |
Option A: Node.js Backend (Port 5001)
cd backend
npm install
node scripts/seedMappings.js # Populate Skill Tree categories
node scripts/seedKnowledge.js # Populate initial Knowledge Base
npm run devOption B: Java Spring Boot Backend (Port 8080)
cd backend_java
# Ensure JAVA_HOME is set to Java 17+
./mvnw clean spring-boot:runcd frontend
npm install
# If running Node.js backend:
npm run dev:node
# If running Java backend:
npm run dev:javaPORT=5001
MONGO_URI=your_mongodb_uri
REDIS_URL=your_upstash_redis_url
JWT_SECRET=your_super_secret_key
GEMINI_API_KEYS=key1,key2,key3 # Comma-separated for rotation
GROQ_API_KEY=your_key
TUTOR_GROQ_API_KEY=your_key
YOUTUBE_API_KEY=your_key
JUDGE0_BASE_URL=https://ce.judge0.comPORT=8080
MONGO_URI=your_mongodb_uri
REDIS_URL=your_upstash_redis_url
JWT_SECRET=your_super_secret_key
GEMINI_API_KEY=your_key
GOOGLE_CLIENT_ID=your_google_oauth_id
GOOGLE_CLIENT_SECRET=your_google_oauth_secretCreated with β€οΈ by the LearnSphere AI Team.