feat: add React/Vite PWA web UI with FastAPI backend

- FastAPI + uvicorn server (turnup-ui) serving config API and static files
- React + TypeScript frontend: connection, global LEDs, per-knob/button
  cards, preset save/load/apply, toast notifications, dark theme
- Vite builds into src/turnup/ui/static/ so no Node.js needed at install time
- PWA assets (manifest, service worker, icon) in ui/public/
- turnup-ui.service systemd user unit; enabled globally via turnupd.install
- PKGBUILD: add python-fastapi + python-uvicorn deps, install UI service file
- pyproject.toml: ui extras group, turnup-ui entry point
This commit is contained in:
Sean Doran committed 2026-02-27 21:25:16 -05:00
1 parent 1c73dc1883
commit 8f8d9ac3fa
41 files changed
+5038 -11

No files matched your search

+15 -8
View File
@@ -1,25 +1,32 @@
post_install() {
systemctl --global enable turnupd.service
echo "turnupd: service enabled for all users — it will start on next login."
echo "To start it now: systemctl --user start turnupd.service"
systemctl --global enable turnup-ui.service
echo "turnupd + turnup-ui: services enabled for all users — they will start on next login."
echo "To start them now:"
echo " systemctl --user start turnupd.service"
echo " systemctl --user start turnup-ui.service"
echo "UI will be available at http://127.0.0.1:5173"
}
post_upgrade() {
systemctl --global reenable turnupd.service
systemctl --global reenable turnup-ui.service
# Restart for all currently logged-in users
while read -r uid _; do
systemctl -M "${uid}@.host" --user restart turnupd.service 2>/dev/null || true
systemctl -M "${uid}@.host" --user restart turnupd.service 2>/dev/null || true
systemctl -M "${uid}@.host" --user restart turnup-ui.service 2>/dev/null || true
done < <(loginctl list-users --no-legend 2>/dev/null)
}
pre_remove() {
# Stop and disable for all currently logged-in users
while read -r uid _; do
systemctl -M "${uid}@.host" --user stop turnupd.service 2>/dev/null || true
systemctl -M "${uid}@.host" --user disable turnupd.service 2>/dev/null || true
systemctl -M "${uid}@.host" --user stop turnupd.service 2>/dev/null || true
systemctl -M "${uid}@.host" --user disable turnupd.service 2>/dev/null || true
systemctl -M "${uid}@.host" --user stop turnup-ui.service 2>/dev/null || true
systemctl -M "${uid}@.host" --user disable turnup-ui.service 2>/dev/null || true
done < <(loginctl list-users --no-legend 2>/dev/null)
# Remove the global enable symlink
# (/etc/systemd/user/default.target.wants/turnupd.service)
systemctl --global disable turnupd.service 2>/dev/null || true
systemctl --global disable turnupd.service 2>/dev/null || true
systemctl --global disable turnup-ui.service 2>/dev/null || true
}