Skip to content

Anuj-72/Smart-Visitor-Entry-System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Smart Visitor Entry System

A web-based entry logging system that works with Arduino hardware to track household entries. When someone unlocks and enters the house, the Arduino sends a signal over USB serial, and this system logs the timestamp and displays it on a clean dashboard.

Features

  • Automatic entry logging from Arduino hardware via USB serial
  • Dashboard statistics — total entries, today's count, last hour activity
  • Entry log table with date & time formatting
  • Date filtering — view entries from specific date ranges
  • Pagination — handles large numbers of entries
  • Auto-refresh — stats update every 30 seconds
  • Manual test entries — test without hardware connected

Prerequisites

  • Node.js (v16 or later) — Download
  • Arduino connected via USB (optional — works in test mode without it)

Setup

  1. Install dependencies:

    cd backend
    npm install
  2. Start the server:

    npm start
  3. Open the dashboard: Visit http://localhost:3000 in your browser.

Arduino Setup

Your Arduino should send the string ENTRY (followed by a newline) over serial at 9600 baud whenever an entry is detected.

Example Arduino sketch:

void setup() {
  Serial.begin(9600);
  // Setup your sensor (PIR, reed switch, RFID, etc.)
}

void loop() {
  if (entryDetected()) {
    Serial.println("ENTRY");
    delay(2000); // Debounce
  }
}

The system auto-detects common Arduino ports (/dev/ttyUSB0, /dev/ttyACM0, etc.).

API Endpoints

Method Endpoint Description
GET /api/entries?page=1&startDate=2026-01-01&endDate=2026-12-31 Fetch entries with optional filters
GET /api/stats Dashboard statistics
POST /api/entries Add a manual test entry
GET /api/serial/status Serial connection status

Tech Stack

  • Frontend: HTML, CSS, JavaScript (vanilla)
  • Backend: Node.js, Express
  • Database: SQLite (via better-sqlite3)
  • Serial: serialport library

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages