A React-based web application designed to help teachers efficiently grade student exams using Google's Gemini AI. The application supports grading papers by analyzing images or documents against a provided model answer key and teacher notes. It provides intelligent insights, grading modification, chat interaction with the AI, and an analytics dashboard.
- AI-Powered Grading: Automatically grades student exam papers (PDF, DOC, images, ZIP) using
gemini-3-flash-previewbased on a model answer key and optional teacher notes. - Student Assessment Modal: Teachers can view AI grading details, including individual marks and reasons for deductions.
- Discussion with AI: Chat interface to discuss specific student evaluations with the AI, with context integration (answers, notes).
- Manual Adjustments: Teachers can manually edit student grades and notes, which visually separates AI suggestions from teacher adjustments.
- Statistics Dashboard: Visualizing class performance with Recharts:
- Grade distribution and Pass/Fail rates.
- Comparison across different sections.
- Item analysis (question averages) to find hardest questions.
- AI-generated insights extracting common mistakes and recommendations from the batch.
- Top students ("Honor Roll") and At-Risk students.
- Export to Excel: Download all grading data, including notes and original AI suggestions, into an XLSX file formatted for RTL display.
- Dark Mode and RTL: Built-in Dark Mode support and Right-to-Left formatting, with an Arabic UI.
src/App.jsx: Main application component, holding the state of students, files, and UI modes, integrating all main components and handling API interactions.src/services/ai.js: Core service handling interaction with the Gemini API for grading, file parsing, AI chatting, and generating batch statistics.src/components/FileUploader.jsx: Upload component handling drag-and-drop file inputs.src/components/StudentDetailsModal.jsx: Viewing and chatting about a specific student's evaluation.src/components/StudentEditModal.jsx: Form to manually adjust student grades and data.src/components/StatisticsModal.jsx: Dashboard displaying charts and insights for the entire class.
- Clone details: Navigate to the
Smart Grade Assistantdirectory. - Install dependencies:
npm install
- Configure Environment:
Ensure you have an environment file (
.envor similar) with your Gemini API key:VITE_GEMINI_API_KEY=your_api_key_here
- Run Development Server:
npm run dev
- Build for Production:
npm run build
- Frontend: React 19, Vite, TailwindCSS (v4)
- AI Integration:
@google/generative-ai(Gemini API) - Charts: Recharts
- File Export: SheetJS (
xlsx)