diff --git a/CLAUDE.md b/CLAUDE.md index d406544..b28d21f 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -61,6 +61,8 @@ unreachable — the site must never 500 because Strapi is down. `skillNames: "resource:figma-design-to-code"`. File key `yvKHp3Ha2rQmv9kt9tCC7j`. 5. **Never invent statistics, dates, names or quotes.** If a number is not in `docs/` or in the CMS, it does not go on the page. Leave the slot empty or omit the component. + The same rule governs the seed: anything invented belongs in `src/seed/demo.ts`, never + in `approved.ts`, and `pnpm seed` without `--demo` must stay publishable. 6. **`docs/` is read-only source material.** Never edit, move or "clean up" those files. 7. **Both locales, always.** New UI text goes into `app/i18n/messages/en.json` *and* `ar.json` with identical keys (the `Messages` type enforces it). A component that hard-codes @@ -86,6 +88,7 @@ unreachable — the site must never 500 because Strapi is down. | HTML shell, canonical, hreflang | `apps/web/app/root.tsx` | | Content types | `apps/cms/src/api//content-types//schema.json` | | Boot-time locale + permission setup | `apps/cms/src/bootstrap/` | +| CMS seed content (`pnpm seed`) | `apps/cms/src/seed/` — `approved.ts` is from `docs/`; `demo.ts` is invented, opt-in behind `--demo`, every slug prefixed `demo-` | | CORS, upload rules, i18n locales | `apps/cms/config/{middlewares.ts,plugins.ts}` | ## Conventions that bite diff --git a/README.md b/README.md index 3d821eb..4093664 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,7 @@ publications — all of it in English and Arabic, with the Arabic side laid out - [Path A — manual setup](#path-a--manual-setup) - [Path B — Docker](#path-b--docker) - [Available scripts](#available-scripts) +- [Seeding content](#seeding-content) - [Design tokens](#design-tokens) - [Bilingual EN / AR](#bilingual-en--ar) - [Adding a content type, end to end](#adding-a-content-type-end-to-end) @@ -468,7 +469,8 @@ docker run --rm -v sharper_cms-uploads:/data -v "$PWD":/backup alpine \ | `pnpm dev:cms` | `strapi develop` (auto-reloads on schema changes) → `http://localhost:1337` | | `pnpm build` | builds the CMS, then the web app (that order: the web build has no CMS dependency, but a broken CMS build should fail first) | | `pnpm start` | runs both production builds | -| `pnpm typecheck` | the web app's `react-router typegen && tsc` (the CMS has no `typecheck` script — its TypeScript is checked by `strapi build`) | +| `pnpm seed` | writes the approved content into the CMS — see [Seeding content](#seeding-content) | +| `pnpm typecheck` | `tsc` in both applications, preceded in the web app by `react-router typegen` | **`apps/web`** — run with `pnpm --filter web