fix: Vercel production readiness for React/Vite SPA#61
Draft
Conversation
…es, deploy docs, CI upgrades Co-authored-by: Krosebrook <214532761+Krosebrook@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Assess repository for Vercel production readiness and implement fixes
fix: Vercel production readiness for React/Vite SPA
Feb 21, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes critical Vercel deployment blockers and adds comprehensive deployment documentation for the Interact platform. The changes align environment variables with actual code usage, enable proper React Router SPA fallback routing, establish Node.js version compatibility, upgrade deprecated CI actions, and provide detailed deployment guidance.
Changes:
- Corrected environment variable names in
vercel.jsonfrom incorrectVITE_BASE44_PROJECT_IDto actualVITE_BASE44_APP_IDandVITE_BASE44_BACKEND_URLused in the codebase - Added critical SPA fallback rewrite
/(.*) → /index.htmlto prevent React Router 404s on hard navigation - Replaced invalid
env.NODE_VERSIONin vercel.json with proper Node 20 signals via.nvmrcandpackage.jsonengines field - Upgraded GitHub Actions artifact actions from EOL v3 to v4
- Added comprehensive Vercel deployment documentation to README and created reusable readiness checklist
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
vercel.json |
Fixed env var names (APP_ID + BACKEND_URL), removed invalid NODE_VERSION, added SPA catch-all rewrite, removed no-op API rewrite |
package.json |
Added Node.js engines constraint (>=20) for Vercel detection |
.nvmrc |
Added Node 20 version pin for local development and CI consistency |
.github/workflows/ci.yml |
Upgraded upload-artifact and download-artifact from v3 to v4 (v3 EOL) |
README.md |
Added Deploy to Vercel section with one-click deploy badge, build settings table, required/optional env vars, and SPA routing explanation |
docs/operations/VERCEL_READINESS_CHECKLIST.md |
Created comprehensive 12-point audit template for Vercel deployments across Krosebrook repos |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Several
vercel.jsonmisconfigurations and missing Node version signals would cause broken deployments and silent runtime failures. This PR fixes the blockers and adds deployment documentation.vercel.jsonfixesVITE_BASE44_PROJECT_ID→VITE_BASE44_APP_ID+VITE_BASE44_BACKEND_URL(matches actual app config; old name would silently be undefined at runtime)/(.*) → /index.htmlrewrite; without it, React Router hard-navigations and page refreshes 404/api/:path* → /api/:path*did nothingenv.NODE_VERSIONinvercel.jsonis not how Vercel reads the Node version; replaced with proper signals belowNode version
.nvmrc→20engines.node: ">=20"topackage.jsonCI
actions/upload-artifactandactions/download-artifact:v3→v4(v3 is EOL)Docs
docs/operations/VERCEL_READINESS_CHECKLIST.md: reusable 12-point audit template for other Krosebrook reposOriginal prompt
This pull request was created from Copilot chat.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.
Summary by cubic
Prepares this repo for Vercel by fixing vercel.json (env vars and SPA routing), adding Node 20 config, improving deploy docs, and upgrading CI. Aligns with the Linear task to assess Vercel readiness and remove blockers.
New Features
NODE_VERSION, add catch‑all rewrite to/index.html, usenpm ci..nvmrcandengines.node.Migration
npm ci+package-lock.json) and set env vars in Vercel project.Written for commit 04e7eae. Summary will update on new commits.