From ff5772e9cf50925bfc4faf7206b5c93a6441b679 Mon Sep 17 00:00:00 2001 From: n3p-tun3 Date: Mon, 2 Nov 2026 20:00:19 +0300 Subject: [PATCH] build: Vercel builds against the real API by default - new `app:build` script bakes NEXT_PUBLIC_LMS_API=https://api.rezina.yaltopia.com into the student app; the URL lives in package.json, so nobody sets it by hand - vercel.json runs `app:build`, so a deploy of this branch talks to the API with no dashboard settings - `demo:build` (the hosted artifact demo) is unchanged and keeps demo data: its sandbox blocks calls to outside servers (artifact check: no network attempts) - README: Vercel section updated, including how to build the old in-memory demo --- README.md | 2 +- package.json | 1 + vercel.json | 9 +++++++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 0d56683..2db40b2 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,6 @@ npx -y pnpm@9 run i18n:check # every locale has every key node tools/waitlist-check.mjs # waitlist Apps Script: validation, dedupe, formula-injection guard ``` -**Vercel (standalone demo):** `vercel.json` builds the static export, then `tools/vercel-build.mjs` injects the runtime mock and the seed. Outside Claude, all data lives in memory in each visitor's browser and resets on reload. Deploy with `npx vercel deploy --prod`. +**Vercel:** `vercel.json` runs `app:build`, which builds the student app against the real API (`https://api.rezina.yaltopia.com`, set in `package.json`). `demo:build` stays on demo data: it feeds the Claude-hosted demo, whose sandbox can't reach outside servers. To preview the old in-memory demo on Vercel, build with `npx -y pnpm@9 --filter demo build && node tools/vercel-build.mjs`. Deploy with `npx vercel deploy --prod`. Phases 1–3 (Fastify API, Postgres, ArifPay, R2 video) haven't started yet. They wait on decisions D1, D2 and D8 in SPEC §17. diff --git a/package.json b/package.json index 3038e48..c34ab2f 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,7 @@ "private": true, "packageManager": "pnpm@9.15.9", "scripts": { + "app:build": "NEXT_PUBLIC_LMS_API=https://api.rezina.yaltopia.com pnpm --filter demo build", "demo:build": "pnpm --filter demo build && node tools/artifact-inline.mjs apps/demo/out dist/demo.html && node tools/artifact-check.mjs dist/demo.html", "test": "node packages/features/src/domain.check.ts && node packages/data/src/api.check.ts", "typecheck": "pnpm -r exec tsc --noEmit", diff --git a/vercel.json b/vercel.json index 5428052..322432f 100644 --- a/vercel.json +++ b/vercel.json @@ -1,7 +1,12 @@ { "installCommand": "npx -y pnpm@9 install --frozen-lockfile", - "buildCommand": "npx -y pnpm@9 --filter demo build && node tools/vercel-build.mjs", + "buildCommand": "npx -y pnpm@9 run app:build", "outputDirectory": "apps/demo/out", "framework": null, - "rewrites": [{ "source": "/waitlist", "destination": "/waitlist/index.html" }] + "rewrites": [ + { + "source": "/waitlist", + "destination": "/waitlist/index.html" + } + ] }