feat: implement AI-powered flashcard system with interactive quiz and flip modes - #287
Open
Imaneelgh wants to merge 2 commits into
Open
feat: implement AI-powered flashcard system with interactive quiz and flip modes#287Imaneelgh wants to merge 2 commits into
Imaneelgh wants to merge 2 commits into
Conversation
- Add flashcards router import and registration in gateway/http/app.py - Add Flashcards icon component - Add Flashcards link to student sidebar navigation - Fix 404 errors on flashcards API endpoints
Author
|
Hi, This PR implements a complete AI-powered flashcard system for students with: ✅ Features:
✅ Files:
✅ Fully documented per OpenTutorAI guide:
Testing:
Ready for review! 🙏 Best regards, |
03ABDALLAH
requested changes
Jul 10, 2026
03ABDALLAH
left a comment
Contributor
There was a problem hiding this comment.
Thanks for the contribution! Please resolve the merge conflicts.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Type of change
What this PR does
Implements a comprehensive AI-powered flashcard system that allows students to:
Why it is needed
Students need an efficient way to memorize course content. Manual flashcard creation is time-consuming, and unstructured revision methods are ineffective. This feature automates flashcard generation using AI and implements spaced repetition to optimize long-term learning retention.
Files changed
Backend (7 files)
ai/llm/flashcard_generator.py: AI generation with strict validation to prevent hallucinationsai/pdf/pdf_extractor.py: PDF text extraction using pdfplumberdata/models/flashcard.py: Flashcard SQLAlchemy model with Leitner fieldsdata/repositories/flashcard_repository.py: Database operations and Leitner algorithm implementationgateway/http/routers/flashcards.py: API endpoints (generate, review, stats, tags, delete)gateway/http/app.py: Router registration for flashcardsgateway/http/routers/__init__.py: Module exportFrontend (8 files)
ui/src/lib/apis/flashcards/index.ts: API client functionsui/src/lib/components/icons/Flashcards.svelte: Flashcards icon for sidebarui/src/lib/components/student/elements/Sidebar.svelte: Added Flashcards navigation linkui/src/lib/features/student/components/flashcards/elements/Flashcard.svelte: Reusable flashcard componentui/src/lib/features/student/components/flashcards/pages/QuizReview.svelte: Quiz mode with Levenshtein validationui/src/lib/features/student/components/flashcards/pages/FlashcardReview.svelte: Flip mode with 3D animationsui/src/routes/student/flashcards/+page.svelte: Dashboard with statisticsui/src/routes/student/flashcards/generate/+page.svelte: Generation page (text/PDF modes)ui/src/routes/student/flashcards/review/+page.svelte: Review page with mode switcherDocumentation (6 files)
docs/flashcards-system.md: Technical documentation (API endpoints, data model, algorithms)docs/flashcards-user-guide.md: Step-by-step user guide with screenshot referencesdocs/screenshots/student-flashcards-dashboard.png: Dashboard viewdocs/screenshots/student-flashcards-generate.png: Generation interfacedocs/screenshots/student-flashcards-quiz.png: Quiz mode in actiondocs/screenshots/student-flashcards-flip.png: Flip mode with 3D animationHow to test it
As a Student:
Navigate to Flashcards:
Test text-based generation:
Test PDF-based generation:
Test Quiz mode:
Test Flip mode:
Verify dashboard statistics:
Test tag filtering:
UI CHANGED
YES
Visible changes:
Screenshots taken
YES
All screenshots are referenced in
docs/flashcards-user-guide.mdfollowing the guide's requirements.Documentation files created/updated
docs/flashcards-system.md: Technical documentation covering:docs/flashcards-user-guide.md: User guide covering:Breaking changes
NO
This is a new feature that adds functionality without modifying or removing existing features.
Related issues
None
Branch name
feature/flashcards-quiz-systemDependencies
pdfplumber(for PDF text extraction) - should be added torequirements.txtTechnical highlights
What's missing before submission
pdfplumberis inrequirements.txtnpm run build)