How jdmrtne/studykey works
Memora is a browser-only AI study companion: students add lessons, then use them to generate and study reviewers, quizzes, flashcards, and lesson-aware chat. The graph follows the documented lesson-ingestion and reviewer paths, and preserves quiz, flashcard, chat, reading, settings, and PWA capabilities. Source excerpts support the detailed ingestion, reviewer, AI-service, and persistence links; other capability links are dashed where implementation wiring was not shown.
Main entry points: App.tsx Routes and shell · Reviewer.tsx Reviewer generation · aiService.ts Generation and validation · Lessons.tsx Lesson management
Components 24
App navigation
- Routes and shell
src/App.tsx - Dashboard
src/pages/Dashboard.tsx
Lesson library
- Lesson management
src/pages/Lessons.tsx - Document extraction
src/lib/documentPipeline.ts - Lesson library state
src/store/lessonsStore.ts - Original files
src/lib/fileStore.ts - Lesson reader
src/pages/LessonReader.tsx
Study tools
- Quiz practice
src/pages/Quiz.tsx - Quiz gameplay
src/hooks/useQuizEngine.ts - Flashcard generation
src/pages/Flashcards.tsx - Reviewer generation
src/pages/Reviewer.tsx - Reviewer study view
src/components/reviewer/ReviewerView.tsx - Lesson chat
src/pages/Chat.tsx - Reviewer history
src/store/reviewerStore.ts
AI services
- AI settings
src/pages/AISettings.tsx - AI configuration state
src/store/aiSettingsStore.ts - Generation and validation
src/lib/aiService.ts - Generation prompts
src/prompts - Provider adapters
src/lib/providers
Browser platform
- Key persistence
src/lib/storage.ts - Browser storage
- Install and offline support
src/lib/pwa/installPrompt.ts
Other components
- Student
- AI provider
Connections 33
- Student → Routes and shell: opens
src/App.tsx - Routes and shell → Dashboard: routes to
src/App.tsx - Routes and shell → Lesson management: routes to
src/App.tsx - Routes and shell → Lesson reader: routes to
src/App.tsx - Routes and shell → Quiz practice: routes to
src/App.tsx - Routes and shell → Flashcard generation: routes to
src/App.tsx - Routes and shell → Reviewer generation: routes to
src/App.tsx - Routes and shell → Lesson chat: routes to
src/App.tsx - Routes and shell → AI settings: routes to
src/App.tsx - Lesson management → Document extraction: extracts and chunks
src/pages/Lessons.tsx - Lesson management → Original files: stores originals
src/pages/Lessons.tsx - Lesson management → Lesson library state: adds lessons
src/pages/Lessons.tsx - Lesson library state → Browser storage: persists lessons
src/store/lessonsStore.ts - Lesson library state → Original files: deletes originals
src/store/lessonsStore.ts - Lesson reader → Lesson library state: reads selected lesson
- Quiz practice → Quiz gameplay: runs practice
- Quiz practice → Generation and validation: generates questions
- Flashcard generation → Generation and validation: generates cards
src/lib/aiService.ts - Flashcard generation → Generation prompts: builds request
src/pages/Flashcards.tsx - Reviewer generation → Generation and validation: requests generation
src/pages/Reviewer.tsx - Reviewer generation → Generation prompts: builds request
src/pages/Reviewer.tsx - Reviewer generation → Reviewer history: saves reviewer
src/pages/Reviewer.tsx - Reviewer generation → Reviewer study view: renders result
src/pages/Reviewer.tsx - Reviewer history → Browser storage: persists history
src/store/reviewerStore.ts - Lesson chat → Generation and validation: generates replies
- Lesson chat → Generation prompts: uses chat prompt
- AI settings → AI configuration state: updates config
src/pages/AISettings.tsx - AI configuration state → Key persistence: loads and saves
src/store/aiSettingsStore.ts - Key persistence → Browser storage: persists key
src/lib/storage.ts - AI configuration state → Provider adapters: selects model
src/store/aiSettingsStore.ts - Generation and validation → Provider adapters: dispatches generation
src/lib/aiService.ts - Provider adapters → AI provider: sends requests
- Install and offline support → Student: offers installation