dannykansas/powertools

★ 0Forks 0JavaScriptGitHub ↗Compare

README

BunyFM Control

Minimal web UI + API service for triggering local bash scripts over your LAN.

Architecture

  • Backend (Node/Express): runs on the server that has the scripts.
  • Frontend (static): runs anywhere; points at the backend with API_BASE_URL.

Backend

Environment variables (12‑factor config)

  • PORT (default 8080)
  • SCRIPT_DIR (default /opt/bunyfm)
  • BUNY_SAY_SCRIPT (default buny-say.sh)
  • CORS_ORIGIN (default *, or comma‑separated origins)
  • MAX_TEXT_LENGTH (default 0 = no limit)

Docker build/run

docker build -t bunyfm-backend ./backend

docker run -d \
  --name bunyfm-backend \
  -p 8080:8080 \
  -e SCRIPT_DIR=/opt/bunyfm \
  -e BUNY_SAY_SCRIPT=buny-say.sh \
  -e CORS_ORIGIN=http://localhost:3000 \
  -v ~/djio/bunyfm:/opt/bunyfm:ro \
  bunyfm-backend

If your script is actually named buny-sah.sh, set BUNY_SAY_SCRIPT=buny-sah.sh.

Frontend

Configuration

  • API_BASE_URL (default http://stardust.dannykansas.com:9099)

The UI also lets you override and save the server URL in localStorage.

Docker build/run

docker build -t bunyfm-frontend ./frontend

docker run -d \
  --name bunyfm-frontend \
  -p 3000:80 \
  -e API_BASE_URL=http://stardust.dannykansas.com:9099 \
  bunyfm-frontend

Local dev (no Docker)

# Backend
cd backend
npm install
npm run dev

# Frontend
cd frontend
# open index.html in your browser and edit config.js as needed

Contributors

dannykansas

Issues