Skip to content

feat: Go bootstrap CLI for Auth0 + OpenMeter/Konnect#33

Draft
eliteprox wants to merge 3 commits into
mainfrom
feat/go-bootstrap-cli
Draft

feat: Go bootstrap CLI for Auth0 + OpenMeter/Konnect#33
eliteprox wants to merge 3 commits into
mainfrom
feat/go-bootstrap-cli

Conversation

@eliteprox

Copy link
Copy Markdown
Collaborator

Summary

  • Add a single, cross-platform Go CLI (clearinghouse-bootstrap) that provisions Auth0 (resource server, public + M2M clients, grants) and OpenMeter/Konnect catalog (meters, features, default PPU plan), then emits .env.livepeer and sdk-config.json for builder-sdk.
  • Uses go-auth0/v2 for Auth0 Management API and Kong/sdk-konnect-go for Konnect Metering & Billing — no generated local OpenAPI client.
  • Mirrors the TS admin pattern (port/adapter/factory) in Go, with the same config/meters.json and config/pricing.json definitions.

What's included

Package Purpose
cmd/clearinghouse-bootstrap CLI entry, flag/env parsing
internal/admin OpenMeterAdmin port, KonnectAdmin adapter, BootstrapCatalog service
internal/auth0 Auth0 provisioning via Management API
internal/config Env + flag parsing into BootstrapConfig
internal/meters / internal/pricing JSON config loaders
internal/output .env.livepeer and sdk-config.json writers

Out of scope (documented in README)

  • Per-customer provisioning (customers/subscriptions)
  • Self-hosted OpenMeter adapter
  • Benthos collector / Docker stack / Railway deploy

Test plan

  • go vet ./...
  • go test ./... -count=1 — 12 tests across 5 packages
  • make cross — builds for linux/darwin/windows on amd64/arm64
  • Golden-file tests for .env.livepeer and sdk-config.json output
  • Mock-based idempotency tests for BootstrapCatalog
  • Manual: run against real Auth0 + Konnect with secrets

Single cross-platform Go binary that provisions Auth0 (resource server,
public + M2M clients, grants via go-auth0/v2) and OpenMeter/Konnect
catalog (meters, features, default PPU plan via Kong sdk-konnect-go),
then emits .env.livepeer and sdk-config.json for builder-sdk.

Mirrors the TS admin pattern (port/adapter/factory) and uses the same
config/meters.json and config/pricing.json definitions.
@eliteprox eliteprox force-pushed the feat/go-bootstrap-cli branch from 6764e7b to b51431f Compare June 17, 2026 22:06
Removed deprecated environment variables from .env.example and updated README for clarity on CLI behavior. Simplified BootstrapConfig structure by eliminating unused fields related to signer and Kafka. Adjusted error messages for missing environment variables to enhance user experience. Updated tests to reflect changes in configuration handling.
…r Clearinghouse

Changed the application name and API audience in the .env.example and related configuration files to reflect the new branding as "Livepeer Clearinghouse". Updated README and tests to ensure consistency with the new naming conventions. Minor formatting adjustments made for code clarity.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant