chore(dev): local dev-stack lane for the User API#2048
Conversation
scripts/dev.sh gains an optional User API lane (port 4003) mirroring the Address Enrichment one — started via `railway run` when the service is available (it needs the Railway dev Postgres), exporting USER_API_URL for the dashboard /api/user proxy, and skipped otherwise. Adds the `pnpm user-api` root alias and documents the port in the local-dev-stack skill. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
🎨 UI Review
This PR adds a local dev-stack lane for the User API: Out of scope for a UI review; no findings to report. Generated by Claude Code |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a115b0d4cb
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| if wait_for_optional_port "$PORT_USER_API" "User API"; then | ||
| USER_API_AVAILABLE=true | ||
| export USER_API_URL="http://localhost:${PORT_USER_API}" |
There was a problem hiding this comment.
Export USER_API_URL before waiting on readiness
When the User API takes more than the optional 20s to bind (for example a cold turbo dev build or a slow Railway Postgres connection), this branch leaves the background process running but does not export USER_API_URL before starting the dashboard. The Next proxy then inherits no USER_API_URL and /api/user keeps throwing “USER_API_URL is not configured” even if the service comes up seconds later; set the URL once the lane is started, or stop the process when the timeout path is chosen.
Useful? React with 👍 / 👎.
|
Folded into #2045 — the dev-stack lane belongs with the dashboard PR so the login/drafts flow is testable end-to-end there, not as a separate PR. Propagated through the stack. |
Summary
Adds a local dev-stack lane for the User API (stacked on #2047), closing the "no local lane for the auth service" gap so the sign-in modal, drafts, and API-keys flows are runnable end to end via
pnpm dev.scripts/dev.sh: optional User API lane on port 4003, mirroring Address Enrichment — started withrailway run -e dev -s user-apiwhen the Railway CLI/service is available (it needs the Railway dev Postgres), exportingUSER_API_URLfor the dashboard/api/userproxy. Skipped cleanly otherwise, so existing local flows are unaffected.pnpm user-apiroot alias (mirrorspnpm gateful/pnpm api).local-dev-stackskill.Notes
user-apiRailway dev service (with its Postgres) to actually start; until then the lane self-skips.bash -n scripts/dev.shpasses. Behavioural verification needs the Railway service, which is an external prerequisite.🤖 Generated with Claude Code