Documents the CMS-host-serves-everything decision and proposes the host injection plan
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -15,7 +15,7 @@ Source: `GET /api/v1/offerings`. One list feeds the price cards on the home page
|
||||
- **Featured package** (the star in the CMS admin, field `featured`): the card gets a heidegroen rule along its top, a heidegroen border and a small "Uitgelicht" tab on the top edge (`PriceCard`). The tab is positioned on the border, so the cards of a row keep the same layout. Any number of cards may be featured.
|
||||
- **Description, price note and button label** (`description`, `priceNote`, `ctaLabel`) are optional in the CMS and the site does not use them: they are not shown and a card never depends on them (empty, `null` or absent all give the same card; covered by tests).
|
||||
- **Scheduling in the CMS:** the API only returns packages that are live at the moment of the request (switched on and inside their from/to dates), so the site shows them and nothing else. The baked list reflects the moment of the build; the live refresh after hydration corrects it for every visitor, and the nightly build corrects it for search engines. A package that goes live or expires between two builds is therefore right in the browser but can be stale in the HTML until the next build.
|
||||
- **Keep the snapshot current** when the real packages change (prices, features), because production builds use it (see "Reverse proxy" below).
|
||||
- **Keep the snapshot current** when the real packages change (prices, features), because production builds use it (see "Hosting" below).
|
||||
|
||||
## Banners (OfferingBanner)
|
||||
|
||||
@@ -36,10 +36,13 @@ Both follow the same rules as the packages: baked into the HTML at build time, r
|
||||
|
||||
`GET /api/v1/contact-messages/token` and `POST /api/v1/contact-messages` through the headless `web/src/cms-client`. The form is behind the switch `contactForm.enabled` in `web/src/content/siteContent.ts` (off means the "Binnenkort" gate and no request to the server). Details and the go-live conditions are in `aidlc-docs/features/contact-form-cms/` and [go-live-checklist.md](go-live-checklist.md). Friendly Captcha is off at go-live.
|
||||
|
||||
## Reverse proxy for `/api/v1/*`
|
||||
## Hosting: the CMS host serves everything
|
||||
|
||||
Decision (Bryan, 2026-11-15): the hosting package has one entry per website. The CMS host (Kestrel) is that entry and serves the website itself (the prerendered pages), `/admin` and `/api/v1/*`. In production IIS (or the proxy) therefore passes **all** requests to the CMS host, not only `/api/v1/*`, and serves no static files or HTML cache of its own. This holds for the test host and for ASF production alike.
|
||||
|
||||
- **Test (ASF):** nginx on the proxy Pi forwards everything for `test.andreaslop.nl` to the CMS host (`web/deploy/nginx/test.andreaslop.nl.proxy.conf`), which serves the site files and the API. Nothing to add.
|
||||
- **Production (IIS): not in place yet.** The generated `web/deploy/iis/web.config` only serves static files, so `/api/v1/*` answers 404 there. Production needs either a reverse-proxy rule (URL Rewrite with ARR) from `/api/v1/*` to a production CMS host for ASF, or the CMS host serving the site as on test. This is a separate follow-up together with ASF production hosting. Until then the production build uses the committed snapshot and the live calls fail safely (the baked list stays; the browser console shows the 404). Change the rule in `web/config/serverConfig.ts` and run `pnpm server-config`; never edit the generated files.
|
||||
- **Production: not in place yet.** The generated `web/deploy/iis/web.config` and the FTP upload of static files (`web/deploy/upload-production.sh`) still describe the old idea of IIS serving the files. They have to change with the production hosting: IIS keeps only the redirects (www, HTTPS) and the pass-through to the CMS host, and the prerendered `dist/` goes to the CMS host's prerendered-pages folder as on test. Security headers then come from the CMS host (as on test). This is part of the production hosting work, not of the packages feature. Until then production builds use the committed snapshot and the live calls fail safely (the baked list stays; the browser console shows a 404 for the API). Change generated server files only in `web/config/serverConfig.ts` and run `pnpm server-config`.
|
||||
- **Next step (planned, separate feature after the current merges):** the CMS host injects the current packages, banners and later gallery and hero into the prerendered pages through markers, so a CMS change is visible to search engines at once and no rebuild is needed for it. The plan is in `aidlc-docs/features/asf-cms-host-injection/plan.md`; nothing of it is built yet. The browser-side live refresh described above stays as the safety net until then.
|
||||
|
||||
## Environment and variables
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ What must be true before the CMS-driven parts of the site go to production. Brya
|
||||
|
||||
## Packages and banners
|
||||
|
||||
- [ ] Production hosting (IIS) in place and `/api/v1/*` reverse-proxied to a production CMS host for ASF, or the CMS host serving the site ([cms-integration.md](cms-integration.md)). Without it production keeps the committed snapshot and the console shows a 404 per page view.
|
||||
- [ ] Production hosting in place with the CMS host as the one entry of the website: IIS passes ALL requests to the CMS host (not only `/api/v1/*`) and serves no static files itself; the prerendered `dist/` is deployed to the CMS host ([cms-integration.md](cms-integration.md), "Hosting"). The generated IIS config and the production upload script are updated for this. Without it production keeps the committed snapshot and the console shows a 404 per page view for the API.
|
||||
- [ ] `web/src/content/offerings.snapshot.json` holds the real, current packages (production builds use it).
|
||||
- [ ] The production CMS holds the real packages. The test CMS prices must never end up in the production artifact (it is built without `OFFERINGS_URL`).
|
||||
|
||||
@@ -35,6 +35,7 @@ The contact form must not go live before the statement does.
|
||||
|
||||
## Other open items
|
||||
|
||||
- ASF production hosting on IIS (separate feature).
|
||||
- ASF production hosting: CMS host behind IIS pass-through (separate feature, see above).
|
||||
- Host injection of CMS data into the prerendered pages (plan: `aidlc-docs/features/asf-cms-host-injection/plan.md`, after the current merges).
|
||||
- First ASF administrator and removal of the setup token (CMS).
|
||||
- Messages created by the Playwright test run in the ASF test CMS are archived by Bryan.
|
||||
|
||||
Reference in New Issue
Block a user