Commit Graph
58 Commits
Author SHA1 Message Date
zeekay 84ffdc5cfd fix: use uv pip install in CI to avoid resolving hanzo-kms extra
uv sync resolves ALL extras including hanzo (which depends on
hanzo-kms, not published to PyPI) even with --no-extra flag.
Switch to uv pip install -e ".[dev]" which only resolves the
specified extras.
2026-02-13 17:02:37 -08:00
zeekay 9af7064e1e fix: exclude hanzo extra from CI dependency resolution
uv resolves all extras by default. Explicitly exclude the hanzo
extra (hanzo-kms, hanzo-iam) which aren't published to PyPI.
2026-02-13 16:57:58 -08:00
zeekay 63b0aaf38e fix: CI uses --extra dev to avoid hanzo-kms dep + add hanzo-ns k8s manifests
CI was failing because `uv sync` installs all extras including hanzo-kms
which isn't on PyPI. Switch to `uv sync --extra dev` for test jobs.

Add bootnode API deployment manifest for the hanzo namespace (separate
from the bootnode namespace deployment).
2026-02-13 16:44:05 -08:00
zeekay f3a1f78d83 feat: add cloud compute billing tiers and authorization API
Cloud compute quotas per tier (Free: 1 Linux/20hr, PAYG: 5L+2W+1M,
Growth: 20L+5W+3M, Enterprise: custom). Adds billing endpoints for
control-plane authorization, quota checks, and usage reporting.
2026-02-13 15:33:54 -08:00
zeekay e8f031eb75 docs: update LLM.md with gateway routes and billing migration status 2026-02-12 20:33:15 -08:00
zeekay 91b1be8ca3 fix: add Commerce billing to K8s deploy + create init.sql
- Add Commerce secretKeyRef (api-key, webhook-secret) to K8s api-deployment
- Create infra/sql/init.sql (uuid-ossp, pgcrypto extensions for PostgreSQL)
- Remove deprecated version: from docker-compose.prod.yml
2026-02-12 20:30:37 -08:00
zeekay 633699fc12 chore: gitignore test artifacts, reports, and screenshots 2026-02-12 20:26:45 -08:00
zeekay cd1f006c47 fix: enforce Hanzo KMS for all secrets, remove plaintext credentials
- Remove hardcoded Secret from bootnode-deployment.yaml (conflicted with ExternalSecret)
- Fix Postgres/Redis pods to read passwords from KMS-managed bootnode-secrets
- Expand ExternalSecret from 7 to 30 secrets with UPPERCASE_UNDERSCORE keys matching Pydantic
- Enable hanzo-kms SDK as optional dependency for direct KMS access outside K8s
- Improve inject_secrets() startup logging to indicate active secrets path
- Rewrite secrets.yaml as documentation-only with flow diagram and setup guide
- Fix compose.yml Bitcoin healthcheck to use env vars instead of hardcoded password
2026-02-12 13:05:04 -08:00
zeekay 003c10899e feat: add billing management page with tier comparison + checkout
- Create /dashboard/organization/billing page with plan comparison
- Wire up disabled "Manage Subscription" button to new billing page
- Fix analytics nav billing link to point to organization/billing
- Shows current plan, usage stats, and upgrade via Commerce checkout
- All 4 tiers displayed: Free, PAYG, Growth, Enterprise
2026-02-12 11:43:33 -08:00
zeekay c7a20c1732 fix: replace all hardcoded localhost URLs with env var in dashboard
All dashboard pages now use NEXT_PUBLIC_API_URL with localhost fallback
for local dev. Fixes tokens, volumes, storage, clusters, monitoring,
infrastructure, and usage pages for production deployment.
2026-02-12 11:24:10 -08:00
zeekay 30ae134cf3 fix: production billing hardening + Stripe→Commerce migration
- Replace eval() with json.loads() in usage tracker (security fix)
- Webhook verification fails-closed in production when secret missing
- Add Commerce env vars to K8s deployment (URL, API key, webhook secret)
- Expose ZAP port 9999 in Dockerfile and K8s service
- Replace Stripe env vars with Square in compose.yml
- Update privacy/terms pages: Stripe→Square via Hanzo Commerce
- Add full billing API client module to web/lib/api.ts (17 endpoints)
- Fix hardcoded localhost URLs in dashboard/analytics/organization pages
- Add production webhook rejection test (57 tests passing)
2026-02-12 11:22:03 -08:00
zeekay 96dc756c98 fix: unified billing error handling + add billing tests
unified.py: _create_customer now raises CommerceError instead of
returning fake local_ customer IDs that mask failures.
create_subscription raises CommerceError instead of bare Exception.
report_usage raises CommerceError so callers know when usage wasn't
reported.

