Go to file
Josh Finlay 45167a0f19 Added dev run script 2025-01-06 10:58:08 +10:00
frontend Initial commit - DLB Gatekeeper project setup 2025-01-06 10:52:30 +10:00
src Initial commit - DLB Gatekeeper project setup 2025-01-06 10:52:30 +10:00
.gitignore Initial commit - DLB Gatekeeper project setup 2025-01-06 10:52:30 +10:00
README.md Initial commit - DLB Gatekeeper project setup 2025-01-06 10:52:30 +10:00
build.sh Added build script 2025-01-06 10:56:52 +10:00
dev.sh Added dev run script 2025-01-06 10:58:08 +10:00
package-lock.json Initial commit - DLB Gatekeeper project setup 2025-01-06 10:52:30 +10:00
package.json Initial commit - DLB Gatekeeper project setup 2025-01-06 10:52:30 +10:00
tsconfig.json Initial commit - DLB Gatekeeper project setup 2025-01-06 10:52:30 +10:00

README.md

DLB Gatekeeper

A Node.js application for controlling a gate via Raspberry Pi GPIO.

Features

  • REST API for gate control
  • Event logging
  • Configurable settings
  • GPIO control for relay
  • Simple web interface

Installation

  1. Clone the repository
  2. Install dependencies:
npm install
  1. Copy .env.example to .env and configure your settings:
cp .env.example .env
  1. Build the TypeScript code:
npm run build
  1. Start the server:
npm start

API Endpoints

  • POST /api/trigger - Trigger the gate
  • GET /api/events - Get recent gate events
  • GET /api/settings - Get current settings
  • POST /api/settings - Update settings

Hardware Setup

  • Connect relay control to GPIO pin (default: 18)
  • Ensure proper power supply for the relay
  • Ground connections as needed

Development

Run in development mode with auto-reload:

npm run dev

Security

  • JWT authentication (to be implemented)
  • Rate limiting enabled
  • CORS protection
  • Helmet security headers