Skip to content

Add instant.config.ts for self-hosted create-instant-app - #2844

Merged
nezaj merged 2 commits into
mainfrom
wire-self-host-uri
Aug 7, 2026
Merged

Add instant.config.ts for self-hosted create-instant-app#2844
nezaj merged 2 commits into
mainfrom
wire-self-host-uri

Conversation

@nezaj

@nezaj nezaj commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

I noticed when using create-instant-app in a self-hosted setup the LLM would first try to use instant-cli without specifying INSTANT_CLI_API_URI which cause an error since the app doesn't exist in production. The LLM would be able to inspect the app and figure out it needs to add this env variable but I thought it would be nicer to remove that schlep.

This PR makes it so when you use create-instant-app with a custom INSTANT_CLI_API_URI we'll create an instant.config.ts file that our CLI will pick up and avoid the error from before.

As a bonus, in the self-hosted dashboard we'll also update the create-instant-app command to include both self hosted api and dash uris

CleanShot 2026-08-06 at 18 24 20@2x

@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 56879912-2e3c-4b0b-adb6-eb78135edfb1

📥 Commits

Reviewing files that changed from the base of the PR and between 367cedd and 8c61217.

📒 Files selected for processing (1)
  • client/packages/version/src/version.ts

📝 Walkthrough

Walkthrough

The dashboard now passes self-hosted API and dashboard URIs to project creation. The CLI forwards these values to applyBackendConfig, which generates instant.config.ts after successful backend configuration.

Changes

Self-hosted backend configuration

Layer / File(s) Summary
Backend config generation and validation
client/packages/create-instant-app/src/backendConfig.ts, client/packages/create-instant-app/src/backendConfig.test.ts, client/packages/version/src/version.ts
applyBackendConfig accepts an optional dashboard URI and writes instant.config.ts with normalized API and dashboard URIs. Tests cover successful and failed configuration. The shared package version changes to v1.0.63.
CLI backend wiring
client/packages/create-instant-app/src/index.ts
The CLI passes INSTANT_CLI_DASH_URI to applyBackendConfig.
Dashboard project creation
client/www/components/dash/HomeStartGuide.tsx, client/www/pages/dash/index.tsx
Self-hosted dashboard pages pass API and origin URIs to AppStart. Project creation commands include shell-quoted backend environment variables. Hosted deployments continue without overrides.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Home
  participant AppStart
  participant getSteps
  participant create_instant_app
  participant applyBackendConfig
  Home->>AppStart: pass self-hosted apiURI and dashURI
  AppStart->>getSteps: pass backend configuration
  getSteps->>create_instant_app: prepend shell-quoted backend environment variables
  create_instant_app->>applyBackendConfig: pass API and dashboard URIs
  applyBackendConfig->>create_instant_app: write instant.config.ts
Loading

Possibly related PRs

Suggested reviewers: stopachka, drew-harris

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description check ✅ Passed The description explains the self-hosted configuration changes and the dashboard command update.
Title check ✅ Passed The title clearly identifies the primary change: adding instant.config.ts for self-hosted create-instant-app usage.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

View Vercel preview at instant-www-js-wire-self-host-uri-jsv.vercel.app.

@stopachka stopachka 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.

SGTM!

@nezaj
nezaj force-pushed the wire-self-host-uri branch from 367cedd to 8c61217 Compare August 7, 2026 16:12
@nezaj
nezaj merged commit 700aadf into main Aug 7, 2026
26 of 27 checks passed
@nezaj
nezaj deleted the wire-self-host-uri branch August 7, 2026 16:13
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