Skip to content

feat(auth): self-service signup — router mints per-PM API keys#2

Merged
mrdulasolutions merged 2 commits intomainfrom
feat/v2-monorepo
Apr 20, 2026
Merged

feat(auth): self-service signup — router mints per-PM API keys#2
mrdulasolutions merged 2 commits intomainfrom
feat/v2-monorepo

Conversation

@mrdulasolutions
Copy link
Copy Markdown
Owner

Adds the onboarding piece the v2 architecture was missing: PMs now go from nothing to a working Claude Code connection without ever touching the CRM admin UI.

router/signup.py — two endpoints on the public router:
GET /signup → minimal dark-themed HTML page (name/email/password/token)
POST /signup → orchestrates the signup dance:
1. validate REVA_SIGNUP_TOKEN (constant-time)
2. POST nakatomi/auth/signup (creates user)
3. POST nakatomi/workspace/members with admin token
(adds user to the Rev A workspace)
4. POST nakatomi/workspace/api-keys with admin token
(mints a per-user nk_... key)
5. return {api_key, user_id, workspace_slug, mcp_url}

plugin/install.sh — interactive wizard when REVA_MCP_URL is set but REVA_API_KEY is not. Reads name/email/password/token from stdin, POSTs via a stdlib urllib.request (no curl/jq dependency), captures the key, and saves it to both ~/.reva-turbo/config.yaml and ~/.claude/mcp.json.

railway/template.yaml — new shared vars REVA_SIGNUP_TOKEN and NAKATOMI_ADMIN_TOKEN. Signup stays disabled (503) until both are set.

docs/AUTH.md — full principal matrix, flow diagrams, rotation story, known gaps (no email verify yet, no SSO).

MRDula and others added 2 commits April 20, 2026 13:50
Adds the onboarding piece the v2 architecture was missing: PMs now go
from nothing to a working Claude Code connection without ever touching
the CRM admin UI.

router/signup.py — two endpoints on the public router:
  GET  /signup  → minimal dark-themed HTML page (name/email/password/token)
  POST /signup  → orchestrates the signup dance:
                    1. validate REVA_SIGNUP_TOKEN (constant-time)
                    2. POST nakatomi/auth/signup  (creates user)
                    3. POST nakatomi/workspace/members with admin token
                       (adds user to the Rev A workspace)
                    4. POST nakatomi/workspace/api-keys with admin token
                       (mints a per-user nk_... key)
                    5. return {api_key, user_id, workspace_slug, mcp_url}

plugin/install.sh — interactive wizard when REVA_MCP_URL is set but
REVA_API_KEY is not. Reads name/email/password/token from stdin, POSTs
via a stdlib urllib.request (no curl/jq dependency), captures the key,
and saves it to both ~/.reva-turbo/config.yaml and ~/.claude/mcp.json.

railway/template.yaml — new shared vars REVA_SIGNUP_TOKEN and
NAKATOMI_ADMIN_TOKEN. Signup stays disabled (503) until both are set.

docs/AUTH.md — full principal matrix, flow diagrams, rotation story,
known gaps (no email verify yet, no SSO).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
install.sh, setup, bin/, and skills/ all moved under plugin/ in the v2
restructure — but the CI workflow still referenced the old root paths
and failed with "bash: install.sh: No such file or directory" on both
ubuntu and macos runners.

- install-matrix: bash install.sh -> bash plugin/install.sh (both steps)
- lint-shell: shellcheck paths re-rooted to plugin/

REVA_TURBO_DIR still points at \${{ github.workspace }}; install.sh's
find_plugin_root() detects the plugin/ subdir automatically.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@mrdulasolutions mrdulasolutions merged commit 0b44b38 into main Apr 20, 2026
3 checks passed
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.

1 participant