How maplexrain/unyra works
Unyra is a local-first Electron learning app that turns a user’s learning goal into an explorable knowledge graph, with node-specific teaching documents, notes, and recorded learning progress. The main workflow runs from the desktop UI through a goal-scoped AI tutor; the tutor can execute sandboxed scripts to update learning content, while the app persists the resulting state locally. The README documents exams, reading tracking, plugins, voice, and web learning as additional capabilities. Some implementation links below rely on README descriptions or SOURCE INDEX references; unsampled internals are not inferred beyond those signals.
Main entry points: LearnWorkspace.tsx Learning workspace · useAgent.ts Tutor runtime · client.ts AI client · main.ts Electron main process
Components 20
Desktop experience
- App shell
src/App.tsx
Learning workspace
- Learning workspace
src/components/learn/LearnWorkspace.tsx - Knowledge graph
src/learn/graph.ts - Documents and notes
src/learn/superdocs.ts - Tabs and layout
src/learn/workspace.ts
AI tutor
- Tutor runtime
src/learn/useAgent.ts - AI client
src/ai/client.ts - Provider settings
src/ai/settings.ts - Script sandbox
src/agent/sandbox/worker.ts
Local platform
- Storage bridge
src/lib/storage.ts - Native IPC bridge
src/lib/native.ts - Electron main process
electron/main.ts - User data files
electron/storage/files.ts
Learning capabilities
- Exams and grading
src/learn/exam.ts - Reading and attention
src/learn/reading.ts - Document plugins
src/lib/plugins.ts - Web learning
src/learn/web/browserOps.ts - Voice input
src/lib/voice/session.ts - MCP tools
src/agent/mcp/client.ts
Other components
- Learner
Connections 22
- Learner → App shell: starts session
README.md - App shell → Learning workspace: opens learning
src/App.tsx - Learner → Learning workspace: sets goal
README.md - Learning workspace → Tutor runtime: invokes tutor
README.md - Tutor runtime → AI client: requests completion
src/learn/useAgent.ts - AI client → Provider settings: uses configuration
src/ai/client.ts - AI client → Electron main process: forwards requests
src/ai/client.ts - Tutor runtime → Script sandbox: executes scripts
README.md - Script sandbox → Knowledge graph: updates learning data
README.md - Learning workspace → Knowledge graph: reads knowledge state
- Learning workspace → Documents and notes: opens documents
- Learning workspace → Tabs and layout: manages tabs
README.md - Learning workspace → Exams and grading: starts exams
README.md - Learning workspace → Reading and attention: tracks reading
README.md - Learning workspace → Storage bridge: persists changes
README.md - Storage bridge → Native IPC bridge: calls storage API
src/lib/storage.ts - Native IPC bridge → Electron main process: sends IPC
src/lib/native.ts - Electron main process → User data files: reads and writes
- Learning workspace → Document plugins: renders extensions
README.md - Tutor runtime → Web learning: uses web tools
src/learn/useAgent.ts - Learner → Voice input: dictates input
README.md - Tutor runtime → MCP tools: calls MCP tools