Skip to content

chore(dev): local dev-stack lane for the User API#2048

Closed
brunod-e wants to merge 1 commit into
feat/user-api-keysfrom
chore/user-api-dev-stack
Closed

chore(dev): local dev-stack lane for the User API#2048
brunod-e wants to merge 1 commit into
feat/user-api-keysfrom
chore/user-api-dev-stack

Conversation

@brunod-e

Copy link
Copy Markdown
Collaborator

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 with railway run -e dev -s user-api when the Railway CLI/service is available (it needs the Railway dev Postgres), exporting USER_API_URL for the dashboard /api/user proxy. Skipped cleanly otherwise, so existing local flows are unaffected.
  • pnpm user-api root alias (mirrors pnpm gateful / pnpm api).
  • Documents the port in the local-dev-stack skill.

Notes

  • Requires a provisioned user-api Railway dev service (with its Postgres) to actually start; until then the lane self-skips.
  • bash -n scripts/dev.sh passes. Behavioural verification needs the Railway service, which is an external prerequisite.

🤖 Generated with Claude Code

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>
@vercel

vercel Bot commented Jul 10, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
anticapture-storybook Ready Ready Preview, Comment Jul 10, 2026 12:24pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
anticapture Ignored Ignored Jul 10, 2026 12:24pm

Request Review

Copy link
Copy Markdown
Collaborator

🎨 UI Review

Automated review · scope check only

This PR adds a local dev-stack lane for the User API: scripts/dev.sh (optional Railway-backed service lane + port wiring), a pnpm user-api root alias in package.json, a doc update to .claude/skills/local-dev-stack/SKILL.md, and a changeset. All 4 changed files are shell script / config / docs — no .tsx, no apps/dashboard, no packages/ui/design-system files, no rendered UI surface.

Out of scope for a UI review; no findings to report.


Generated by Claude Code

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread scripts/dev.sh
Comment on lines +260 to +262
if wait_for_optional_port "$PORT_USER_API" "User API"; then
USER_API_AVAILABLE=true
export USER_API_URL="http://localhost:${PORT_USER_API}"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@brunod-e

Copy link
Copy Markdown
Collaborator Author

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.

@brunod-e brunod-e closed this Jul 10, 2026
@brunod-e brunod-e deleted the chore/user-api-dev-stack branch July 10, 2026 12:31
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.

2 participants