Connect the student app to the Rezina API #5

Merged
naol-yaltopia merged 4 commits from api-integration into main 2026-11-03 16:57:59 +03:00
3 changed files with 9 additions and 3 deletions
Showing only changes of commit ff5772e9cf - Show all commits

View File

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

View File

@ -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",

View File

@ -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"
}
]
}