Added 12 new tests: config AliasChoices regression (P0), commerce
client error paths, unified client error propagation, and webhook
handler edge cases. All 56 billing tests pass.
2026-02-12 10:47:45 -08:00
zeekay f219464d32 fix: resolve config mismatch + auth security hardening
P0: config.py defined hanzo_commerce_* but billing code accessed
settings.commerce_* — causes AttributeError at runtime. Renamed fields
with AliasChoices for backward compat with HANZO_COMMERCE_* env vars.

P1: deps.py silently swallowed JWT errors (bare pass) — now logs them.
Virtual API key used fake UUID for missing projects — now raises 404.
Updated secrets.yaml to replace stale Stripe references with Commerce.
2026-02-12 10:44:47 -08:00
zeekay 882e1eadbc fix: update ZAP connection URL to bootno.de domain 2026-02-12 10:21:42 -08:00
zeekay 46e0472971 fix: brand IAM URLs and auth provider detection
- Fix Lux brand IAM URL: lux.id → iam.lux.network (matches actual deployment)
- Use getBrand().iam.url for IAM URL in HanzoLoginButton (brand-aware auth)
- Fix missing newline at EOF in unified-navigation.tsx
- Update LLM.md with Commerce billing and IAM documentation
2026-02-12 10:21:27 -08:00
zeekay 5d63821793 feat: enhance Lux fleet management with in-cluster + StatefulSet discovery
- Add StatefulSet discovery fallback for kubectl-deployed fleets (non-Helm)
- Add in-cluster mode: auto-detect pod ServiceAccount, skip kubeconfig fetch
- Add list_fleets_incluster() for direct K8s API fleet discovery
- Add get_statefulsets() to HelmDeployer for kubectl-based fleet listing
- Make helm_revision optional (null for non-Helm fleets)
- Add Lux devnet network (chain_id 96370), fix testnet chain_id (96368)
- Add in-cluster self-detection for /v1/infra/clusters endpoint
- Fix kubeconfig fetch: use raw HTTP (pydo can't deserialize YAML), doctl fallback
- Install kubectl in API Dockerfile for fleet management operations
2026-02-12 10:21:01 -08:00
zeekay 7acebc977d feat: integrate Commerce/Square billing (checkout, webhooks, unified API)
- Add checkout/capture endpoints via Commerce → Square payment flow
- Add order.completed/cancelled and payment.paid/failed/refunded webhook handlers
- Update Commerce API paths (/api/v1/customers → /api/v1/user, /subscribe, etc.)
- Migrate unified billing from Stripe references to Square (customer accounts)
- Add customer_id to usage sync worker for proper metered billing
- Export UnifiedBillingClient, UnifiedUser from billing module
- Add Commerce tier-to-plan slug mapping (bootnode-free/payg/growth/enterprise)
2026-02-12 10:20:42 -08:00
zeekay 284eb6906c refactor: rename domain bootnode.dev → bootno.de
Update K8s manifests (Ingress hosts, CRD API groups, CORS origins),
ZAP schemas, pyproject.toml URLs, SDK docs import paths, e2e test
emails, and K8s annotations to use the canonical bootno.de domain.
2026-02-12 10:20:22 -08:00
zeekay 37d5391a38 fix: multi-network OAuth login for all cloud portals
- OAuth callback accepts redirect_uri from frontend to derive correct
  IAM client_id per network (all use lux-web3 shared app)
- Token verification accepts tokens from any known IAM app audience
- Frontend sends redirect_uri in callback POST body
- Login page uses proper /login/oauth/authorize URL with client_id
- Brand configs unified to use lux-web3 IAM app for all networks
- Removed dead code (duplicate get_current_user, unreachable methods)
- IAM init data updated with cloud redirect URIs for pars/zoo/hanzo
2026-02-11 18:44:57 -08:00
zeekay 2093d6fd97 fix: import get_current_user from core.iam not api.deps
The networks module imported get_current_user from bootnode.api.deps
where it doesn't exist — it's in bootnode.core.iam. This broke the
entire API startup (uvicorn can't import bootnode.main:app).
2026-02-11 17:55:17 -08:00
zeekay 7f24ff6a40 feat: add 1-click network launcher API + update CI deploy
New /v1/networks endpoint orchestrates deploying a complete
white-label blockchain cloud portal:
- K8s deployment + service for bootnode-web with brand env vars
- Ingress with TLS + CORS for cloud.{domain} and api.cloud.{domain}
- IAM integration for SSO
- Scale and teardown endpoints

CI deploy step now restarts all cloud-web deployments (lux, pars,
zoo, hanzo) when new images are pushed.
2026-02-11 10:58:52 -08:00
zeekay 247eec0561 fix: use getattr for allowed_origins backward compat
Older Docker images may not have the allowed_origins field in Settings.
Use getattr with empty list default for graceful fallback.
2026-02-11 10:49:31 -08:00
zeekay dd1471d6fd fix: CORS allow all cloud domains for multi-network white-label
The CORSMiddleware was initialized with only bootnode.dev origin.
Added all cloud.*.network domains and ALLOWED_ORIGINS env var
for extending origins without code changes.
2026-02-11 10:39:14 -08:00
zeekay 4f4afe3fd0 Add pars brand and fix lux triangle icon
- Add pars brand config to brand.ts (persian blue + gold, cloud.pars.network)
- Add pars domain detection in getBrandKey()
- Add pars to server-side brand map in layout.tsx
- Replace lux-icon.svg wordmark with upside-down triangle (from @luxfi/logo)
- Add pars logo assets (8-pointed star icon, logo, white variant)
2026-02-11 10:03:20 -08:00
zeekay fcd8a5e08c fix: dark theme, local auth redirect, and monitoring page
- Dashboard and navigation use dark-mode-aware CSS vars (bg-background,
  bg-sidebar, border-border) instead of hardcoded bg-gray-50/bg-white
- isProductionMode() now recognizes 127.0.0.1 and private IPs as local
  so login no longer redirects to lux.id on localhost
- Add /dashboard/infrastructure/monitoring page with node health
  summary cards, CPU/memory/disk usage bars, 15s auto-refresh
- Quick login button uses [email protected] / admin credentials
2026-02-10 14:56:14 -08:00
zeekay 6ad79bde75 fix: dark black theme and real LUX production wordmark
- Dark theme: pure black background (oklch 0 0 0), monochrome chart colors
- LUX logos: replaced simplified polygons with production wordmark from @luxfi/logo
- Sidebar: near-black (#0d0d0d), monochrome primary colors
2026-02-10 14:50:56 -08:00
zeekay 8f618ba2dd feat: add Lux validator fleet management system
Full-stack fleet lifecycle management for Lux blockchain validators
deployed via Helm to DOKS clusters.

Backend (Python/FastAPI):
- HelmDeployer: async helm/kubectl CLI wrapper with temp file cleanup,
  per-release locking, and command injection protection
- LuxFleetManager: fleet CRUD, scale, rolling restart, node health
  probes via luxd RPC (health + C-chain block height)
- Fleet API: authenticated REST endpoints (ApiKeyDep) with RFC 1123
  input validation, kubeconfig error sanitization
- Pydantic models: 3 networks (mainnet/testnet/devnet), fleet status
  enums, helm values translation
- 110 unit tests (0.30s, all passing)

Frontend (TypeScript/Next.js):
- Fleet dashboard: cluster selector, stats banner, fleet cards with
  scale/restart/destroy operations, node status table, create dialog
- Interactive SVG world map: zero-dep Mercator projection with DOKS
  region markers, pulsing animations, P2P mesh lines, click-to-zoom
- DOKS region data: 11 regions with coordinates and API client
- Dark theme throughout
2026-02-10 13:40:28 -08:00
zeekay aeea477fb3 fix: cloud.lux.network uses lux.id for IAM, not hanzo.id 2026-02-10 09:28:16 -08:00
zeekay a6f444ff83 fix: hanzo-web3 uses universal web-latest image tag
Single universal image with runtime brand detection, not per-brand builds.
2026-02-10 09:01:43 -08:00
zeekay df10ab5f5e fix: runtime API URL resolution and pin Docker base image
- Add apiUrl/wsUrl to brand config for runtime resolution
- Auth and OAuth callback now use brand's apiUrl instead of baked env var
- Pin node:22-alpine to specific digest for supply chain security
2026-02-09 20:48:43 -08:00
zeekay e708a40f4b refactor: replace React.useState/useEffect with destructured imports
Consistent with rest of codebase - use named imports instead of namespace.
2026-02-09 20:36:06 -08:00
zeekay 3da0fa6fb2 feat: white-label branding with Cmd+K, ecosystem footer, and auth fix
- Add runtime brand detection (single Docker image for all brands)
- Add Cmd+K command palette with brand-specific ecosystem links
- Add brand-specific footer ecosystem column with external links
- Fix login page React hook violation (useBrand called after return)
- Use brand IAM URL for auth redirect (all brands → hanzo.id)
- Add Lux Cloud brand logos
- Unify CI to build single universal web image
2026-02-09 20:05:27 -08:00
zeekay 01d528d89f fix: update image references from bootnode/ to ghcr.io/hanzoai/bootnode
Updated all container image references across compose, K8s manifests,
cloud deploy scripts, and tests to use the ghcr.io/hanzoai/bootnode
registry format.
2026-02-06 07:55:58 -08:00
zeekay 3bb6aa7a89 fix: add bootnode brand to metadata, set as default
The layout.tsx was missing bootnode case in brand switch,
causing it to fall through to Hanzo. Added bootnode and
changed default from Hanzo to Bootnode.
2026-02-05 21:06:13 -08:00
zeekay fcda005d20 fix: build separate Docker images per brand
Build distinct images with NEXT_PUBLIC_BRAND baked in at build time:
- web-latest (bootnode brand for bootno.de)
- web-hanzo-latest (hanzo brand for web3.hanzo.ai)

Next.js NEXT_PUBLIC_* vars are embedded at build, not runtime.
2026-02-05 20:55:54 -08:00
zeekay 5c08394e43 fix: use hanzoai/bootnode as shared image registry
Both repos (hanzoai/bootnode and bootnode/bootnode) push to
ghcr.io/hanzoai/bootnode to maintain single source of truth
for container images.
2026-02-05 16:54:37 -08:00
zeekay 7dd0d32527 feat: dual deployment for Hanzo Web3 and Bootnode brands
- Split web deployment into hanzo-web3 and bootnode-web
- hanzo-web3: web3.hanzo.ai, auth via hanzo.id
- bootnode-web: bootno.de, auth via iam.bootno.de
- Updated CI to deploy both frontends
- Changed image registry to ghcr.io/bootnode/bootnode
- Updated ingress for both domains with separate TLS certs
2026-02-05 13:35:33 -08:00
zeekay de0820cf84 fix: use ghcr.io registry for container images
CI pushes to ghcr.io/hanzoai/bootnode, but manifests were
referencing hanzoai/bootnode which defaults to docker.io.
This caused deployments to use stale images from docker.io.
2026-02-04 23:42:08 -08:00
zeekay f8fc5042a9 chore: trigger fresh build 2026-02-04 23:30:31 -08:00
zeekay 58870c4d2a fix: redirect /login to hanzo.id in production
Instead of showing a login page with multiple identity providers,
redirect directly to hanzo.id for a cleaner authentication flow.
2026-02-04 23:09:42 -08:00
zeekay 7f1ba0733f fix: add CDN cache headers to prevent stale content
- Add CDN-Cache-Control header (60s) for HTML pages
- Keep long cache (1 year) for immutable static assets
- Prevents Cloudflare from serving stale branded content
2026-02-04 11:48:10 -08:00
zeekay a127eca83d chore: update bootnode domain to bootno.de
- Change bootnode brand domain from bootnode.dev to bootno.de
- Update status URL and domain detection
2026-02-04 11:37:43 -08:00
zeekay 288b1567a2 fix: set NEXT_PUBLIC_BRAND=hanzo in Dockerfile
Ensures web3.hanzo.ai builds with Hanzo branding:
- Set NEXT_PUBLIC_BRAND=hanzo at build time
- Update client ID to hanzo-web3
2026-02-04 11:28:33 -08:00
zeekay aa4567ecd6 fix: remove unpublished hanzo-kms/iam from optional deps
The hanzo-kms and hanzo-iam packages are not published to PyPI,
causing uv lock to fail. In production K8s, secrets are injected
as env vars directly by the KMS operator.
2026-02-04 11:16:07 -08:00
zeekay f99ded3c30 fix: update branding from bootnode.dev to hanzo.ai
- Fix code-demo.tsx brand name check (Hanzo Web3 vs Hanzo)
- Update RPC domains to rpc.web3.hanzo.ai
- Replace assets.bootnode.dev with assets.web3.hanzo.ai
- Replace ipfs.bootnode.dev with ipfs.web3.hanzo.ai
- Update demo email from [email protected] to [email protected]
2026-02-04 11:14:28 -08:00
zeekay 7a8f79078c feat: add planet-scale caching and omnichain query layer
Cloudflare Edge Caching (near-$0 costs for free tier):
- Multi-tier cache: L0 (in-memory) + L1 (Redis) + L2 (Cloudflare edge)
- Cache shared across ALL accounts (blockchain data is public)
- Aggressive TTLs: immutable data (1yr), finalized blocks (1hr)
- Cloudflare Worker script for edge caching
- Cache bypass only for state-dependent calls (eth_call, eth_getBalance)

Omnichain Query Layer (100+ chains):
- Unified query client for blocks, transactions, addresses, tokens
- PostgreSQL for metadata, ClickHouse for analytics
- Qdrant vector search for semantic queries (similar contracts)
- Meilisearch full-text search (addresses, tokens, contracts)
- GraphQL API with Strawberry (subscriptions for real-time)
- Cross-chain queries (address across all chains)

Infrastructure Updates:
- Added Qdrant and Meilisearch to compose.yml
- ClickHouse schema for omnichain analytics (blocks, txs, DeFi, NFTs)
- Materialized views for hourly/daily aggregates

Integrates with lux/indexer for 100+ chain data.
2026-02-04 11:00:57 -08:00
zeekay a2b59de17d feat: add unified IAM + Commerce billing integration
- Link Hanzo IAM users to Commerce customers via hanzo_id
- Auto-create Commerce customer on first billing access
- New unified billing endpoints:
  - GET /billing/account - unified user with IAM + Commerce data
  - GET /billing/account/subscriptions - all subscriptions
  - GET /billing/account/invoices - all invoices
  - GET /billing/account/payment-methods - payment methods
  - POST /billing/account/sync - sync IAM to Commerce
  - POST /billing/account/subscribe - create subscription
- Support for hanzo.id, zoo.id, lux.id, pars.id orgs
2026-02-04 10:45:09 -08:00
zeekay 3f83c83598 feat: implement Alchemy-style billing and pluggable deployments
Billing System:
- Add compute unit costs for 100+ RPC methods (1-100 CU)
- Implement pricing tiers: Free (30M CU), PAYG ($0.40/M), Enterprise
- Real-time usage tracking with Redis + ClickHouse analytics
- Subscription model with billing cycles
- Billing API endpoints: /usage, /subscription, /invoices, /tiers

Hanzo Commerce Integration:
- HanzoCommerceClient for subscriptions and invoices
- Usage sync worker for PAYG metered billing
- Webhook handler for subscription lifecycle events
- HMAC signature verification for webhooks

Pluggable Deployment Targets:
- Abstract DeployTarget interface
- DockerDeployer - Docker Compose management
- ProcessDeployer - Local dev with subprocesses
- KubernetesDeployer - K8s deployments via python client
- Factory pattern with caching
- Infrastructure API: /services, /scale, /logs

Pricing Page:
- Updated to match Alchemy pricing structure
- Three tiers with feature comparison table
- FAQ section with compute unit explanation

ClickHouse Schema:
- billing_usage_daily with SummingMergeTree
- billing_usage_monthly materialized view
- cu_by_method for analytics dashboard
- rate_limit_events tracking
2026-02-04 09:44:50 -08:00
zeekay 0549865535 fix: update branding to Hanzo for production deployment
- Update layout.tsx with brand-aware metadata (title, OG, icons)
- Change default brand from bootnode to hanzo in brand.ts
- Update homepage, product pages with brand-aware text
- Replace api.bootnode.dev URLs with api.hanzo.ai
- Update llms.txt route to use brand system
- Update security, privacy pages with Hanzo branding
- Update code-demo, unified-navigation with brand logos
- Update footer status link to status.hanzo.ai
2026-02-03 22:34:09 -08:00
zeekay 065df40807 fix: remove embedded repo references (separate projects) 2026-02-03 12:48:47 -08:00