The Elite AI Study Assistant powered by Google Gemini 3 Pro. Built for the Google AI Studio "Vibe Coding" Competition.
MentorAI is a production-grade Single Page Application (SPA) designed to transform how students learn. By leveraging the multimodal capabilities, massive context window, and reasoning power of Gemini 3 Pro, MentorAI offers a personalized, adaptive, and interactive study experience.
Unlike generic chatbots, MentorAI features specialized agents for Flashcard Generation, Adaptive Quizzing, Code Analysis, and Document Summarization—all wrapped in a beautiful, glassmorphic UI with local persistence.
- Gemini 3 Pro Integration: Utilizes the latest model for deep reasoning and complex problem solving.
- Transparent Reasoning: Visualizes the AI's thought process using collapsible
<thinking>blocks. - Multimodal Chat: Drag-and-drop images for analysis or use Voice Input/Output for hands-free study.
- Context-Aware: Upload PDFs, Text files, or Images.
- Pinning System: Pin specific documents to "ground" the AI's answers in your course material.
- Smart Parsing: Client-side processing of files to maintain privacy and speed.
- 3D Flashcards: Generates study decks with spaced-repetition tracking and beautiful 3D flip animations.
- Quiz Agent: Creates adaptive multiple-choice quizzes with explanations and gamified scoring (confetti & sounds!).
- Code Analyzer: A dedicated tool for debugging, optimizing, and explaining code snippets in any language.
- Study Planner: Generates detailed weekly schedules based on your goals and timeline.
- Problem Solver: Specialized mode for rendering LaTeX Math equations ($$ E=mc^2 $$) and solving complex STEM problems.
- Mastery Prediction: AI forecasts your mastery timeline based on activity stats.
- Visual Tracking: Interactive charts (Recharts) showing streaks, message volume, and knowledge velocity.
- Frontend: React 18, TypeScript, Tailwind CSS
- AI SDK:
@google/genai(Gemini API) - State Management: React Context + useReducer (Local Storage persistence)
- Visuals: Lucide React (Icons), Recharts (Analytics), Canvas Confetti, Mermaid.js
- Audio: Web Audio API (Synthesized Sound Effects)
- Node.js (v18+)
- A Google AI Studio API Key (Get it here)
-
Clone the repository
git clone https://github.com/yourusername/mentor-ai.git cd mentor-ai -
Install dependencies
npm install
-
Environment Setup Create a
.envfile in the root directory (or use the in-app Settings to input your key):VITE_API_KEY=your_gemini_api_key_here
-
Run Locally
npm run dev
- Chat & Reasoning: Start asking complex questions. Click "View Reasoning Process" to see how Gemini 3 Pro breaks down the problem.
- Upload & Pin: Go to the Documents tab, upload a lecture note (PDF/TXT), and click the 📌 icon. Go back to chat; the AI now knows that document.
- Flashcards: Go to Tools > Flashcards, enter a topic (e.g., "Cellular Respiration"), and watch it generate a deck.
- Code Analysis: Go to Tools > Code Analyzer, paste a buggy snippet, and get a fix + optimization rating.
The app follows a clean, modular architecture:
/
├── components/ # UI Components (Chat, Tools, Dashboard)
│ ├── Tools/ # Specialized AI Tools (Flashcards, Solver, etc.)
├── context/ # Global State (Reducer + LocalStorage)
├── services/ # Gemini API Integration (Streaming, Tools)
├── types.ts # TypeScript Definitions
└── utils/ # Helpers (Sounds, Formatters)
This project was built to showcase the capabilities of Gemini 3 Pro:
- Reasoning: We explicitly prompt and parse
<thinking>tags to show off the model's logic. - Speed vs. Power: We use a hybrid strategy—Gemini 3 Pro for complex chat and code analysis, and Gemini 2.5 Flash for high-speed JSON generation (Quizzes/Flashcards).
- Multimodality: Direct image analysis in chat and document parsing.
- Safety: Implements granular
safetySettingsto ensure a safe educational environment.
MIT License.