3acd89a2c68389a93f520a02fb9b6ae436a24dbc
First pytest suite in the backend (backend/tests/, run from backend/ with `python -m pytest tests`). firebase_admin.verify_id_token and Firestore are mocked, so no network access is needed. 82 cases: - /user devices: HMAC ok / wrong / other serial's HMAC, kiosk HMAC, legacy password with flag on/off, legacy rejected for non-device-shaped usernames and for app_ users, HMAC rejected for app_ users, legacy-login log rate limiting. - /user app users: valid token (asserts check_revoked=True), token for a different uid, revoked, expired, blocked user, unknown uid, empty uid, and that a denied token never appears in logs. - /acl app users: acc 1/2/4 allow/deny per topic, unsupported acc values, wildcards, foreign serial, malformed topics, wrong clientid prefixes (incl. uid-prefix collision), blocked/unknown users, cache hit + invalidate, cache expiry. - /acl devices/kiosk/superuser: unchanged behaviour. 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%