How rifkidocs/presensi-face-recognition works
Project type and purpose
• This is a Next.js web application that runs primarily in the browser.
• It provides an attendance (“presensi”) dashboard for students, teachers, and staff, leveraging client-side face recognition and liveness checks.
• There is no separate backend or API folder; data is persisted locally (IndexedDB) and models are served as static assets.
File structure
• Top-level config files: next.config.mjs, tailwind.config.js, postcss.config.mjs, jsconfig.json.
• Public folder: hosts pre-trained face-api.js model shards and weight manifests.
• src/app: Next.js “app router” pages for dashboard and presensi—each with its own route.
• src/components: React UI components (sidebar, tables, forms) and higher-level components (LivenessCheck, WebcamContainer).
• src/hooks: custom hooks for camera, face recognition, location, mobile detection.
• src/lib: core utilities (faceDetection.js, indexedDB.js, presenceUtils.js).
• middleware.js: Next.js middleware (e.g., route guards).
• No /pages/api or database folder implies pure frontend.
README
• Standard Next.js scaffolding instructions.
• No mention of a separate backend or third-party data store.
• Deployed on Vercel, served as a static or server-rendered Next.js app.
Elements
• Blue rectangles for server/hosting (Next.js, Vercel)
• Green rectangles for client-side logic (React, Hooks, ML Pipeline)
Final advice
• Layer distinctly: Hosting → Data store → ML assets → Application logic → UI.
• Be very detailed: include components folder vs. ui subfolder vs. hooks vs. lib.
• Don’t overthink—break the system down into as many logical parts as needed so that every file/folder purpose is represented as a component or sub-component.