An AI-powered mentoring platform that creates personalised learning experiences through 40+ pre-built mentor personas, a 5-level Socratic ladder, experience-triggered memory, and proof-of-mastery certification.
βββββββββββββββ ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β React 19 β β FastAPI Backend β
β Vite βββββΊβ βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β Zustand β β β LangGraph Pipeline (ARCH-3) β β
β globals.cssβ β β memory β etm β socratic β persona β guardian β END β β
β β β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β β BackgroundTasks: mastery_node β cert_node β
β β β LLMService: OpenRouter β Fallback Chain β Ollama β
β β β ChromaDB: vault + fingerprint collections β
β β β SQLite: mastery_ledger + mastery_certificates β
βββββββββββββββ ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
- ARCH-1:
socratic_node(WHAT) andpersona_node(HOW) always separate - ARCH-2:
mastery_nodeandcert_noderun ONLY as BackgroundTasks - ARCH-3: Pipeline order fixed:
memory β etm β socratic β persona β guardian β END - ARCH-4: All LLM calls through
LLMServicesingleton only - ARCH-5: Every endpoint returns
{"success": bool, "data": any, "error": str | null}
8 categories Γ 5 mentors each: Cybersecurity, Business, Programming, AI/ML, Finance, Design, Fitness, Psychology. Each with unique voice, teaching style, and embedded knowledge base.
| Level | Behavior |
|---|---|
| 0 | Neutral β provide information |
| 1 | Gentle probing β "What do you think?" |
| 2 | Guided discovery β "What if we changed X?" |
| 3 | Challenge β "Can you explain WHY?" |
| 4 | Corrective β "Let's reconsider..." |
VS Code extension sends workspace events (terminal errors, file saves). ETM extracts teaching concepts and connects mentoring to the student's real code.
Concepts encountered β attempted β struggling or mastered. Configurable score thresholds. Proof-of-mastery certificates generated when thresholds are met.
Regex-based safety filter with educational context awareness. Blocks harmful content while preserving legitimate security education (pentesting, CTF, etc.).
SHA256-keyed response cache (24h TTL) + 3-tier fallback chain: OpenRouter primary β free model fallback β local Ollama.
- Python 3.12+
- Node.js 18+
- (Optional) Ollama for local LLM fallback
cd backend
python -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
cp .env.example .env # Add your OpenRouter API key
uvicorn main:app --reload --port 8000cd frontend
npm install
npm run dev # β http://localhost:5173cd backend
python -m pytest tests/ -v # β 73 passingpme/
βββ backend/
β βββ api/ # FastAPI routers (chat, persona, session, mastery, gallery, workspace)
β βββ core/ # Config, database, utils
β βββ graph/ # LangGraph pipeline
β β βββ nodes/ # memory, etm, socratic, persona, guardian, mastery, cert
β β βββ state.py # PMEState TypedDict
β β βββ orchestrator.py
β βββ models/ # SQLAlchemy models + Pydantic schemas
β βββ rag/ # vault.py, fingerprint.py, retriever.py
β βββ services/ # llm_service, persona_service, session_service, mastery_service
β βββ data/mentors/ # 40 mentor profiles (8 categories Γ 5)
β βββ tests/ # 73 tests
βββ frontend/
β βββ src/
β β βββ api/ # Axios client
β β βββ components/ # React components (gallery, chat, layout, session, mastery)
β β βββ hooks/ # useChat, useMastery, useSession
β β βββ store/ # Zustand stores
β β βββ styles/ # globals.css design system
β β βββ pages/ # SessionPage, DashboardPage, MentorsPage, SettingsPage
β βββ package.json
βββ vscode-extension/ # VS Code extension for workspace events
| Variable | Description | Default |
|---|---|---|
OPENROUTER_API_KEY |
OpenRouter API key | (required) |
PERSONA_MODEL |
Primary LLM for mentor voice | nvidia/llama-3.3-nemotron-super-49b-v1:free |
REASONING_MODEL |
LLM for Socratic assessment | nvidia/llama-3.3-nemotron-super-49b-v1:free |
FALLBACK_MODEL_1 |
First fallback model | meta-llama/llama-3.3-70b-instruct:free |
FALLBACK_MODEL_2 |
Second fallback model | mistralai/mistral-7b-instruct:free |
OLLAMA_BASE_URL |
Local Ollama URL | http://localhost:11434 |
DEVIATION_THRESHOLD |
Score for misconception detection | 0.65 |
MASTERY_CERT_THRESHOLD |
Score needed for certification | 0.8 |
MIT