Remove the serial bridge's unused Django client

The bridge reads the COM port and streams SSE to the frontend; it never
talks to Django. backend_client.py (a Django API client) and config.py
(which held BACKEND_URL / API_ENDPOINT) were imported by nothing - app.py
calls load_dotenv() and reads os.getenv directly, and the PyInstaller spec
builds from app.py alone.

Their presence implied a coupling that does not exist, and the stale
BACKEND_URL=8000 in .env read as a misconfiguration rather than an inert
value.

Also drops the matching backend settings from .env.example, the now
unnecessary 'requests' hidden import from the spec, and the two files from
the SETUP.md tree. requests and urllib3 remain in requirements.txt - no
bridge module uses them now, but pruning dependencies is a build concern
left for a separate change.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-09-18 19:49:14 +03:00
parent c98c0eef4a
commit edfe2f1bfe
5 changed files with 1 additions and 156 deletions
-2
View File
@@ -20,9 +20,7 @@ ScalesApp/
├── serial_bridge/ # Python serial reader (system tray)
│ ├── app.py
│ ├── serial_reader.py
│ ├── backend_client.py
│ ├── tray_icon.py
│ ├── config.py
│ ├── requirements.txt
│ ├── serial_bridge.spec
│ └── .env.example