System Components
VibeLearn has 6 core components:| Component | Description |
|---|---|
Hooks (src/hooks/) | 5 TypeScript hooks — compiled to ESM, built to plugin/scripts/ |
Worker Service (src/services/worker-service.ts) | Express API on port 37778, Bun-managed, handles analysis asynchronously |
Analysis Pipeline (src/services/analysis/) | 4-stage pipeline: StackDetector → StaticAnalyzer → ConceptExtractor → QuizGenerator |
Upstream Sync (src/services/sync/) | HMAC-signed POST to api.vibelearn.dev; OfflineQueue for retry |
Database (src/services/sqlite/) | SQLite3 at ~/.vibelearn/vibelearn.db |
CLI (src/cli/vl/) | vl quiz, vl status, vl gaps, vl login |
Data Flow
Session Lifecycle
Analysis Pipeline Detail
1. StackDetector
Reads project config files:package.json, requirements.txt, pyproject.toml, go.mod, Cargo.toml, build.gradle. Detects:
- Language + runtime
- Framework (React, Next.js, FastAPI, Gin, etc.)
- ORM/DB client (Prisma, SQLAlchemy, GORM, etc.)
- Testing tools (Jest, pytest, Go test, etc.)
vl_stack_profiles.
2. StaticAnalyzer
AST-parses files modified during the session using tree-sitter. Identifies:- Custom hooks (React
use*pattern) - API route definitions
- Database query patterns
- Authentication middleware
- Component/class structure
3. ConceptExtractor
Single LLM call combining:- Stack profile from step 1
- File patterns from step 2
- Last assistant message from the transcript
- Session observations
vibelearn_session_summaries) + concept list (vl_concepts).
4. QuizGenerator
Second LLM call: one quiz question per extracted concept. Skips concepts wheremastery_score > 0.85 in vl_developer_profile.
Question types: multiple_choice, fill_in_blank, explain_code.
Output stored in vl_questions.

