How rituraj-anos/checkinmate works
Project Type & Purpose
• This is a full-stack web application (“CheckinMate”) built with Next.js (React) on the frontend and Next.js API routes on the backend, persisting data in Firebase Firestore.
• Purpose: real-time student attendance tracking via RFID tags, intended for hackathon use with easy deployment on Vercel.
File-Structure Analysis
• Top-Level Directories & Files
• public/ – static assets
• src/app/ – Next.js App Router routes & API endpoints
‑ page.tsx, layout.tsx, global-error.tsx, globals.css
‑ api/scan/route.ts (RFID scan ingestion)
‑ api/student/route.ts (student CRUD)
• src/components/ – presentational & layout React components
• src/components/ui/ – reusable UI primitives (buttons, dialogs, tables, etc.)
• src/hooks/ & src/lib/ – custom hooks and utilities, including firebase.ts connection
• simulate_scan.py – external script simulating RFID scans
• config files: next.config.ts, postcss.config.mjs, eslint.config.mjs
README Insights
• Technology stack: Next.js, Firebase Firestore, React
• Core features: add/edit students, real-time attendance, RFID support
• Deployment target: Vercel
Main Components
a. Client (Web Browser – React UI)
b. Next.js Frontend Server (SSR/CSR)
c. Next.js Serverless API Layer
• /api/student (student CRUD)
• /api/scan (RFID scan ingestion)
d. Firebase Firestore (NoSQL database)
e. simulate_scan.py (external scan simulator)
f. Vercel Hosting (deployment platform)
Architectural Patterns & Design Principles
• Full-stack separation: clear boundary between UI, API, and data persistence
• Serverless micro-endpoints (per-route functions) for scan and student services
• Real-time data flow via Firestore listeners
• Reusable UI primitives (atomic design in src/components/ui)