f5db83f26c0ba76f2b9ca6a312859ab56df5ebbf
DeviceUpdate accepts user_list, so a device PUT could add or remove users without touching their device_serials - leaving the MQTT app ACL stale (a removed user would keep access; an added user would be denied). update_device now diffs the old vs new user_list and, in the same atomic batch as the device write, ArrayUnion/ArrayRemoves the device's serial on each added/removed user, then invalidates their MQTT ACL cache entries. Dangling user references are skipped (updating a missing doc would fail the whole batch). PUTs without user_list take the old single-update path. Covered by tests/test_device_serials_sync.py (fake Firestore). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
BellSystems Admin Panel
Self-hosted web admin panel for managing BellSystems devices, melodies, users, and MQTT communications.
Tech Stack
- Backend: Python / FastAPI
- Frontend: React + Tailwind CSS (Vite)
- Database: Google Firestore (Firebase Admin SDK)
- MQTT: Mosquitto (paho-mqtt)
- Auth: JWT with role-based access control
- Deployment: Docker Compose + Nginx
Getting Started
# Clone the repo
git clone <your-gitea-url>/bellsystems-admin.git
cd bellsystems-admin
# Copy env template and fill in your values
cp .env.example .env
# Place your Firebase service account key in the project root
# (file is gitignored — never commit it)
# Start everything
docker compose up --build
Project Structure
bellsystems-admin/
├── backend/ # FastAPI API server
├── frontend/ # React SPA
├── nginx/ # Reverse proxy config
├── docker-compose.yml
└── .env
Documentation
See BellSystems_AdminPanel_Strategy.md for the full architecture and build plan.
Description
BellSystems Contol Panel.
Handles everything from Devices to Clients.
Firebase / Mosquitto / Device Control / logging...
33 MiB
Languages
JavaScript
72.3%
Python
12.8%
HTML
12.4%
CSS
2.5%