Configure Conductor for local-only Convex dev - #518
Conversation
- Set up local Convex backend without cloud prompts - Automatically configure env files for dev servers - Temporarily bypass Convex login during dev startup - No login required, no cloud account needed Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
|
🚅 Deployed to the openchat-pr-518 environment in OpenChat
|
🚀 Preview Deployment Ready
Convex Preview Backend
🤖 Deployed automatically by GitHub Actions |
Greptile SummarySimplified Conductor workspace setup to use local-only Convex development without cloud authentication prompts. Key Changes
Issues Found
Confidence Score: 3/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant ConductorSetup as conductor-setup.sh
participant ConductorRun as conductor-run.sh
participant Bun
participant ConvexCLI as Convex CLI
participant LocalBackend as Local Convex Backend
User->>ConductorSetup: Click "Setup" in Conductor
ConductorSetup->>Bun: bun install
Bun-->>ConductorSetup: Dependencies installed
ConductorSetup->>ConductorSetup: Check ~/.convex/anonymous-convex-backend-state/anonymous-openchat-dev
Note over ConductorSetup: Uses shared deployment name for all workspaces
ConductorSetup->>ConductorSetup: Create apps/server/.env.local
Note over ConductorSetup: Sets CONVEX_DEPLOYMENT=anonymous:anonymous-openchat-dev<br/>CONVEX_URL=http://127.0.0.1:3210
ConductorSetup->>ConductorSetup: Create apps/web/.env.local
Note over ConductorSetup: Sets VITE_CONVEX_URL=http://127.0.0.1:3210<br/>VITE_CONVEX_SITE_URL=http://127.0.0.1:3211
ConductorSetup->>ConductorSetup: Modify apps/server/package.json
Note over ConductorSetup: Changes dev script to 'convex dev --local'
ConductorSetup->>ConductorSetup: Write .convex-deployment-name
ConductorSetup-->>User: Setup complete
User->>ConductorRun: Click "Run" in Conductor
ConductorRun->>ConductorRun: Check ~/.convex/config.json exists
alt Config file exists
ConductorRun->>ConductorRun: mv config.json to backup
Note over ConductorRun: Temporarily bypasses global Convex login
end
ConductorRun->>ConductorRun: Set trap cleanup EXIT
ConductorRun->>Bun: FORCE_COLOR=1 bun run dev
Bun->>ConvexCLI: convex dev --local (port 3210)
ConvexCLI->>LocalBackend: Start local backend
LocalBackend-->>ConvexCLI: Running on 127.0.0.1:3210
Bun->>Bun: Start web dev server (port 3000)
Note over User,LocalBackend: Dev servers running with local-only Convex
User->>ConductorRun: Ctrl+C to stop
ConductorRun->>ConductorRun: trap cleanup triggered
ConductorRun->>ConductorRun: Restore config.json from backup
ConductorRun-->>User: Stopped
|
| # Local Convex deployment (auto-configured by Conductor) | ||
| CONVEX_DEPLOYMENT=anonymous:$DEPLOY_NAME | ||
| CONVEX_URL=http://127.0.0.1:3210 | ||
| NEXT_PUBLIC_APP_URL=http://localhost:3000 |
There was a problem hiding this comment.
syntax: NEXT_PUBLIC_APP_URL is for Next.js, but this project uses TanStack Start with Vite. This env var won't be read by the frontend. According to AGENTS.md line 59, TanStack Start uses VITE_ prefix for client-side vars, not NEXT_PUBLIC_.
Score: 4/5 - High confidence this is incorrect
| NEXT_PUBLIC_APP_URL=http://localhost:3000 | |
| VITE_APP_URL=http://localhost:3000 |
| echo "✅ Using LOCAL Convex deployment (no cloud, no prompts)" | ||
| echo " Your changes won't affect the main project's database" | ||
| echo " Each worktree has its own isolated Convex backend" | ||
| echo " Each workspace has its own isolated Convex backend" |
There was a problem hiding this comment.
style: Messaging inconsistency: Claims "each workspace has its own isolated Convex backend" but per conductor-setup.sh:39-41, all workspaces share anonymous-openchat-dev deployment (same database).
Score: 3/5 - The code works but messaging is misleading
Summary
Set up Conductor workspaces to use local-only Convex backend without any cloud prompts or login requirements.
Changes
🤖 Generated with Claude Code