How manishkandari9/manualattendancetrack-management-system works
Project Type and Purpose
• This is a full-stack web application called “Manual-Attendance-System” with a responsive React-based UI and a Node.js/Express backend.
• It supports user authentication, attendance tracking (including face-recognition attendance), assignment management, and different dashboards for students and teachers.
File-Structure Analysis
• Top-level “backned” folder (typo of “backend”) holds both backend logic and the production build of the frontend.
• backend/config: database connection setup (db.js).
• backend/middleware: JWT-based auth middleware (authMiddleware.js).
• backend/models: Mongoose schema definitions for User, Assignment, Attendance, faceAttendance, etc.
• backend/controller: request handlers grouped by domain (authController, attendanceController, faceAttendanceController, etc.).
• backend/routes: Express routers that map HTTP endpoints to controllers.
• backend/server.js: main Express app, static-file serving (frontend/dist) and API routes mounting.
• backend/frontend: React/Vite/Tailwind project with source (src) and production “dist” containing static assets.
Key Insights from README
• Minimal description: focuses on manual attendance with attractive UI and additional features (face-based attendance, assignment tracking).
a. Components
• Browser / Client:
– React SPA (built by Vite, styled with Tailwind)
– Hosts pages: SignIn/SignUp, TeacherDashboard, StudentDashboard, AssignmentManager, FaceScan, CalendarSidebar
• API Server:
– Node.js + Express application (server.js)
– Static-file server for React’s /dist
– REST API endpoints (auth, attendance, faceAttendance, assignment, student)
• Business Logic Layer:
– Controllers (authController, attendanceController, faceAttendanceController, etc.)
– Middleware (authMiddleware for JWT verification)
• Data Access Layer:
– Mongoose Models interacting with MongoDB (User, Attendance, Assignment, faceAttendanceModel, faceStudentModel)
• Database:
– MongoDB instance (connection configured in config/db.js)
• External/Third-Party Services:
– (Optional) Face recognition library or service invoked by faceAttendanceController
– (Optional) Email/SMS service for notifications (if added later)
b. Relationships & Data Flow
1. User → Browser React UI
2. React UI → HTTP(S) → Express API (api/auth, api/attendance, etc.)
3. Express Routes → authMiddleware (for protected routes) → Controllers
4. Controllers ↔ Mongoose Models → MongoDB
5. faceAttendanceController ↔ Face-Recognition Module/Service
6. Controllers return JSON → React processes response → UI updates
c. Architectural Patterns & Principles
• Layered Architecture (Presentation → API Layer → Business Logic → Data Access → Database)
• MVC‐style separation: routes (C), controllers (C/B), models (M)
• Single Page Application (SPA) on the frontend
• JWT-based stateless authentication
• Static-asset serving of production React build from the same Node server
d. Key Technologies & Frameworks
• Frontend: React, Vite, Tailwind CSS
• Backend: Node.js, Express.js, Mongoose (MongoDB ODM)
• Auth: JSON Web Tokens (JWT)
• Build & Deploy: NPM scripts, GitHub Actions (build-deploy.yml)