e_Lab is a modern, distributed application designed to seamlessly connect hardware data sources (such as sensors and simulators) with web-based user interfaces. By utilizing a decoupled architecture consisting of a Python backend and a React frontend, e_Lab provides a highly flexible and dynamic environment for hardware monitoring and control.
Follow the end-to-end data path from provider registration to live UI rendering and recording.
At the core of e_Lab is the Dispatcher Pattern. The Python backend acts as a central hub that accepts registrations from hardware providers and forwards their real-time data streams to connected UI clients via Socket.IO. Neither the hardware providers nor the frontend clients need to know about each other, ensuring a highly scalable and loosely coupled system.
π Learn more β
Adding new hardware to the e_Lab system is effortless. Hardware clients automatically find the Dispatcher server on the network via UDP discovery. This "Zero-Config" process eliminates the need for manual IP configuration and allows for instant plug-and-play functionality.
π Learn more β
e_Lab does not require the frontend to have prior knowledge of the connected hardware. Each provider describes its capabilitiesβsuch as tasks, data types, and rendering instructionsβthrough a JSON Manifest. This allows the React application to dynamically build appropriate and fully functional visualizations for unknown hardware on the fly.
π Learn more β | API Reference β
For highly specialized hardware, standard widgets might not be enough. A standout feature of e_Lab is Remote UI Injection: hardware providers can supply their own custom UI components (JavaScript/React files) bundled directly with the device. The React frontend dynamically loads and renders these components at runtime without requiring a rebuild of the frontend.
π Plugin Development Guide β | UI Reference β
The Dispatcher can record all system communicationβincluding registrations, data streams, and control commandsβinto an SQLite session database. These recorded sessions can be loaded and played back at any time. During playback, the system behaves exactly as if the original hardware providers were connected live, making it an invaluable tool for post-analysis and demonstrations.
π Learn more β
To accommodate high-rate sensors (e.g., 100 kSps), e_Lab avoids heavy JSON payloads by supporting raw binary data streams. The server utilizes a configurable decoder pipeline to efficiently parse binary chunks, saving significant network bandwidth.
π Learn more β
Despite its dynamic nature, e_Lab implements strict security measures to protect the workbench from rogue code:
- Subresource Integrity (SRI): SRI hashes are transmitted within the manifest to ensure that injected remote plugins have not been tampered with (preventing MITM attacks on the LAN).
- Origin Allow-Lists: The server filters plugin URLs and blocks streams from unverified hosts, gracefully falling back to standard generic widgets if an origin is not explicitly permitted.
π Security Documentation β
- Backend: Python application using Flask and Flask-SocketIO (with
gevent) for real-time WebSocket communication. It orchestrates system state, session recording, and UDP discovery. - Frontend: A modern, Vite-built React application utilizing Tailwind CSS. It relies on a
DispatcherClientsingleton to abstract network complexity away from the UI components. - Hardware Clients: Connect via LAN (without TLS due to embedded hardware constraints) directly to the dispatcher.
Client sources are split into core (public) and premium (private):
elab_clients_core/python/clients/β runnable Python client implementations loaded by the Libraryelab_clients_core/python/api/β core bridge/API examples such as the FIR filter nodeelab_clients_core/python/shared/β shared Python helpers for discovery, overrides, and plugin securityelab_clients_core/python/assets/β frontend plugin assets shipped by Python clientselab_clients_core/esp32/arduino/β Arduino sketches for ESP32 targets
π Full Architecture Overview β | Class Diagrams β
Detailed setup instructions for all platforms:
# Backend
python server.py -d # Debug mode
# Frontend (separate terminal)
cd elab_workbench
npm install
npm run dev# Full build with PyInstaller + Vite
npm run build # Frontend
./elab_electron/build.ps1 # Electron app (Windows)π Deployment Guide β
e_Lab uses Socket.IO for real-time bidirectional communication between hardware providers, the dispatcher, and the web frontend.
Key Events:
provider:registerβ Hardware registers capabilitiesdata:streamβ Real-time data flowui:commandβ Frontend β Hardware control commandssession:recordβ Recording/replay events
π API Reference β | WebSocket Protocol β
e_Lab includes comprehensive test suites for both backend and frontend:
# Backend tests
pytest -q
pytest --cov=elab_server tests/
# Frontend tests
npm test
npm test -- --coverage
# Full test suite
.\tests\test-all.ps1π Testing Strategy β
e_Lab is licensed under the MIT License and uses carefully selected dependencies with permissive licenses (MIT, BSD-3-Clause, Apache-2.0).
All dependencies are visible in-app under Help β Lizenzen (Frontend/Backend) with direct links to their respective repositories.
π Full License Information β | Dependency Licenses β
Contributions are welcome! Whether you're adding features, fixing bugs, or improving documentation, please refer to:
- Project Structure: See workspace overview at the top of this repository
- Code Style: Follow PEP 8 (Python) and ESLint/Prettier (JavaScript)
- Type Safety: Python type hints are required; JavaScript uses JSDoc
| Document | Purpose |
|---|---|
| Overview | High-level architecture & concepts |
| Installation | Setup for development & production |
| API Reference | Socket.IO events & protocols |
| Schema Reference | Manifest format & validation |
| Plugin Development | Creating custom hardware UI |
| Class Diagrams | System architecture diagrams |
| Deployment | Production setup (systemd, nginx, TLS) |
| Testing | Test strategy & running tests |
| UI Reference | Frontend component library |
Q: Can I run e_Lab without ESP32 hardware?
A: Yes. e_Lab includes built-in simulator clients in elab_clients_core/python/clients/ for testing and demonstration.
Q: Is e_Lab suitable for high-frequency sensors?
A: Yes. e_Lab supports raw binary data streams and configurable decoders, allowing for 100+ kHz sampling rates without JSON overhead.
Q: Can I add custom hardware providers?
A: Absolutely. See Plugin Development Guide for instructions on creating hardware clients and custom UI components.
Q: Is TLS encryption supported?
A: LAN communication is unencrypted by design (low-power IoT constraints). For production deployments with untrusted networks, place e_Lab behind a reverse proxy (nginx) with TLS. See Deployment Guide.
e_Lab is released under the MIT License.
Get started: Installation Guide | Questions? Check the FAQ or open an issue.

