ReviseBuddy is a fully functional, responsive web application designed to help school students revise their coursebooks efficiently using AI. It serves as a virtual teaching companion, allowing users to upload or select PDFs (e.g., NCERT textbooks), generate quizzes, track progress, chat with an AI tutor, and receive personalized YouTube video recommendations.
Built with a modern MERN stack (MongoDB, Express.js, React, Node.js), it incorporates advanced AI features via the Gemini API for question generation, Retrieval-Augmented Generation (RAG) answers with citations, and video suggestions.
- Highly Customizable UI/UX: Live particle backgrounds, custom cursors, animated buttons, and a settings page for theme, color, cursor, and font customization—making it engaging and personalized.
- AI-Driven Interactivity: Uses Gemini API for dynamic quizzes (MCQs, SAQs, LAQs), RAG-based chat with PDF citations, and video recommendations without needing paid APIs like YouTube Data API.
- Seamless Integration: Split-view PDF reader with chat/quiz, progress tracking dashboard, and responsive design for mobile/desktop.
- Error-Free and Scalable: All code is validated, with fallback mechanisms (e.g., text-based search if embeddings fail due to API limits).
Whether you're a student revising NCERT Class XI Physics or uploading custom PDFs, ReviseBuddy makes learning interactive and fun. It's different from normal projects by prioritizing advanced frontend aesthetics (e.g., Framer Motion animations, Tailwind CSS) and AI depth (RAG for accurate citations), while being beginner-friendly to set up.
- Choose from seeded PDFs (e.g., NCERT Class XI Physics Part 1 & 2) or all uploaded PDFs.
- Upload your own PDF coursebooks for personalized revision.
- Display selected PDFs in a split-view or tab alongside chat/quiz.
- Responsive navigation (prev/next pages) using react-pdf.
- AI-generated quizzes from selected PDFs: Multiple Choice Questions (MCQs), Short Answer Questions (SAQs), and Long Answer Questions (LAQs).
- Render quizzes, capture answers, score submissions, and provide explanations.
- Option to generate new sets of questions.
- Stores attempts in MongoDB for progress tracking.
- Dashboard showing strengths, weaknesses, and recent scores (e.g., "Mechanics: 80%").
- Analyzes quiz results to highlight areas for improvement (e.g., "Topic Mastered" if score >70%).
- Visual placeholders for new users (e.g., "No progress yet. Complete a quiz to see your scores!").
- Virtual teacher companion with a clean, mobile-responsive design.
- Left drawer for chat history, main window for messages, bottom input box.
- New chat creation, switching between chats.
- RAG-based answers: AI responses cite PDF page numbers and snippets (e.g., "According to p. 23: '...'").
- Recommends 3-5 educational YouTube videos relevant to the selected PDF or topic.
- Powered by Gemini API prompts (no YouTube API needed)—e.g., "Top videos on Newton's Laws".
- Advanced Frontend Customization: Settings page to change theme (light/dark), background/button colors, cursor style (default/glow/pointer), and font (Roboto/sans-serif/monospace). Changes persist via localStorage.
- Animations and Visuals: Framer Motion for page transitions/button hovers, particles.js for live backgrounds, custom loading spinners.
- Responsive Design: Mobile-first with Tailwind CSS; works seamlessly on phones, tablets, and desktops.
- Authentication: Simple JWT-based signup/login for personalized progress and chats.
- Error Handling: Graceful fallbacks (e.g., text-based search if Gemini embeddings fail due to quota limits).
- Framework: React.js (for UI components and state management).
- Styling: Tailwind CSS (responsive design), Custom CSS (themes, animations).
- Animations/UI Libraries: Framer Motion (transitions), particles.js (live backgrounds), lucide-react (icons), react-pdf (PDF viewer).
- State Management: React Context (for themes), localStorage (persistence).
- HTTP Client: Axios (API requests).
- Routing: React Router DOM.
- Server: Node.js with Express.js (API endpoints).
- Database: MongoDB (user data, progress, chat history).
- AI Integration: Google Generative AI (Gemini API) for quizzes, RAG, embeddings, and video recommendations.
- PDF Handling: pdf-parse (text extraction), Multer (uploads).
- Authentication: JSON Web Tokens (JWT), bcryptjs (password hashing).
- Utilities: fs-extra (file handling), dotenv (environment variables).
- Deployment/Environment: Local setup with Node.js v18+, MongoDB v6+.
- Tools: Gemini API (free tier), no additional paid services required.
This guide is designed for beginners with no prior knowledge. We'll cover everything step-by-step, including installing prerequisites. Prerequisites
- Download from nodejs.org.
- Install and verify: Open Command Prompt/PowerShell, run node -v (should show v18 or higher).
- Download Community Edition from mongodb.com.
- Install and run: Open Command Prompt/PowerShell, run mongod to start the server (it runs on mongodb://localhost:27017 by default).
- Alternative: Use free MongoDB Atlas cloud database—create a cluster, get the URI string.
- Sign up for free at Google AI Studio.
- Generate an API key (free tier sufficient for testing; note quota limits).
- Download Class XI Physics Part 1 & 2 from NCERT website.
- Place in frontend/public/pdfs/ (create folder if missing).
-
Open Command Prompt/PowerShell.
-
Run: git clone your-repo-url cd revise-buddy
-
Install Dependencies:
-
Backend: cd backend npm install
-
Frontend: cd ../frontend npm install
Backend (backend/.env—create if missing):
MONGO_URI=mongodb://localhost:27017/revisebuddy # Or your Atlas URI
JWT_SECRET=supersecretkey123 # Any strong secret
GEMINI_API_KEY=your_gemini_api_key_here # From Google AI Studio
PORT=5000
NODE_ENV=development
-
Frontend (frontend/.env—create if missing):
REACT_APP_API_URL=http://localhost:5000/api -
Start MongoDB:
-
Run mongod in a separate Command Prompt (or ensure Atlas is set up).
-
Run the Backend:
cd backend node server.js Output: “MongoDB connected”, “Server on 5000”, “Seeded PDFs: [...]”. -
Run the Frontend:
cd frontend npm start Opens http://localhost:3000 in your browser. -
Test the App:
Go to /login, signup/login (e.g., email: test@example.com, password: test123). Explore features: Upload PDFs, generate quizzes, chat, view dashboard.
- Login/Signup: Required for progress tracking and chats.
- Home Page: Select or upload PDFs.
- Quiz Page: Generate and submit quizzes.
- Chat Page: Ask questions about PDF content.
- Dashboard: View progress after quizzes.
- Settings: Customize UI (themes, colors, cursor, font).
- AI Focus: Integrates Gemini for dynamic content (quizzes, RAG, videos), unlike static apps.
- Advanced UI: Live particles, custom cursors, animations—engaging for students, not just basic forms.
- Customization: User-configurable themes/settings, rare in simple revision tools.
- Full-Stack Depth: MERN with RAG embeddings, MongoDB persistence, JWT auth—scalable for production.
- Beginner-Friendly Setup: Detailed README, error-free code, fallbacks for API limits.
- Enhanced AI: Integrate Pinecone for scalable vector storage; add more models (e.g., OpenAI for alternatives).
- User Features: Multi-user support, shared chats, gamification (badges for high scores).
- Mobile App: Convert to React Native for iOS/Android.
- Analytics: Add charts (e.g., score trends with Chart.js) to Dashboard.
- Accessibility: Improve ARIA labels, keyboard navigation.
- Deployment: Host on Vercel/Heroku (frontend), Render (backend), Atlas (MongoDB).
- Security: Add OAuth (Google login), rate limiting.
- Extensions: Support more subjects, audio mode for quizzes, export progress to PDF.
- MIT License. See LICENSE for details.