A comprehensive MERN stack educational platform with role-based access control, integrating with a face recognition attendance system.
- View personal attendance records
- Track performance across quizzes
- Take AI-generated quizzes from curriculum
- View AI-powered feedback on performance
- Mark student attendance
- Upload curriculum PDFs
- Generate quizzes using OpenAI from uploaded content
- Generate lesson plans using AI
- Voice-enabled AI assistant for querying student data
- View student performance and attendance reports
- Complete user management (CRUD operations)
- Dashboard with platform statistics
- Attendance reports with export functionality
- Monitor all classes and students
platform/
├── backend/
│ ├── config/
│ │ └── db.js
│ ├── controllers/
│ │ ├── authController.js
│ │ ├── attendanceController.js
│ │ ├── performanceController.js
│ │ ├── resourceController.js
│ │ └── userController.js
│ ├── middleware/
│ │ ├── authMiddleware.js
│ │ └── uploadMiddleware.js
│ ├── models/
│ │ ├── Attendance.js
│ │ ├── Performance.js
│ │ ├── Resource.js
│ │ └── User.js
│ ├── routes/
│ │ ├── authRoutes.js
│ │ ├── attendanceRoutes.js
│ │ ├── performanceRoutes.js
│ │ ├── resourceRoutes.js
│ │ └── userRoutes.js
│ ├── .env
│ ├── package.json
│ └── server.js
│
└── frontend/
├── public/
│ └── index.html
└── src/
├── context/
│ └── AuthContext.js
├── layouts/
│ └── Layout.js
├── pages/
│ ├── auth/
│ │ ├── LoginPage.js
│ │ └── RegisterPage.js
│ ├── student/
│ │ ├── StudentDashboard.js
│ │ ├── StudentAttendance.js
│ │ ├── StudentPerformance.js
│ │ └── StudentQuiz.js
│ ├── teacher/
│ │ ├── TeacherDashboard.js
│ │ ├── TeacherAttendance.js
│ │ ├── TeacherResources.js
│ │ ├── TeacherStudents.js
│ │ └── TeacherAIAssistant.js
│ └── management/
│ ├── ManagementDashboard.js
│ ├── ManagementUsers.js
│ └── ManagementReports.js
├── services/
│ └── api.js
├── styles/
│ └── index.css
├── App.js
└── index.js
- Node.js (v18+)
- MongoDB (local or Atlas)
- OpenAI API Key
- Navigate to backend directory:
cd platform/backend- Install dependencies:
npm install- Configure environment variables in
.env:
PORT=5000
MONGODB_URI=mongodb://localhost:27017/vidyasetu
JWT_SECRET=your_jwt_secret_key
OPENAI_API_KEY=your_openai_api_key- Start the server:
npm run dev- Navigate to frontend directory:
cd platform/frontend- Install dependencies:
npm install- Start the development server:
npm startThe frontend will run on http://localhost:3000 and proxy API requests to http://localhost:5000.
POST /api/auth/register- Register new userPOST /api/auth/login- Login userGET /api/auth/me- Get current user profilePUT /api/auth/profile- Update profile
GET /api/attendance- Get attendance recordsPOST /api/attendance- Mark single attendancePOST /api/attendance/bulk- Bulk mark attendanceGET /api/attendance/stats- Get attendance statistics
GET /api/resources- Get all resourcesPOST /api/resources/upload- Upload PDF curriculumPOST /api/resources/:id/generate-quiz- Generate quiz from resourcePOST /api/resources/:id/generate-lesson-plan- Generate lesson plan
GET /api/performance- Get performance recordsPOST /api/performance/submit-quiz- Submit quiz answersGET /api/performance/stats- Get performance statisticsPOST /api/performance/ai-query- AI-powered query for student data
GET /api/users- Get all usersGET /api/users/:id- Get single userPUT /api/users/:id- Update userDELETE /api/users/:id- Delete userGET /api/users/dashboard/stats- Get dashboard statistics
| Feature | Student | Teacher | Management |
|---|---|---|---|
| View Own Attendance | ✅ | - | - |
| View Own Performance | ✅ | - | - |
| Take Quizzes | ✅ | - | - |
| Mark Attendance | ❌ | ✅ | ✅ |
| Upload Resources | ❌ | ✅ | ✅ |
| Generate Quiz/Plans | ❌ | ✅ | ✅ |
| AI Assistant | ❌ | ✅ | ✅ |
| Manage Users | ❌ | ❌ | ✅ |
| View All Reports | ❌ | ❌ | ✅ |
- Node.js & Express.js
- MongoDB & Mongoose
- JWT Authentication
- OpenAI API
- Multer (File uploads)
- PDF-Parse (PDF text extraction)
- React 18
- React Router v6
- Axios
- React Toastify
- React Icons
- Web Speech API (Voice input)
This platform is designed to work alongside the existing Python-based face recognition attendance system. The User model includes a face_encoding field (128-d vector) that can be populated by the Python system for face-based attendance marking.