Your AI Learning Companion β an AI-powered platform that generates personalized, structured learning roadmaps for AI/ML technologies.
Type a topic β LangGraph, CrewAI, PyTorch, anything AI-related β and DevCompass AI searches GitHub, YouTube, and arXiv, ranks the best resources, and uses AI to synthesize them into a complete learning path: prerequisites, a staged roadmap, hands-on project ideas, and a skill-gap analysis. A built-in chat assistant lets you ask follow-up questions about your specific roadmap.
- Features
- Architecture
- Tech Stack
- n8n Backend Workflow
- Frontend
- AI Chat Assistant
- Project Structure
- Getting Started
- Environment Variables
- Design Principles
- Security Notes
- Future Enhancements
- Screenshots
- π Topic-aware search β validates that a requested topic is AI-related before doing any work
- π Multi-source resource collection β GitHub repositories, YouTube tutorials, arXiv papers, and official documentation, gathered and ranked independently
- πΊοΈ AI-generated learning roadmap β staged learning path with difficulty, estimated time, and prerequisites
- π‘ Practical project ideas β Beginner, Intermediate, and Advanced project suggestions with implementation steps
- π§ Skill-gap analysis β identifies what you need to learn first, and how long it'll take
- π¬ Context-aware chat assistant β ask follow-up questions about your specific roadmap, grounded in the actual generated data
- π¨ Modern, responsive UI β built with React, TypeScript, and Tailwind CSS
DevCompass AI is a two-part system: an n8n workflow that does all resource collection and AI reasoning, and a React frontend that presents the results and adds an interactive chat layer.
βββββββββββββββββββββββ βββββββββββββββββββββββββββ β ββββββββββββββββββββββ
β React Frontend β POST β n8n Workflow β calls β External APIs β
β (Vite + TypeScript)β βββββββΊ β (Topic validation, resourceβ βββββββΊ β GitHub Β· YouTube Β·β
β β β collection, AI reasoning) β β arXiv Β· Gemini β
βββββββββββββββββββββββ βββββββββββββββββββββββββββ β ββββββββββββββββββββββ
β
β calls (separately, for chat only)
βΌ
βββββββββββββββββββββββ
β Vercel Serverless β
β Function (/api/chat)β β calls Gemini directly, keeps API key server-side
βββββββββββββββββββββββ
A key design decision: the AI never searches the web directly. All resource collection (GitHub, YouTube, arXiv) happens through dedicated API pipelines before any LLM call. The AI's job is purely to reason over already-collected, already-ranked data β this keeps results grounded in real, verifiable sources rather than the model's own (potentially outdated or hallucinated) knowledge.
Backend / Orchestration
- n8n β workflow automation and orchestration
- Google Gemini API β topic validation, resource ranking strategy, and roadmap synthesis
- GitHub REST API, YouTube Data API v3, arXiv API β resource collection
- Docker β n8n self-hosted deployment
Frontend
- React 18 + TypeScript
- Vite β build tooling
- Tailwind CSS v4 β styling
- React Router β client-side routing
- Axios β HTTP client
Chat Feature
- Vercel Serverless Functions β server-side proxy to Gemini, keeps the API key out of the browser
The backend is implemented entirely in n8n using a modular, multi-stage pipeline. Resource collection and AI reasoning are deliberately separated β the AI only ever reasons over data that's already been gathered and ranked by rule-based logic.
1. Topic Validation
A webhook receives the user's topic. An LLM call validates whether it's AI-related, and if so, normalizes it β returning is_ai_related, normalized_topic, display_name, aliases, topic_type, search_keywords, and related_technologies. Non-AI topics stop the workflow here.
2. Learning Resource Strategy Planner
A second LLM call determines which resource types are actually worth searching for this topic (e.g. { "github": "VERY_HIGH", "youtube": "HIGH", "arxiv": "MEDIUM", "official_docs": "HIGH" }), and produces optimized search keywords and known official documentation.
3. GitHub Repository Pipeline Queries the GitHub API, then a rule-based ranking engine scores repositories by stars, activity, description relevance, and educational usefulness. Only the highest-ranked repos are kept.
4. arXiv Research Pipeline Queries the arXiv API, parses the XML response, and ranks papers by title/abstract relevance, keyword matching, and publication recency.
5. YouTube Learning Pipeline Queries the YouTube Data API and ranks videos by topic relevance, title, description, and channel quality.
6. Resource Integrator & Normalizer Combines GitHub, arXiv, and YouTube results into one standardized schema:
{
"resource_type": "",
"title": "",
"description": "",
"url": "",
"priority": "",
"metadata": {}
}7. AI Learning Engine The primary reasoning stage. Given the validated topic, the resource strategy, and the normalized resource pool β but explicitly not allowed to search the web β this LLM estimates difficulty and total learning time, identifies prerequisites, organizes resources into a staged learning path, and generates practical learning tips.
8. AI Learning Companion A second LLM extends the roadmap with two outputs generated together: three progressively challenging project ideas (Beginner/Intermediate/Advanced, each with technologies and implementation steps), and a skill-gap analysis covering why each prerequisite matters, key concepts, preparation time, and recommended learning methods.
9. Final Response Builder Combines every stage's output into a single JSON response β topic info, roadmap, resources, projects, and skill-gap analysis β consumed directly by the React frontend.
`` User Topic β βΌ Topic Validator β βΌ Learning Resource Strategy Planner β βββββββββββββββββββ β β β βΌ βΌ βΌ GitHub arXiv YouTube Collector Collector Collector β β β Ranking Ranking Ranking ββββββββββΌβββββββββββ βΌ Resource Integrator & Normalizer βΌ AI Learning Engine βΌ AI Learning Companion βΌ Final Response Builder βΌ React Frontend ```
- Modular architecture β each resource source is an independent pipeline
- Rule-based ranking before AI reasoning β cheaper, deterministic, and reduces what the LLM has to infer
- Multiple specialized LLM calls instead of one large prompt β each stage has a narrow, well-defined job
- Structured JSON communication between every workflow stage
- The AI is never allowed to browse the web β it only reasons over resources the pipeline has already collected
The React frontend consumes the n8n workflow's JSON output and presents it across a clean, tabbed dashboard.
Pages:
- Home β search interface with topic suggestion chips, an explainer section, and the search entry point
- Dashboard β a single-page results view with tabs: Overview (staged roadmap timeline), Official, GitHub, YouTube, Research Papers, Projects, and Skill Gap
Key frontend decisions:
- All roadmap data is normalized client-side into consistent TypeScript types, since n8n's raw output uses keyed objects (e.g.
{ Beginner: {...}, Intermediate: {...} }) that are converted into arrays for easier rendering - Resource tabs display the full ranked resource pool gathered by the collectors (not just the AI's top picks), so users can browse every GitHub repo, video, and paper the pipeline found β not just a curated shortlist
- Mock data (
src/mock/sampleResponse.json) mirrors the real API shape exactly, enabling full UI development and testing independent of the live n8n backend
A floating chat widget on the Dashboard lets users ask questions about their specific, currently-generated roadmap β grounded in that roadmap's actual content, not a general-purpose assistant.
Why a separate serverless function instead of routing through n8n: a chat reply is a simple, stateless "send message β call LLM β return reply" operation, which fits a lightweight serverless function better than a full workflow execution. It also keeps the Gemini API key out of both the browser and n8n's request path for this specific feature β the key lives only in a Vercel environment variable, read exclusively inside /api/chat.ts, which runs server-side and is never bundled into client-side JavaScript.
Conversation history is capped to the last 8 messages per request, keeping token usage predictable regardless of how long a chat session runs.
`` DevCompass/ βββ frontend/ β βββ api/ β β βββ chat.ts # Vercel serverless function (Gemini chat proxy) β βββ src/ β β βββ components/ β β β βββ chat/ # ChatWidget β β β βββ home/ # SearchBar, TopicChips, HowItWorks β β β βββ layout/ # Navbar β β β βββ roadmap/ # SummaryCard, LearningRoadmap, ResourceList, β β β β # ProjectCards, SkillGapPanel β β β βββ ui/ # Tabs, ResourceTypeBadge β β βββ mock/ β β β βββ sampleResponse.json # Realistic mock data matching the live API shape β β βββ pages/ β β β βββ Home.tsx β β β βββ Dashboard.tsx β β βββ services/ β β β βββ api.ts # n8n webhook call + response normalizer β β β βββ chatApi.ts # Chat API service β β βββ types/ β β βββ index.ts # Shared TypeScript interfaces β βββ vercel.json β βββ vite.config.ts βββ docker/ β βββ n8n/ # n8n runtime data (gitignored) βββ workflow/ # Exported n8n workflow JSON βββ docker-compose.yml
---
## Getting Started
### Prerequisites
- Node.js 18+
- Docker (for self-hosted n8n)
- A Google Gemini API key
- A YouTube Data API v3 key
### 1. Start the n8n backend
```bash
docker compose up -d
Import the workflow from workflow/ into n8n, add your Gemini and YouTube API credentials, and activate the workflow.
cd frontend
npm install
cp .env.example .envFill in .env:
VITE_N8N_WEBHOOK_URL=http://localhost:5678/webhook/learn-topic
GEMINI_API_KEY=your_key_here
vercel devNote: use
vercel devrather thannpm run devif you want to test the chat feature locally, since it also serves the/apiserverless function. Plainnpm run devworks fine for everything except chat.
Visit http://localhost:3000.
| Variable | Where | Purpose |
|---|---|---|
VITE_N8N_WEBHOOK_URL |
frontend/.env |
URL of the n8n production webhook |
GEMINI_API_KEY |
frontend/.env (server-side only, no VITE_ prefix) |
Used by /api/chat.ts β never exposed to the browser |
GEMINI_API_KEY, YOUTUBE_API_KEY |
docker/.env (or root .env) |
Used by the n8n workflow's LLM and YouTube collector nodes |
- Separation of collection and reasoning β resource gathering is deterministic and rule-based; only synthesis is left to the AI
- Never trust the AI with unverified facts β official documentation links are resolved from real collected data (e.g. a repo's
homepagefield) rather than recalled from the model's memory - Normalize early, render simply β all backend shape quirks (keyed objects, nested metadata) are converted to clean arrays in one normalization layer, so every component downstream works with predictable types
- Secrets never touch the browser β any value used for authenticated API calls lives only in server-side code (n8n or the serverless function), never in a
VITE_-prefixed variable
This project deliberately avoids two common mistakes:
- n8n's local database (
docker/n8n/database.sqlite*) and event logs are gitignored β this file can contain credentials and execution history and should never be committed - Only the Gemini key used for the chat feature lives in a frontend-adjacent
.envfile, and even then it is notVITE_-prefixed, so Vite never bundles it into client-side JavaScript
- Saved/bookmarked roadmaps per user
- Broader topic support beyond the current AI/ML scope
- Streaming chat responses
- Usage analytics dashboard
- Additional resource sources (Hacker News, Reddit, technical blogs)
![]() Home |
![]() How It Works |
![]() Dashboard |
![]() Learning Roadmap |
![]() Official Documentation |
![]() GitHub Repositories |
![]() YouTube Resources |
![]() Research Papers |
![]() Project Generator |
![]() Skill Gap Analysis |
![]() AI Chat Assistant |
![]() Chat Response |
MIT











