From 50b7fab270d4dbb20bfcef0c56664848387a89ff Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 21 Feb 2026 02:29:47 +0000 Subject: [PATCH 1/2] Initial plan From d473497ee02fb06f176e12ca0e4334f8991d205c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 21 Feb 2026 02:34:26 +0000 Subject: [PATCH 2/2] fix: Vercel production readiness - vercel.json, .nvmrc, package.json engines, README deploy docs Co-authored-by: Krosebrook <214532761+Krosebrook@users.noreply.github.com> --- .nvmrc | 1 + README.md | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ package.json | 4 ++++ vercel.json | 20 ++------------------ 4 files changed, 55 insertions(+), 18 deletions(-) create mode 100644 .nvmrc diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 0000000..209e3ef --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +20 diff --git a/README.md b/README.md index 2659a08..3cce0cb 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,7 @@ Interact is an enterprise-grade employee engagement platform that transforms wor - [Overview](#overview) - [Documentation](#-documentation) - [Quick Start](#-quick-start) +- [Deploying to Vercel](#-deploying-to-vercel) - [Project Structure](#️-project-structure) - [Current Features](#-current-features) - [Roadmap Highlights](#-roadmap-highlights) @@ -79,6 +80,53 @@ Interact is an enterprise-grade employee engagement platform that transforms wor - **[.github/base44-updates.md](./.github/base44-updates.md)** - Base44 visual canvas integration guide and module architecture - **[.github/agents.md](./.github/agents.md)** - AI agent context log and historical development decisions +## 🚀 Deploying to Vercel + +**Project type:** Vercel Web App — React SPA (single-page application) built with Vite. + +### One-click deploy + +[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https://github.com/Krosebrook/interact) + +### Manual deploy + +1. Import the repository at [vercel.com/new](https://vercel.com/new). +2. Vercel auto-detects the Vite framework. Confirm the settings: + - **Framework Preset:** Vite + - **Build Command:** `npm run build` + - **Output Directory:** `dist` + - **Install Command:** `npm ci` + - **Node.js Version:** 20 +3. Add the required environment variables (see below), then click **Deploy**. + +### Environment variables + +Copy `.env.example` to understand all available variables. The following are **required** for the app to function: + +| Variable | Description | +|---|---| +| `VITE_BASE44_APP_ID` | Your Base44 application ID | +| `VITE_BASE44_BACKEND_URL` | Base44 backend server URL (e.g. `https://your-backend.base44.app`) | + +The following are **optional** but enable specific features: + +| Variable | Description | +|---|---| +| `VITE_BASE44_API_URL` | Base44 API URL (if different from backend URL) | +| `VITE_COMPANY_ID` | Company identifier | +| `VITE_ENABLE_ANALYTICS` | Enable analytics (`true`/`false`) | +| `VITE_GOOGLE_ANALYTICS_ID` | Google Analytics measurement ID | +| `VITE_STRIPE_PUBLISHABLE_KEY` | Stripe publishable key (payments feature) | + +Set these in the Vercel dashboard under **Settings → Environment Variables**, or via the Vercel CLI: + +```bash +vercel env add VITE_BASE44_APP_ID +vercel env add VITE_BASE44_BACKEND_URL +``` + +> **Note:** All `VITE_` prefixed variables are bundled into the client-side build. Never put secrets in `VITE_` variables. Backend/serverless function secrets (OpenAI keys, Stripe secret keys, etc.) should be set separately in your Base44 dashboard. + ## 🚀 Quick Start ### Prerequisites diff --git a/package.json b/package.json index e5f336a..3cf095e 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,10 @@ "private": true, "version": "0.0.0", "type": "module", + "engines": { + "node": ">=20", + "npm": ">=10" + }, "scripts": { "dev": "vite", "build": "vite build", diff --git a/vercel.json b/vercel.json index 52174f6..ff070c3 100644 --- a/vercel.json +++ b/vercel.json @@ -5,15 +5,6 @@ "outputDirectory": "dist", "installCommand": "npm ci", "devCommand": "npm run dev", - "env": { - "NODE_VERSION": "20" - }, - "build": { - "env": { - "VITE_API_URL": "@api_url", - "VITE_BASE44_PROJECT_ID": "@base44_project_id" - } - }, "regions": ["iad1"], "headers": [ { @@ -44,15 +35,8 @@ ], "rewrites": [ { - "source": "/api/:path*", - "destination": "/api/:path*" - } - ], - "redirects": [ - { - "source": "/login", - "destination": "/auth/login", - "permanent": false + "source": "/(.*)", + "destination": "/index.html" } ], "cleanUrls": true,