/pclub_task6

Primary LanguageJavaScript

Attendance App

A MERN stack web app which can be used for Attendance marking using Face recognition. face-api.js has been implemented for face recognition.

Intructions to run the code locally:

  1. Clone the repository using
git clone https://github.com/Shlok-Jain/pclub_task6
  1. cd in the repository
cd ./pclub_task6
  1. cd in backend
cd ./backend
  1. Install libraries
npm install
  1. Run backend (make sure localhost port 5000 is free)
node index.js
  1. Open a new terminal for frontend and cd in frontend folder
cd ./pclub_task6/vite-project
  1. Install libraries
npm install
  1. Run frontend
npm run dev
  1. Go to link mentioned in terminal to access webapp.

How to use

  • Go to student login page, enter roll no and password to get your attendance
  • To add new student: Login on admin login page(password: admin123) then click "Add student". Allow camera access, enter details, click photo using "Take photo" button, and submit.
  • Mark attendance: login in admin panel, click on "Mark attendance", click "take photo" and submit

Frontend endpoints:

  • / : Home page
  • /student : For students to see their attendance history
  • /admin : For admin login
  • /adminpanel : To see all students' attendance history
  • /addstudent : Registering new students
  • /mark : Marking attendance (it will take some time, please be patient...)

Backend endpoints:

  • /student(POST) : returns attendance history by taking roll no. and password of specific student.
  • /addstudent(POST) : Registeres a student in database.
  • /adminlogin(POST) : Admin authentication
  • /getstudentsattendance(POST) : returns attendance history of all students
  • /markattendance(POST) : Marks attendance of student, taking this photo

The MongoDB database used here has been deleted so you will have to create your own database and add its URI to db.js file.