Skip to content

slok0066/attendance

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Smart Attendance System

A simple RFID + manual attendance system with a Node.js backend, Next.js frontend, and Neon PostgreSQL.

Project Structure

  • backend/ - Express API + Neon connection
  • frontend/ - Next.js web app (App Router)
  • esp8266/ - RFID firmware for NodeMCU + RC522

Neon Setup

This project is configured for Neon project empty-block-57591024 (org org-silent-darkness-01000100).

  1. Open the SQL editor in Neon and run the schema file:
    • backend/src/db/schema.sql
  2. Keep credentials out of Git and rotate passwords when needed.

Backend

  1. Install dependencies:
    • npm install
  2. Update backend/.env with your own values:
    • DATABASE_URL
    • JWT_SECRET
    • PORT
  3. Start the API:
    • npm run dev

Endpoints:

  • POST /auth/register
  • POST /auth/login
  • POST /classes
  • GET /classes
  • GET /classes/:id
  • POST /classes/:id/students
  • GET /classes/:id/students
  • PUT /students/:id
  • DELETE /students/:id
  • POST /attendance/rfid
  • POST /attendance/manual
  • GET /attendance?class_id=&date=

Frontend (Next.js)

  1. Install dependencies:
    • npm install
  2. Create frontend/.env.local with:
  3. Start the web app:
    • npm run dev

ESP8266

  1. Open esp8266/config.h and set:
    • WIFI_SSID
    • WIFI_PASSWORD
    • BACKEND_URL
    • CLASS_ID
  2. Flash esp8266/rfid_attendance.ino

Notes

  • RFID endpoint is open by design. No device auth or API keys.
  • Manual attendance uses authenticated API calls.
  • Duplicate taps are ignored.

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors