Skip to content

Configure Conductor for local-only Convex dev - #518

Merged
leoisadev1 merged 1 commit into
mainfrom
local-convex-dev
Jan 19, 2026
Merged

Configure Conductor for local-only Convex dev#518
leoisadev1 merged 1 commit into
mainfrom
local-convex-dev

Conversation

@leoisadev1

Copy link
Copy Markdown
Member

Summary

Set up Conductor workspaces to use local-only Convex backend without any cloud prompts or login requirements.

Changes

  • Auto-configure local Convex deployment on setup
  • Temporarily bypass global login during dev startup
  • Generate proper env files for frontend and backend
  • Remove dependency on main project's Convex config

🤖 Generated with Claude Code

- 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>
@railway-app

railway-app Bot commented Jan 19, 2026

Copy link
Copy Markdown

🚅 Deployed to the openchat-pr-518 environment in OpenChat

Service Status Web Updated (UTC)
web ◻️ Removing (View Logs) Web Jan 19, 2026 at 9:08 pm

@railway-app
railway-app Bot temporarily deployed to OpenChat / openchat-pr-518 January 19, 2026 21:05 Destroyed
@github-actions

Copy link
Copy Markdown
Contributor

🚀 Preview Deployment Ready

Environment URL
Frontend https://web-openchat-pr-518.up.railway.app
Convex Dashboard Dashboard

Convex Preview Backend

  • Cloud URL: https://first-bandicoot-438.convex.cloud
  • Site URL: https://first-bandicoot-438.convex.site

🤖 Deployed automatically by GitHub Actions

@greptile-apps

greptile-apps Bot commented Jan 19, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Simplified Conductor workspace setup to use local-only Convex development without cloud authentication prompts.

Key Changes

  • Removed dependency on copying env files from main project's CONDUCTOR_ROOT_PATH
  • Auto-generates apps/server/.env.local and apps/web/.env.local with local URLs
  • Uses shared anonymous deployment name (anonymous-openchat-dev) across all Conductor workspaces
  • Temporarily moves ~/.convex/config.json during runtime to bypass cloud login prompts
  • Deleted apps/server/.convex/deployment_url.txt cloud URL file

Issues Found

  • Syntax Error (4/5 confidence): conductor-setup.sh:64 uses NEXT_PUBLIC_APP_URL instead of VITE_APP_URL. This project uses TanStack Start with Vite, not Next.js, so the NEXT_PUBLIC_ prefix won't be recognized by the frontend.
  • Misleading Documentation (3/5 confidence): conductor-run.sh:11 claims "each workspace has its own isolated Convex backend", but all workspaces actually share the same anonymous-openchat-dev deployment (same database state).

Confidence Score: 3/5

  • This PR has minor issues but is relatively safe to merge with fixes
  • Score reflects one clear syntax error (wrong env var prefix for TanStack Start) that will prevent the NEXT_PUBLIC_APP_URL from being read, and misleading documentation about workspace isolation. The core logic for local Convex setup appears sound, but the env var bug should be fixed before merging.
  • Pay close attention to conductor-setup.sh for the env var prefix fix

Important Files Changed

Filename Overview
.convex-deployment-name New file storing shared anonymous deployment name for Conductor workspaces
apps/server/.convex/deployment_url.txt Removed cloud deployment URL file (replaced with local-only config)
conductor-setup.sh Completely rewrote setup to auto-configure local Convex deployment without cloud dependencies
conductor-run.sh Added temporary bypass of Convex login config to prevent cloud prompts during local dev

Sequence Diagram

sequenceDiagram
    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
Loading

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

4 files reviewed, 2 comments

Edit Code Review Agent Settings | Greptile

Comment thread conductor-setup.sh
# 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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

Suggested change
NEXT_PUBLIC_APP_URL=http://localhost:3000
VITE_APP_URL=http://localhost:3000

Comment thread conductor-run.sh
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"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

@leoisadev1
leoisadev1 merged commit f6f6078 into main Jan 19, 2026
8 checks passed
@leoisadev1
leoisadev1 deleted the local-convex-dev branch January 19, 2026 21:08
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