Prerequisites
Infrastructure requirements
Each Bridge Hub component has specific compute requirements:
You also need a MongoDB instance (version 4.4 or later). A 3-node replica set is recommended for production, with at least 100 GB of storage that can grow with transaction volume.
Software requirements
- Bun >= 1.0.0
- MongoDB >= 4.4
- Docker (optional; for containerized deployment)
- Kubernetes (optional; for orchestrated deployment)
External services
- Bridge Service API access for each network you plan to index.
- Blockchain RPC endpoints from a reliable provider.
- Sentry account (optional) for error tracking.
Build
From the repository root, install dependencies and create production builds:packages/api/dist/, packages/consumer/dist/, and packages/auto-claim/dist/.
Docker deployment
The repository includes production-ready Dockerfiles for each service:Dockerfile.api:API service (exposes port 3001)Dockerfile.consumer:Consumer serviceDockerfile.autoclaim:Auto-Claim service
oven/bun:1.2-alpine with multi-stage builds and runs as a non-root user (bunuser).
Build images
Docker Compose
Create adocker-compose.yml in the repository root:
Adding consumer instances for additional networks
To index more than one network, duplicate theconsumer-net1 block with a unique service name and network-specific environment variables. For example:
Common Docker Compose commands
Kubernetes deployment
Namespace and ConfigMap
API Deployment
Apply and manage resources
Configuration reference
API package
Consumer package
Auto-Claim package
Adding a new network
1
Deploy a consumer instance
Start a new consumer with the network’s configuration:In Docker Compose, add a new
consumer-net<id> service block. In Kubernetes, create a new Consumer Deployment manifest.2
Update API configuration
Add the new network’s RPC endpoint to
RPC_CONFIG and its proof endpoint to PROOF_CONFIG, then restart the API instances so they pick up the change.3
Update Auto-Claim configuration
Append the new network ID to the
SOURCE_NETWORKS JSON array, then restart Auto-Claim instances.4
Verify data flow
Confirm the pipeline is working end to end:
- Consumer indexing: Query the MongoDB metadata collection for the new network’s checkpoint.
- API serving data: Call
GET /transactions?sourceNetworkIds=42161and confirm results appear. - Auto-Claim detection: Monitor Auto-Claim logs to verify it picks up new transactions.