Run commands from the repository root.
Carto shares a React 19 renderer between Electron and the web server. Its component foundation is
the official shadcn/ui Rhea preset with Base UI primitives and Tailwind CSS 4. The registry
configuration lives in components.json; reusable controls live in apps/web/src/components/ui.
Add controls with npx shadcn add <component> and compose them into domain components instead of
reimplementing focus management, dialogs, select menus, or notifications.
- TanStack Router owns navigation with hash history, compatible with packaged Electron windows. The root investigation stays mounted when switching views.
- TanStack Query owns discovery and metadata refreshes, mutation invalidation, and cache cleanup. Queries run offline as well, since Electron IPC and local routers do not require Internet access.
- TanStack Virtual renders the bounded live stream. High-volume message ingestion stays in the existing event-driven buffers rather than being polled or copied into a query cache.
- TanStack Form validates discovery scope and controls submission.
- TanStack Table powers the reusable
DataTableand sortable runtime diagnostics in Connection.
The shared theme is apps/web/src/styles/globals.css. Light and dark color tokens cover the Rhea
components and existing inspector layouts. Domain-specific layout styles remain in a lower CSS
layer so Tailwind utilities can override them predictably. Icons come from Lucide.
Both Electron and web mode allow runtime code generation (unsafe-eval in the script CSP),
which protobufjs requires for user-loaded schemas. Inline scripts remain blocked in web mode.
Use Node.js 24 or newer.
npm ci
npm run dev:desktopDesktop launch commands install the matching Electron runtime if needed. If a launch reports
Electron uninstall, run npm run setup:desktop and try again.
For a browser build, see Running Carto on the web.
npm run typecheck
npm run lint
npm test
npm run build:desktop
npm run build:web
npm run build:serverCarto includes a local Zenoh load publisher for reproducing large-payload issues.
Default run:
npm run load:test -- --endpoint ws://127.0.0.1:10000/That sends 100 messages to carto/load-test in bursts of 5, with payload sizes randomized between 600 KiB and 900 KiB.
Example heavier run:
npm run load:test -- --endpoint ws://127.0.0.1:10000/ --count 200 --burst 10 --pause-ms 50 --min-kib 600 --max-kib 900Useful flags:
--keyexprto isolate the test stream--format json|textto switch payload shape--countto control total messages--burstand--pause-msto shape the send rate
Carto includes a repeatable Zenoh demo covering steady JSON telemetry, structured events, plain text, opaque binary payloads, two Protobuf message types, concurrent bursts, large JSON snapshots, and put/delete lifecycle traffic.
- In Carto, open Settings → General → Import settings and select
examples/carto-zenoh-scenarios.json. Leave Merge with existing settings enabled to preserve your current configuration. - Connect with the imported Local scenario router profile.
- Subscribe to
carto/demo/**for the complete stream, or select one of the imported focused key expressions. Usecarto/demo/protobuf/**to exercise the preconfigured multi-type Protobuf decoder. - Run the complete pack continuously, stopping it with
Ctrl+C:
npm run scenario:runThe same JSON file is both the Carto settings import and the scenario runner's manifest, so its topics, schemas, and sample publisher drafts stay aligned with what the script sends.
Useful variants:
# See every scenario and topic without connecting.
npm run scenario:list
# Run only selected scenarios.
npm run scenario:run -- --scenario telemetry-json,protobuf-telemetry
# Run one cycle and exit.
npm run scenario:once
# Repeat a burst three times with no intentional delay, then exit.
npm run scenario:run -- --scenario burst --cycles 3 --pace 0
# Use another endpoint or a compatible scenario/settings pack.
npm run scenario:run -- --endpoint ws://192.168.1.20:10000/ --pack ./my-pack.jsonPackage for your current operating system:
npm run distBuild per platform:
npm run dist:mac
npm run dist:win
npm run dist:linuxRelease builds use Electron and electron-builder. The GitHub Actions workflow builds on Windows, macOS, and Linux. Run platform-specific packaging on the corresponding operating system.
See the backend performance and memory audit for findings, remaining limits, and an isolated generated-traffic benchmark. The benchmark uses an in-memory driver and does not contact Zenoh:
node --expose-gc --import tsx scripts/backend_benchmark.ts