An adaptive, intelligence-driven learning platform β built for students who want to study smarter, prepare for exams with confidence, and get personalized guidance from a cognitive tutor that teaches, not just answers.
| Feature | Description |
|---|---|
| π€ Concept Coach | Interactive step-by-step cognitive tutor β Socratic guided learning |
| π Rubric Evaluator | Upload assignments and get detailed rubric-based intelligent feedback |
| π Exam Preparation | Syllabus upload, previous paper analysis, question bank generation |
| π AI Strategy Roadmap | Day-by-day exam study schedule tailored to your syllabus |
| π§ Adaptive Quizzes | ML-powered quiz engine that targets your weak areas |
| ποΈ Flashcard Generator | AI-generated flashcards from your lecture notes |
| π Lecture Summarizer | Automatically summarizes lengthy lecture PDFs |
| π Study Plan | Long-term AI study plans based on your weaknesses |
| π Analytics Dashboard | Real-time mastery tracking, streaks, and performance metrics |
| π Auth System | JWT + Google OAuth 2.0 |
An interactive AI tutor modelled after the Socratic method β it never just gives you the answer. Instead it:
- Guides you step-by-step with targeted hints, formulas, and guided questions
- Teaches like a real teacher: confirms understanding before moving on
- Renders rich responses: bold,
code, numbered steps, formula boxes, markdown headings - Quick action chips: "Give me a hint", "Show the formula", "Explain differently", "I got it, next step"
- Full Gemini-style chat UI with typing indicator, copy, thumbs up/down, and a new-chat button
- Powered by a Socratic system prompt via Gemini AI on the backend
Upload any assignment (PDF, DOCX, TXT) for intelligent rubric-based feedback:
- Overall Score with colour-coded rating
- Content Accuracy and Clarity & Logic sub-scores with progress bars
- Originality Check with a circular gauge
- Top Strengths and Actionable Suggestions from AI
- Clean dark AI feedback panel with export option
- Upload syllabus (PDF or text) and previous question papers independently
- Questions only generate when you explicitly click "Generate Questions" β no premature generation
- Configure mark distribution: set how many questions per mark tier (e.g., 2-mark Γ 5, 5-mark Γ 3, 10-mark Γ 2)
- AI analyses syllabus deeply and generates detailed answers calibrated to each mark value
- Filter questions by All / Frequent / Long Answer
- Bookmark questions and toggle "Secure Centum Mode" for comprehensive coverage
- High-Yield Pattern badges on questions derived from previous paper analysis
- Input your exam date and daily available hours
- AI generates a day-by-day study schedule in a clean inline table format
- Shows total days, study hours, and topics covered in a summary bar
- Priorities are automatically derived from syllabus + previous paper patterns
- This is distinct from the Study Plan (which is for long-term learning)
- Generates MCQs from uploaded lecture notes using Gemini AI
- Tracks topic mastery (0.0β1.0) and weakness scores per topic
- Adaptive question selection:
- 50% from identified weak topics
- 50% matching your current accuracy-based difficulty
- Avoids recently answered questions
- Detailed results with time-taken, correct/incorrect breakdown, and explanations
- AI-generated plans based on identified weak topics and learning history
- Includes recommended resources, revision schedules, and practice prompts
- Clearly differentiated from the Exam Strategy Roadmap
- Auto-generate flashcards from lecture notes
- Flip-to-reveal interaction, bookmark support, spaced-repetition ready
- Upload PDF or text lecture notes
- AI-generated summaries with key concepts extracted
- Smart OCR pipeline for scanned PDFs (Tesseract + Poppler)
- Windows Explorer-style PDF preview panel
- Real-time accuracy, total questions, correct answers
- Per-topic weakness scores with mastery progression
- Quiz attempt history with performance metrics
- User streaks (global and per-topic)
| Layer | Technology |
|---|---|
| Framework | Django 5.x + Django REST Framework |
| Auth | rest_framework_simplejwt (JWT) + django-allauth (Google OAuth) |
| Database | SQLite (dev) β easily switchable to PostgreSQL |
| AI Engine | Google Gemini 2.0 Flash via google-generativeai |
| PDF Processing | Hybrid pipeline: pdfplumber + Tesseract OCR + Poppler |
| File Storage | Django media files |
| Layer | Technology |
|---|---|
| Framework | React 19 |
| UI Library | Material-UI (MUI) v7 |
| Routing | React Router DOM v7 |
| HTTP Client | Axios |
| File Upload | react-dropzone |
| Charts | Recharts |
| Animations | Framer Motion |
| Design System | Glassmorphism dark theme with gradient accents |
The sidebar contains all main sections, with Concept Coach AI highlighted as the flagship feature:
π Dashboard
π Lecture Notes
β Practice Arena (Quiz)
π
Study Plan
π Exam Prep
ποΈ Flashcards
π Summarize Lecture
β¦ Concept Coach AI β MAIN FEATURE
π Rubric Evaluator
π€ Profile
- Python 3.8+
- Node.js 16+, npm 8+
- Tesseract-OCR v5.0+ (for scanned PDFs)
- Poppler (for PDF-to-image conversion)
- Google Gemini API Key β Get one here
- Google OAuth Credentials (optional) β for Google social login
git clone https://github.com/yourusername/LearnFlow.git
cd LearnFlow# Create and activate virtual environment
python -m venv venv
venv\Scripts\activate # Windows
# source venv/bin/activate # macOS/Linux
# Install dependencies
pip install -r requirements.txt
# Configure environment
cp .env.example .env
# β Edit .env and set GEMINI_API_KEY=your_key_here
# Run migrations
python manage.py makemigrations
python manage.py migrate
# Create admin superuser
python manage.py createsuperuser
# Start server
python manage.py runserver
# β Running at http://localhost:8000cd frontend
npm install
npm start
# β Running at http://localhost:3000See GOOGLE_OAUTH_SETUP.md for the full guide.
Quick Steps:
- Create OAuth credentials in Google Cloud Console
- Add redirect URI:
http://localhost:8000/accounts/google/login/callback/ - Configure in Django Admin (
/admin) under Social Applications
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/auth/register/ |
Register new user |
| POST | /api/auth/login/ |
Login β returns JWT tokens |
| POST | /api/auth/refresh/ |
Refresh access token |
| GET | /api/auth/me/ |
Get current user details |
| GET | /accounts/google/login/ |
Google OAuth login |
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/upload-note/ |
Upload lecture note (text/PDF) |
| POST | /api/upload-pdf/ |
Upload PDF with OCR support |
| GET | /api/lectures/ |
List all lecture notes |
| GET | /api/lectures/{id}/ |
Get specific lecture note |
| POST | /api/lectures/{note_id}/summarize/ |
Summarize lecture note |
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/generate-questions/{note_id}/ |
Generate MCQ questions |
| GET | /api/quiz/{note_id}/ |
Get quiz questions |
| POST | /api/submit-mcq/ |
Submit MCQ answer |
| POST | /api/adaptive/quiz/start/ |
Start adaptive quiz |
| POST | /api/quiz-completed/ |
Mark quiz as completed |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/weak-topics/ |
Get weak topics for a note |
| GET | /api/progress/ |
Get overall progress |
| GET | /api/analytics/{note_id}/ |
Get analytics for specific note |
| GET | /api/next-actions/ |
Get recommended next actions |
| GET | /api/ai-insights/{note_id}/ |
Get AI-powered insights |
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/study-plan/ |
Generate personalized study plan |
| GET | /api/study-plan/{note_id}/ |
Get study plan for note |
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/flashcards/generate/ |
Generate flashcards for a note |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/exam/syllabi/ |
List all uploaded syllabi |
| POST | /api/exam/syllabus/upload/ |
Upload exam syllabus (PDF/text) |
| POST | /api/exam/syllabus/{id}/papers/ |
Upload previous question papers |
| POST | /api/exam/syllabus/{id}/generate/ |
Generate exam questions with mark config |
| GET | /api/exam/syllabus/{id}/questions/ |
Get generated exam questions |
| POST | /api/exam/syllabus/{id}/strategy/ |
Generate AI study strategy roadmap |
| PUT | /api/exam/question/{id}/update/ |
Update exam question |
| DELETE | /api/exam/question/{id}/delete/ |
Delete exam question |
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/ai-tutor/chat/ |
Send a chat message β AI responds using Socratic method |
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/ai-tutor/evaluate/ |
Upload assignment for rubric-based AI evaluation |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/notifications/ |
List all notifications |
| POST | /api/notifications/{id}/mark-read/ |
Mark as read |
| POST | /api/notifications/mark-all-read/ |
Mark all as read |
| DELETE | /api/notifications/{id}/delete/ |
Delete notification |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/profile/ |
Get user profile |
| PUT | /api/profile/ |
Update user profile |
user Β· title Β· file (PDF) Β· content (text) Β· created_at
lecture_note Β· topic Β· question_text Β· option_a/b/c/d Β· correct_option Β· explanation Β· difficulty (0.2β0.9)
user Β· question Β· user_answer Β· is_correct Β· time_taken (seconds) Β· answered_at
user Β· lecture_note Β· topic Β· mastery (0.0β1.0) Β· last_updated
user Β· lecture_note Β· topic Β· weakness_score (0.0β2.0)
user Β· topic (null = global) Β· streak (int) Β· last_updated
user Β· lecture_note Β· score Β· total_questions Β· completed_at
user Β· name Β· description Β· icon Β· earned_at
user Β· title Β· content (extracted text) Β· file (PDF) Β· created_at Β· updated_at
exam_syllabus Β· file Β· content (extracted text) Β· uploaded_at
exam_syllabus Β· question_text Β· answer Β· marks Β· priority (1=highest) Β· topic Β· is_from_pattern
exam_syllabus Β· total_marks Β· num_questions Β· mark_distribution (JSON) Β· secure_centum_mode
graph TD
A[Upload Lecture Note] --> B[AI Generates MCQs]
B --> C[Take Adaptive Quiz]
C --> D[Track Performance]
D --> E{Weak Topics?}
E -->|Yes| F[AI Study Plan]
E -->|No| G[Continue Learning]
F --> H[Concept Coach AI Tutoring]
H --> C
G --> A
graph TD
A[Upload Syllabus] --> B[Upload Previous Papers]
B --> C[Configure Mark Distribution]
C --> D[Generate Question Bank]
D --> E[AI Strategy Roadmap]
E --> F[Day-by-Day Study Schedule]
F --> G[Practice Questions]
G --> H[Concept Coach AI for Doubts]
Weakness Scoring:
- Wrong answer:
weakness_score += 0.15 + (difficulty Γ 0.15) - Correct but slow:
weakness_score += 0.03β0.08 Γ difficulty - Correct and fast:
weakness_score -= 0.1β0.15 Γ mastery_gain
Mastery Calculation:
- Learning rate:
0.05β0.12based on difficulty - Correct:
mastery += lr Γ (1.0 - current_mastery) - Wrong:
mastery -= lr Γ 0.6 Γ current_mastery - Clamped:
0.0to1.0
Question Selection:
- 50% from weak topics (easier questions first)
- 50% matching target difficulty (based on recent accuracy)
- Avoids last 100 answered questions
LearnFlow uses a consistent glassmorphism dark theme:
- Background: Deep navy (
#0a0f1e) with card blur (backdrop-filter: blur(16px)) - Accent: Electric blue (
#2563EB) with purple gradient (β #7c3aed) - Cards: Semi-transparent glass with subtle borders (
rgba(42, 59, 77, 0.7)) - Typography: System font with bold weights (700β900) for headings
- Animations: Smooth transitions (200ms), fade-in messages, bouncing typing dots
Gemini API 429 Rate Limit
- Built-in retry logic with exponential backoff. Wait a few seconds and retry.
PDF Extraction Fails
- Ensure
Tesseract-OCRv5+ is installed and in PATH - Ensure
poppler-utils(pdftoppm) is installed and in PATH
Questions Not Generating
- Verify
GEMINI_API_KEYin.env - Check backend terminal for detailed error logs
Concept Coach / Rubric Evaluator not responding
- Confirm backend URL routing in
backend/urls.pyincludesai-tutor/paths - Check the
GEMINI_API_KEYis valid and has quota
Google OAuth Issues
- Verify redirect URI matches exactly in Google Cloud Console
- Check Site configuration in Django Admin
CORS Errors
- Verify
CORS_ALLOW_ALL_ORIGINS = Truein Django settings (dev only) - Frontend must run on
http://localhost:3000
# backend/settings.py
SIMPLE_JWT = {
'ACCESS_TOKEN_LIFETIME': timedelta(minutes=60),
'REFRESH_TOKEN_LIFETIME': timedelta(days=1),
}
CORS_ALLOW_ALL_ORIGINS = True # Set to specific origins in production
# Gemini API key loaded from .env
GEMINI_API_KEY = os.getenv("GEMINI_API_KEY")LearnFlow/
βββ backend/ # Django project settings
βββ core/ # Main Django app
β βββ models.py # All database models
β βββ views.py # Core API views (notes, quiz, analytics)
β βββ exam_views.py # Exam preparation API views
β βββ ai_tutor_views.py # Concept Coach & Rubric Evaluator views
β βββ ai_utils.py # Gemini AI wrapper
β βββ urls.py # URL routing
βββ frontend/
β βββ src/
β βββ pages/
β β βββ ConceptCoach.js # β
Flagship AI tutor chatbot
β β βββ RubricEvaluator.js # Assignment feedback tool
β β βββ ExamPreparation.js # Question bank + strategy
β β βββ StudyPlan.js # Long-term study planner
β β βββ Dashboard.js # Main analytics dashboard
β β βββ Flashcards.js # Flashcard study tool
β β βββ SummarizeLectures.js # Lecture summarizer
β β βββ Quiz.js # Adaptive quiz engine
β β βββ Profile.js # User profile
β βββ layout/
β β βββ SidebarLayout.js # Main navigation sidebar
β βββ api/
β β βββ api.js # Axios instance with JWT interceptor
β βββ context/
β βββ AuthContext.js # Auth state management
β βββ ThemeContext.js # Dark mode theme provider
βββ requirements.txt
βββ .env.example
βββ README.md
# Backend
python manage.py test
python manage.py test core
# Frontend
cd frontend && npm testHappy Learning! π
LearnFlow β Study smarter, not harder.