This delivers a pure React + JS SPA with a Node/Express + MongoDB backend. The backend implements JWT auth, role-based authorization, and all required routes, while the frontend provides faculty timetable management and attendance marking plus student reports with color-coded percentages. To run locally, start the server (node server/server.js with Mongo running and env vars set), then open public/index.html; update API_BASE in localStorage if your server isn’t on http://localhost:4000.
To configure the generation, complete these steps:
Yes—it's ready. Here’s how to run and test it locally: - Download and unzip the project - Backend (Node/Express + MongoDB) - Requirements: Node 18+, a running MongoDB (local or Atlas) - Optional: create server/.env with: - MONGO_URI=mongodb://127.0.0.1:27017/attendance - JWT_SECRET=your_strong_secret - PORT=4000 - Start the server: - In your terminal: cd server - npm install - npm start - Verify: open http://localhost:4000/api/health (should return {"ok":true}) - Frontend (Pure React SPA) - Open public/index.html in a browser - Recommended: serve it via a simple static server (e.g., VS Code Live Server) for best results - If your API isn’t at http://localhost:4000, set API base in the browser console and refresh: - localStorage.setItem('API_BASE', 'http://localhost:4000') - Quick test flow - Register a Faculty and a Student (ensure Student class/division matches what you’ll use in lectures) - Login as Faculty → add a lecture → click Mark → submit attendance - Login as Student → see per-subject and overall attendance; try “Find Faculty Profile” by facultyId Notes - CORS is enabled on the server; fetching from file:// or a static server should work - The server logs will show “[server] Listening on http://localhost:4000” and “Connected to MongoDB” when ready - For production: host the backend (Node) on a server with MongoDB Atlas; host public/index.html on any static host; set API_BASE to your backend URL via localStorage and refresh
You can send messages while the preview loads