From 98fae066bc30c79876288e08e708143764506ac0 Mon Sep 17 00:00:00 2001 From: teledrisi Date: Mon, 5 Oct 2026 17:32:06 +0200 Subject: [PATCH] added seeder for legacy apge and added the legacy page --- README.md | 14 +- .../content-types/legacy-page/schema.json | 49 ++ .../legacy-page/controllers/legacy-page.ts | 7 + .../src/api/legacy-page/routes/legacy-page.ts | 7 + .../api/legacy-page/services/legacy-page.ts | 7 + .../components/page/legacy-focus-area.json | 11 + .../src/components/page/legacy-metric.json | 12 + .../cms/src/components/page/legacy-stage.json | 26 + apps/cms/src/seed/approved.ts | 196 +++++++- apps/cms/src/seed/demo.ts | 12 - apps/cms/src/seed/index.ts | 86 +++- apps/cms/src/seed/upsert.ts | 17 +- apps/cms/types/generated/components.d.ts | 46 ++ apps/cms/types/generated/contentTypes.d.ts | 87 ++++ apps/web/README.md | 2 +- .../app/components/ui/Navigation/nav-items.ts | 6 +- apps/web/app/i18n/hooks.ts | 2 +- apps/web/app/i18n/messages/ar.json | 7 + apps/web/app/i18n/messages/en.json | 7 + apps/web/app/i18n/paths.ts | 2 +- apps/web/app/lib/route-slugs.ts | 7 +- apps/web/app/routes.ts | 9 +- apps/web/app/routes/_page-kit/cms-types.ts | 40 ++ apps/web/app/routes/_page-kit/copy.ts | 289 ++++++++++- .../app/routes/_page-kit/legacy-cms.server.ts | 45 ++ apps/web/app/routes/_page-kit/sections.tsx | 9 - apps/web/app/routes/about.tsx | 34 +- apps/web/app/routes/contact.tsx | 59 +-- apps/web/app/routes/home.tsx | 116 ++++- apps/web/app/routes/legacy.tsx | 458 ++++++++++++++++++ 30 files changed, 1488 insertions(+), 181 deletions(-) create mode 100644 apps/cms/src/api/legacy-page/content-types/legacy-page/schema.json create mode 100644 apps/cms/src/api/legacy-page/controllers/legacy-page.ts create mode 100644 apps/cms/src/api/legacy-page/routes/legacy-page.ts create mode 100644 apps/cms/src/api/legacy-page/services/legacy-page.ts create mode 100644 apps/cms/src/components/page/legacy-focus-area.json create mode 100644 apps/cms/src/components/page/legacy-metric.json create mode 100644 apps/cms/src/components/page/legacy-stage.json create mode 100644 apps/web/app/routes/_page-kit/legacy-cms.server.ts create mode 100644 apps/web/app/routes/legacy.tsx diff --git a/README.md b/README.md index 69276eb..4f25af6 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,7 @@ sharp-er/ │ ├── web/ React Router 8 front end (SSR) │ │ ├── app/ │ │ │ ├── root.tsx HTML shell: , canonical + hreflang, nav, footer -│ │ │ ├── routes.ts Route config: "/" redirect, ":lang" layout, the ten sections +│ │ │ ├── routes.ts Route config: "/" redirect, ":lang" layout, the eleven sections │ │ │ ├── routes/ One module per page (+ shared _page-kit / _shared helpers) │ │ │ ├── components/ui/ Button, Input, Card, Navigation, Footer, LanguageSwitcher │ │ │ ├── styles/ Design tokens — primitives.css, semantic.css, typography.css @@ -470,6 +470,7 @@ docker run --rm -v sharper_cms-uploads:/data -v "$PWD":/backup alpine \ | `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 seed` | writes the approved content into the CMS — see [Seeding content](#seeding-content) | +| `pnpm seed -- --legacy-only` | writes SHARP I, SHARP II, and the home section below the hero through the bilingual Legacy page; preserves its uploaded media | | `pnpm typecheck` | `tsc` in both applications, preceded in the web app by `react-router typegen` | **`apps/web`** — run with `pnpm --filter web