Go to file
Josh Finlay 18389ed0cb UI/UX Improvements and Infrastructure Updates
Frontend Changes:
- Enhanced mobile responsiveness:
  * Reduced top spacing on mobile screens
  * Made the gate control button larger and full-width on mobile
  * Improved text sizing and padding for better readability
- Improved visual design:
  * Enhanced macOS-style glass effect with deeper shadows
  * Added subtle gradient background with brand colors
  * Made backgrounds more translucent with white overlays
  * Added consistent border styling with white/50 opacity
  * Enhanced hover states with smoother transitions
  * Added shadow to the status indicator dot
  * Made the settings modal more translucent
  * Improved button styling consistency

Backend Changes:
- Updated static files path to use relative path ("../public")
- Removed HTTPS/SSL:
  * Changed API endpoint in frontend from HTTPS to HTTP
  * Removed redirect.py as it's no longer needed for HTTPS redirection
  * Simplified deployment by removing SSL-related configurations

Deployment Improvements:
- Fixed deployment script issues:
  * Preserved proper backend directory structure
  * Added proper directory handling for tar files
  * Fixed tar file naming consistency
  * Removed chmod for non-existent redirect.py
  * Added cd command to ensure correct working directory
  * Updated file paths to use absolute paths where needed

Testing:
- Verified mobile UI improvements
- Confirmed HTTP endpoints are working
- Tested gate control functionality
- Validated settings modal operation
2025-01-07 15:33:31 +10:00
backend UI/UX Improvements and Infrastructure Updates 2025-01-07 15:33:31 +10:00
frontend UI/UX Improvements and Infrastructure Updates 2025-01-07 15:33:31 +10:00
.gitignore UI/UX Improvements and Infrastructure Updates 2025-01-07 15:33:31 +10:00
README.md UI/UX Improvements and Infrastructure Updates 2025-01-07 15:33:31 +10:00
deploy.sh UI/UX Improvements and Infrastructure Updates 2025-01-07 15:33:31 +10:00

README.md

DLB Gate Keeper

A Raspberry Pi-based gate control system with a web interface.

Architecture

  • Backend: Python FastAPI server with direct GPIO control
  • Frontend: React/TypeScript web interface
  • Database: SQLite for event logging and settings
  • Service: Systemd service for automatic startup and monitoring

Development Setup

Backend (Python)

  1. Install Python dependencies:
cd backend
pip install -r requirements.txt
  1. Run the development server:
uvicorn main:app --reload --host 0.0.0.0 --port 3000

Frontend (React)

  1. Install Node.js dependencies:
cd frontend
npm install
  1. Start the development server:
npm run dev

Deployment

  1. Deploy to Raspberry Pi:
./deploy.sh

This will:

  • Build the frontend
  • Package the Python backend
  • Copy files to the Raspberry Pi
  • Install Python dependencies
  • Set up and start the systemd service

GPIO Setup

The application uses GPIO pin 17 (BCM numbering) by default. You can change this by setting the RELAY_PIN environment variable in the systemd service file.

Make sure the gatekeeper user has access to GPIO:

sudo usermod -a -G gpio gatekeeper

API Endpoints

  • POST /api/trigger/{direction} - Trigger gate (direction: "open" or "close")
  • GET /api/events - Get recent gate events
  • GET /api/settings - Get current settings
  • POST /api/settings - Update settings

License

MIT