Skip to content

nameershah/MentorAI

Repository files navigation

MentorAI

The Elite AI Study Assistant powered by Google Gemini 3 Pro. Built for the Google AI Studio "Vibe Coding" Competition.

License Tech AI

Overview

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.


Key Features

Core Intelligence

  • 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.

RAG-Lite Document System

  • 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.

AI Power Tools

  • 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.

Analytics Dashboard

  • Mastery Prediction: AI forecasts your mastery timeline based on activity stats.
  • Visual Tracking: Interactive charts (Recharts) showing streaks, message volume, and knowledge velocity.

Tech Stack

  • 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)

Getting Started

Prerequisites

  • Node.js (v18+)
  • A Google AI Studio API Key (Get it here)

Installation

  1. Clone the repository

    git clone https://github.com/yourusername/mentor-ai.git
    cd mentor-ai
  2. Install dependencies

    npm install
  3. Environment Setup Create a .env file in the root directory (or use the in-app Settings to input your key):

    VITE_API_KEY=your_gemini_api_key_here
  4. Run Locally

    npm run dev

Usage Guide

  1. Chat & Reasoning: Start asking complex questions. Click "View Reasoning Process" to see how Gemini 3 Pro breaks down the problem.
  2. 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.
  3. Flashcards: Go to Tools > Flashcards, enter a topic (e.g., "Cellular Respiration"), and watch it generate a deck.
  4. Code Analysis: Go to Tools > Code Analyzer, paste a buggy snippet, and get a fix + optimization rating.

Architecture

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)

Vibe Coding Competition Details

This project was built to showcase the capabilities of Gemini 3 Pro:

  1. Reasoning: We explicitly prompt and parse <thinking> tags to show off the model's logic.
  2. 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).
  3. Multimodality: Direct image analysis in chat and document parsing.
  4. Safety: Implements granular safetySettings to ensure a safe educational environment.

License

MIT License.

About

Winner of Google DeepMind's Vibe Code with Gemini 3 Pro competition. AI study assistant with flashcards, quizzes, code analysis, and document RAG.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors