Event-sourced, non-blocking aggregation bridge and real-time Server-Sent Events (SSE) control plane for @shadow-software-platform/numberone streams.
Number One Bridge aggregates Number One (.numberone/) workspace streams across repositories and teams into one real-time, cryptographically verifiable control plane:
- Multi-Dimensional Stream Aggregation: Pivot and aggregate every stream dynamically by Tenant, Group, or Owner.
- Hierarchical RBAC Authority Model:
- Tenant — Overarching container (
owner > member) that holds multiple Groups. - Group — Roles in strict order of authority:
Group Owner(group_owner) >Collaborator(collaborator) >Reader(reader). - Repository / Stream — Roles in strict order of authority:
Owner(owner) >Reader(reader).
- Tenant — Overarching container (
- 100% Event-Sourced: Every tenant, group, repo, RBAC grant/revoke, API token issuance, and ingested Number One stream event is persisted as an immutable, SHA-256 hash-chained
BridgeEventin a segmented NDJSON journal. Projections are deterministically rebuildable from seq 1. - 100% Non-Blocking: Zero synchronous filesystem I/O anywhere in
src/. Uses async promise-serialized writes (AsyncWriteQueue), O(1)-memory async streaming replay, and backpressure-safe SSE fan-out (SseHub) that coalesces slow clients to snapshotresyncframes without blocking healthy consumers. - Real-Time SSE Telemetry UI (
bridge-main-viewer): Ships with a zero-build, air-gap-safe Karen-inspired optical HUD and smooth collapsible Tenant Dashboard (bridge-main-viewer) served automatically on port8080(default view), runnable natively as a Linux CLI Terminal HUD (bridge-main-viewer --cli) or Windows desktop/web/CLI launcher, and swappable via--api-only/--viewer-dir. - Full-Spectrum Deployment & Multi-Cloud IaC: Ready-to-install service packages and IaC modules for Windows Service (WinSW/NSSM/IIS), Linux (systemd/OpenRC/SysVinit/NGINX/Caddy/HAProxy/Apache/nFPM), AWS ECS (Fargate/EC2/CodeDeploy), Cloud Foundry (
VCAP& rolling push), Docker/Podman, Kubernetes/Helm, Nomad, plus Terraform, OpenTofu, Pulumi, AWS CloudFormation, AWS CDK, Azure Bicep, Ansible, Crossplane, and Packer across AWS, Azure, GCP, DigitalOcean, and OCI.
Requires Node.js >= 22.
npm install
npm run build
# Launch in interactive Demo Mode (serves bridge-main-viewer on port 8080)
node dist/cli.js serve --demoOpen http://127.0.0.1:8080/ for the default bridge-main-viewer control plane, or launch it from your terminal:
# Linux / Windows Terminal real-time ANSI CLI HUD (100% SSE, upwards green size / downwards red latency bars)
bridge-main-viewer --cli --url http://127.0.0.1:8080
# Local web/app-window viewer proxy targeting a remote corporate Bridge service
bridge-main-viewer --web --app-window --url https://bridge.corp.example.com:8080 --token n1b_...BRIDGE_ADMIN_TOKEN="replace-with-strong-secret" \
BRIDGE_TRUST_PROXY="true" \
node dist/cli.js serve --service --host 0.0.0.0 --port 8080 --data-dir /var/lib/numberone-bridgeGenerate native service descriptors directly from the CLI:
n1-bridge service print-systemd # Hardened Linux systemd unit
n1-bridge service print-winsw # Windows Service WinSW XML
n1-bridge service print-cf # Cloud Foundry manifest.yml
n1-bridge service status --url http://127.0.0.1:8080Stream events non-blockingly from any folder initialized with n1 attach .:
node dist/cli.js connect \
--workspace /path/to/my-project \
--bridge-url http://127.0.0.1:8080 \
--repo-id rep_01... \
--token n1b_...node dist/cli.js verify --data-dir ./.bridge-data
node dist/cli.js replay --data-dir ./.bridge-data- Enterprise Deployment & IaC Guide (
docs/DEPLOYMENT.md) — Windows Service, Linux systemd/OpenRC/SysVinit, AWS ECS, Cloud Foundry, Kubernetes/Helm, Terraform/OpenTofu, Pulumi, CloudFormation, CDK, Bicep, Ansible, Crossplane, Packer, andbridge-main-viewerrunbooks. - Architecture & RBAC Guide (
docs/ARCHITECTURE.md) — Event-sourcing journal layout, non-blocking pipeline, authority precedence matrix, and SSE backpressure handling. - REST & SSE API Contract (
docs/API_AND_SSE_CONTRACT.md) — Complete endpoint, health/readiness/metrics probe, and SSE event schema specification.
npm run typecheck
npm run build
npm testLicensed under the GNU Affero General Public License v3.0 or later (AGPL-3.0-or-later) (see LICENSE and NOTICE), matching @shadow-software-platform/numberone.