Compare commits
No commits in common. "main" and "api-integration" have entirely different histories.
main
...
api-integr
|
|
@ -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
|
node tools/waitlist-check.mjs # waitlist Apps Script: validation, dedupe, formula-injection guard
|
||||||
```
|
```
|
||||||
|
|
||||||
**Builds:** a plain build (`next build`, `app:build`, the CI server, Vercel) talks to the real API, `https://api.rezina.yaltopia.com`, the default in `apps/demo/app/page.tsx`. Point it elsewhere (e.g. staging) with `NEXT_PUBLIC_LMS_API=<url>`. `demo:build` sets it empty and keeps demo data: it feeds the hosted artifact demo, whose sandbox can't reach outside servers. To preview the old in-memory demo, build with `NEXT_PUBLIC_LMS_API= npx -y pnpm@9 --filter demo build && node tools/vercel-build.mjs`. Deploy to Vercel 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.
|
Phases 1–3 (Fastify API, Postgres, ArifPay, R2 video) haven't started yet. They wait on decisions D1, D2 and D8 in SPEC §17.
|
||||||
|
|
|
||||||
|
|
@ -2,11 +2,9 @@
|
||||||
import { ApiDataSource, ClaudeDbDataSource } from '@lms/data';
|
import { ApiDataSource, ClaudeDbDataSource } from '@lms/data';
|
||||||
import { Platform } from '@lms/features';
|
import { Platform } from '@lms/features';
|
||||||
|
|
||||||
// Any plain build (`next build`, as the CI server runs it) talks to the real API.
|
// Build with NEXT_PUBLIC_LMS_API=https://api.rezina.yaltopia.com to run the screens against the real API;
|
||||||
// The hosted artifact demo opts out by building with NEXT_PUBLIC_LMS_API set to an empty value (`demo:build`):
|
// without it the demo keeps its own data (Claude db, or the in-memory mock on Vercel).
|
||||||
// its sandbox can't reach outside servers, so it keeps its own data. Another API (e.g. staging) is a different value.
|
const API = process.env.NEXT_PUBLIC_LMS_API;
|
||||||
const DEFAULT_API = 'https://api.rezina.yaltopia.com';
|
|
||||||
const API = process.env.NEXT_PUBLIC_LMS_API ?? DEFAULT_API;
|
|
||||||
const makeDs = () => (API ? new ApiDataSource(API) : new ClaudeDbDataSource());
|
const makeDs = () => (API ? new ApiDataSource(API) : new ClaudeDbDataSource());
|
||||||
|
|
||||||
export default function Page() {
|
export default function Page() {
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,8 @@
|
||||||
"private": true,
|
"private": true,
|
||||||
"packageManager": "pnpm@9.15.9",
|
"packageManager": "pnpm@9.15.9",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"app:build": "pnpm --filter demo build",
|
"app:build": "NEXT_PUBLIC_LMS_API=https://api.rezina.yaltopia.com pnpm --filter demo build",
|
||||||
"demo:build": "NEXT_PUBLIC_LMS_API= pnpm --filter demo build && node tools/artifact-inline.mjs apps/demo/out dist/demo.html && node tools/artifact-check.mjs dist/demo.html",
|
"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",
|
"test": "node packages/features/src/domain.check.ts && node packages/data/src/api.check.ts",
|
||||||
"typecheck": "pnpm -r exec tsc --noEmit",
|
"typecheck": "pnpm -r exec tsc --noEmit",
|
||||||
"i18n:check": "node tools/i18n-check.mjs"
|
"i18n:check": "node tools/i18n-check.mjs"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user