Join the discussion on Telegram
Why this matters
Four places in the frontend define API_BASE_URL independently, with two different fallback shapes — some with /v1 and some without. This is the source of subtle bugs (e.g. issue #455 with the settings page calling ${baseWithV1}/health and getting /v1/health which doesn't exist).
Verified locations:
frontend/src/app/streams/[id]/page.tsx:46 → ... || \"http://localhost:3001/v1\"
frontend/src/app/settings/page.tsx:19 (named INDEXER_URL) → ... || \"http://localhost:3001/v1\"
frontend/src/app/activity/page.tsx:13-15 → ... || \"http://localhost:3001\" (no /v1)
frontend/src/components/TransactionTracker.tsx:59 → ... || \"http://localhost:3001/v1\"
frontend/src/lib/api/_shared.ts:1 (canonical) → \"http://localhost:3001\" (no /v1) via getApiBaseUrl()
Some of these then concatenate /v1/streams/... directly, breaking depending on whether the env var ends in /v1.
Acceptance criteria
Files to touch
frontend/src/app/streams/[id]/page.tsx
frontend/src/app/settings/page.tsx
frontend/src/app/activity/page.tsx
frontend/src/components/TransactionTracker.tsx
frontend/src/lib/api/_shared.ts
Out of scope
- Reworking the SSE event subscribe URL
Join the discussion on Telegram
Why this matters
Four places in the frontend define
API_BASE_URLindependently, with two different fallback shapes — some with/v1and some without. This is the source of subtle bugs (e.g. issue #455 with the settings page calling${baseWithV1}/healthand getting/v1/healthwhich doesn't exist).Verified locations:
frontend/src/app/streams/[id]/page.tsx:46→... || \"http://localhost:3001/v1\"frontend/src/app/settings/page.tsx:19(named INDEXER_URL) →... || \"http://localhost:3001/v1\"frontend/src/app/activity/page.tsx:13-15→... || \"http://localhost:3001\"(no /v1)frontend/src/components/TransactionTracker.tsx:59→... || \"http://localhost:3001/v1\"frontend/src/lib/api/_shared.ts:1(canonical) →\"http://localhost:3001\"(no /v1) viagetApiBaseUrl()Some of these then concatenate
/v1/streams/...directly, breaking depending on whether the env var ends in /v1.Acceptance criteria
frontend/src/lib/api/_shared.ts(extend if needed) so there's exactly one place that knows the base URL shapeNEXT_PUBLIC_API_URLis set with or without trailing /v1Files to touch
frontend/src/app/streams/[id]/page.tsxfrontend/src/app/settings/page.tsxfrontend/src/app/activity/page.tsxfrontend/src/components/TransactionTracker.tsxfrontend/src/lib/api/_shared.tsOut of scope