Skip to content
iGufrankhanPublic

About

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

🚀 AI Grader: Full-Stack LMS Platform

An intelligent, highly secure Learning Management System built for modern programming education.

Vercel Deployment Render API


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.

✨ Key Features

🧑‍💻 For Students

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

👨‍🏫 For Teachers

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

🛡️ Enterprise-Grade Security

  • 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 draft directly to approved).

🎨 Premium User Interface

  • A highly polished, dynamic dark-mode experience featuring glassmorphism, tailored typography, and modern micro-interactions built from the ground up without heavy UI libraries.

🛠️ Technology Stack

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)

🏎️ Getting Started Locally

Prerequisites

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

Backend Setup

  1. Navigate to the backend directory and install dependencies:
    cd Backend && npm install
  2. Create a .env file in the Backend directory:
    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
  3. (Optional) Seed the database with 5 sample programming questions:
    node seed.js
  4. Start the backend development server:
    npm run dev

Frontend Setup

  1. Navigate to the frontend directory and install dependencies:
    cd Frontend && npm install
  2. Create a .env.local file to point to your local backend:
    NEXT_PUBLIC_API_URL=http://localhost:5000/api
  3. Start the frontend development server:
    npm run dev
  4. Open your browser and navigate to http://localhost:3000.

Built for the modern classroom. Secure. AI-Enabled.

About

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages