Skip to content

fix(front): correct the API base URL env var name (WO-01) - #115

Merged
sergi-torres merged 2 commits into
mainfrom
fix/wo-01-api-base-url
Jul 28, 2026
Merged

fix(front): correct the API base URL env var name (WO-01)#115
sergi-torres merged 2 commits into
mainfrom
fix/wo-01-api-base-url

Conversation

@sergi-torres

@sergi-torres sergi-torres commented Jul 28, 2026

Copy link
Copy Markdown
Owner

What

Corrects the frontend's API base URL environment variable name: NEXT_PUBLIC_API_URLNEXT_PUBLIC_API_BASE_URL, and adds frontend/.env.local.example so Next.js picks it up.

One variable name. The effect is that the deployed frontend stopped talking to localhost.

Why

Closes #82

How IBM Bob helped

  • Custom Mode used: none
  • Bob session export: n/a

Claude Code agents under the dispatch protocol from the completeness audit: one executor per work order in a cold context, and an independent verifier that receives only the Definition of Done.

Screenshots / output

n/a — configuration change. The verifiable criterion is that the deployed frontend points at the real backend rather than localhost.

Checklist

  • Tests pass locally (make test)
  • Lint passes (make lint)
  • If schema changed (StyleProfile / Passport) → bumped version + updated docs/
  • If new env var → added to .env.example
  • If new/changed endpoint → updated docs/api_contract.yaml
  • Documentation in the relevant README.md updated
  • At least one teammate reviewed

Merge this before #119. Both touch frontend/src/lib/api.ts and they are independent branches, so their conflict is not resolved by the stacking order. It is the least obvious collision in the batch.

sergi-torres and others added 2 commits July 27, 2026 21:04
The client read `NEXT_PUBLIC_API_URL`, but `.env.example:33` and
`docs/DEPLOYMENT.md:62` (Vercel step 3) both fix the name as
`NEXT_PUBLIC_API_BASE_URL`. Because of the `?? "http://localhost:8000"`
fallback the mismatch failed silently: no build or runtime error, just
every deployed API call going to localhost.

Default value kept unchanged, so local development is unaffected.

Refs #82

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…API base URL

Next.js loads env files from the Next project root (frontend/), not from the
repo root, so the documented `cp .env.example .env` never reaches the browser
bundle. The mistake is invisible locally because the fallback in api.ts is the
same http://localhost:8000 the template sets — it only bites when pointing the
frontend at a non-local backend.

Adds the template, negates it in frontend/.gitignore (Next's default `.env*`
would swallow it), and points README step 2 at it.

Found while implementing #82; fixed here rather than tracked separately.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Jul 28, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
author-ai Ready Ready Preview, Comment Jul 28, 2026 4:21pm

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.

[frontend] WO-01 — Corregir el nombre de la variable de entorno de la URL base de la API en el frontend

1 participant