|
|
||
|---|---|---|
| frontend | ||
| src | ||
| .gitignore | ||
| README.md | ||
| package-lock.json | ||
| package.json | ||
| tsconfig.json | ||
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
- Clone the repository
- Install dependencies:
npm install
- Copy
.env.exampleto.envand configure your settings:
cp .env.example .env
- Build the TypeScript code:
npm run build
- Start the server:
npm start
API Endpoints
POST /api/trigger- Trigger the gateGET /api/events- Get recent gate eventsGET /api/settings- Get current settingsPOST /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