An intelligent, highly secure Learning Management System built for modern programming education.
AI Grader bridges the gap between student programming practice and teacher moderation. It provides an interactive coding workspace where students solve algorithmic challenges, execute code against automated test cases, and receive immediate AI-generated feedback. Furthermore, it incorporates a robust community doubt board driven by a structured AI-to-Teacher approval workflow.
- Interactive Code Workspace: Write and execute code instantly in JavaScript, Python, Java, C++, and C.
- Sandboxed Execution: Secure remote code execution and grading engine powered by JDoodle.
- AI-Powered Code Feedback: Receive structured, intelligent AI feedback highlighting strengths, logic mistakes, and optimization suggestions (Powered by Groq & LangChain).
- Context-Aware Help: Submit a doubt when stuck, and the system automatically attaches your current code and execution context.
- Doubt Resolution Workflow (State Machine):
- Draft: The AI securely analyzes the student's code and drafts an initial explanation.
- Pending: The drafted doubt is held in a secure pending state, invisible to other students.
- Approved/Rejected: Teachers review the AI's draft on a dedicated dashboard, where they can edit, approve, or reject the explanation before it hits the community board.
- Prompt Injection Resilience: All user inputs (code, doubt queries, titles) are rigorously wrapped in strict
---UNTRUSTED DATA---delimiters to prevent malicious LLM prompt injections. - Graceful AI Fallbacks: The platform is engineered to gracefully degrade. If the AI service hits rate limits or is unconfigured, the system intercepts the error and provides a fallback draft, ensuring the core LMS workflow never crashes.
- Strict DB State Transitions: Mongoose hooks strictly enforce workflow transitions preventing manual manipulation of doubt statuses (e.g., jumping from
draftdirectly toapproved).
- A highly polished, dynamic dark-mode experience featuring glassmorphism, tailored typography, and modern micro-interactions built from the ground up without heavy UI libraries.
| Architecture | Technologies |
|---|---|
| Frontend | Next.js 15 (App Router), React 19, Vanilla CSS (Glassmorphism), Lucide React |
| Backend | Node.js, Express.js |
| Database | MongoDB & Mongoose (State-machine enforcing schemas) |
| Authentication | JSON Web Tokens (Role-Based Access Control) |
| AI Integration | @langchain/core, @langchain/groq, Llama 3 |
| Code Execution | JDoogle API (Remote Sandboxing) |
- Node.js (v18 or higher)
- MongoDB (Local or Atlas URI)
- Groq API Key (For AI Feedback and Drafts)
- JDoodle API Credentials (Client ID & Secret for Code Execution)
- Navigate to the backend directory and install dependencies:
cd Backend && npm install
- Create a
.envfile in theBackenddirectory:PORT=5000 MONGO_URI=your_mongodb_connection_string JWT_SECRET=your_jwt_secret GROQ_API_KEY=your_groq_api_key JDOOGLE_CLIENT_ID=your_jdoogle_client_id JDOOGLE_CLIENT_SECRET=your_jdoogle_client_secret
- (Optional) Seed the database with 5 sample programming questions:
node seed.js
- Start the backend development server:
npm run dev
- Navigate to the frontend directory and install dependencies:
cd Frontend && npm install
- Create a
.env.localfile to point to your local backend:NEXT_PUBLIC_API_URL=http://localhost:5000/api
- Start the frontend development server:
npm run dev
- Open your browser and navigate to
http://localhost:3000.
Built for the modern classroom. Secure. AI-Enabled.