recognize.py file and close the laptop.
After: Attendance Pro is now fully complete and working end-to-end.
Finishing it meant building and integrating the full face recognition pipeline:
- Lecturer captures a photo via the device camera (expo-camera)
- Image is uploaded to the Node.js backend via multipart form
- Node.js calls
recognize.py using child_process.spawn()
- Python loads the image, extracts facial encodings via
face_recognition
- Compares against reference images in
known_students/ with a strict tolerance of 0.5
- Returns matched student roll number as JSON back to Node.js
- Node.js inserts the attendance record into MySQL instantly
- The attendance list updates in real time on the lecturer's screen
The hardest part was making the Node.js ↔ Python bridge reliable. Handling edge cases — "no face detected", "face not in database", "already marked today" — required careful error handling on both sides. Tuning the tolerance value (0.5) to balance accuracy against false rejections took real-world testing with actual photos in different lighting conditions.
The moment it worked — when the app correctly identified a student from a live camera capture and marked them present automatically — the whole system finally felt like what it was always supposed to be.
30 test cases. All passed. Login, registration, face recognition, leave management, report generation, admin operations — all verified and working.
My Experience with GitHub Copilot
I used GitHub Copilot as a focused accelerator — not for the hard decisions, but for the parts where I knew exactly what I needed but didn't want to spend time typing it out.
The single most valuable moment was the recognize.py ↔ Node.js integration. I knew I needed to call Python from Node, but wasn't sure of the cleanest pattern. Copilot suggested child_process.spawn() immediately and then autocompleted the stdout buffering and JSON parsing logic. That one suggestion saved at least 30–40 minutes of documentation searching.
Other areas where it helped:
- SQL queries for attendance percentage calculations (the
CASE WHEN + NULLIF pattern)
- Express route handler scaffolding for the leave request and login APIs
- React Native
useEffect + fetch patterns for the dashboard data loading
- Nodemailer transporter configuration for the shortage email alerts
For everything that actually mattered — the tolerance tuning, the RBAC architecture, debugging the face encoding mismatch between registration and recognition — I worked through those manually. Copilot is best when you know what you want and just need it written fast. That's exactly how I used it: it handled the repetitive parts so I could stay focused on the parts that required actual thinking.