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.
- 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
- Node.js (v16 or later) — Download
- Arduino connected via USB (optional — works in test mode without it)
-
Install dependencies:
cd backend npm install -
Start the server:
npm start
-
Open the dashboard: Visit http://localhost:3000 in your browser.
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.).
| 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 |
- Frontend: HTML, CSS, JavaScript (vanilla)
- Backend: Node.js, Express
- Database: SQLite (via better-sqlite3)
- Serial: serialport library