WebRTC broker for CADbuildr - mediates communication between foundation library and viewer
Project description
CADbuildr Broker
WebRTC broker for CADbuildr that mediates communication between Foundation and a viewer page.
Status
green
Runtime contract
The broker is local-first. Keep heavy CAD data local.
- Data path (heavy): Foundation -> local broker
/send-> WebRTC DataChannel -> viewer. - Signaling path (lightweight): viewer/broker offer-answer exchange via signaling API.
- Signaling can be local or remote/authenticated.
- The broker does not need to relay CAD DAG payloads through cloud endpoints.
Installation
From PyPI
pip install cadbuildr-broker
From monorepo (development)
cd py/packages/broker
poetry install
Usage
Start with hosted Hub signaling (default):
cadbuildr-broker
Equivalent monorepo command:
cd py/packages/broker
poetry run cadbuildr-broker
Use local signaling (Hub on localhost) by overriding defaults:
cadbuildr-broker \
--host localhost \
--port 3000 \
--signaling-scheme http
Or set an explicit signaling API base URL:
cadbuildr-broker \
--signaling-base-url https://hub.cadbuildr.com/api/webrtc
Use remote signaling with auth:
CADBUILDR_SIGNALING_BEARER_TOKEN="<token>" \
cadbuildr-broker \
--signaling-base-url https://hub.cadbuildr.com/api/webrtc
CLI options
--host: signaling host (default:hub.cadbuildr.com)--port: signaling port (default:443)--signaling-scheme:httporhttps(default:https)--signaling-base-url: full signaling API base URL, for examplehttps://hub.cadbuildr.com/api/webrtc--auth-bearer-token: optional bearer token for signaling requests (or use envCADBUILDR_SIGNALING_BEARER_TOKEN)--broker-port: local HTTP port used by Foundation and screenshot upload (default:5050)
What runs where
- Broker polls signaling API for offers.
- Viewer creates WebRTC offer and receives answer.
- Foundation posts DAG to broker
/sendon localhost. - Broker forwards DAG to viewer via DataChannel.
- Viewer posts screenshots/log payloads back to broker.
Publishing
Recommended release flow:
cd py/packages/broker
poetry build
poetry config repositories.testpypi https://test.pypi.org/legacy/
poetry publish --repository testpypi
pip install -i https://test.pypi.org/simple cadbuildr-broker
poetry publish
If your environment uses token-based publishing, configure Poetry credentials before publishing.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cadbuildr_broker-0.2.1.tar.gz.
File metadata
- Download URL: cadbuildr_broker-0.2.1.tar.gz
- Upload date:
- Size: 11.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.3 CPython/3.13.3 Darwin/24.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
176b81547d279958d2e072647e8ea0f6c1e14560e325d8ef0365fd506f469463
|
|
| MD5 |
1ca0917dc5c5dd158be9368dc9fdde47
|
|
| BLAKE2b-256 |
7fc1b23fc9406584842b19e74fdd97c66f488c636e489bfe71476b6b1f5dd6cc
|
File details
Details for the file cadbuildr_broker-0.2.1-py3-none-any.whl.
File metadata
- Download URL: cadbuildr_broker-0.2.1-py3-none-any.whl
- Upload date:
- Size: 13.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.3 CPython/3.13.3 Darwin/24.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
51b9d37208cf703bd04c6db0a916a3a5f53025e56a040104fadea2753c9828d3
|
|
| MD5 |
6204f562da5ffb347a93b295d5728198
|
|
| BLAKE2b-256 |
43d96fb9ff068fc2fbec437e6ce5dc05e73c0055b5d2f4c0f1323e91feb2d1b7
|