Contactformulier-module, banners, thema's, taalbestanden en CI-herstructurering #15
@@ -20,4 +20,6 @@
|
||||
| Feature | [Offering banners (offering-banners)](features/offering-banners/overview.md) | 🟡 Op test (buiten AI-DLC gebouwd en achteraf gedocumenteerd; admin-lijst met Locatie-badge op test sinds 2026-11-15) | feature/contact-forms-module | Modules.Offerings (banner met positie top/bottom), openapi, Frontend (admin Aanbiedingen > Banner) | 2026-11-12 |
|
||||
| Feature | [Offering schedule (offering-schedule)](features/offering-schedule/overview.md) | 🟡 Op test zodra CI-run 109 is uitgerold (buiten AI-DLC gebouwd en achteraf gedocumenteerd) | feature/contact-forms-module | Modules.Offerings (aan/uit en van/tot per pakket, `/offerings/all`), openapi, Frontend (admin pakketformulier en -lijst) | 2026-11-15 |
|
||||
| Feature | [Website SEO (website-seo)](features/website-seo/overview.md) | 🟡 Op SLP-test (buiten AI-DLC gebouwd en achteraf gedocumenteerd; productie vraagt `Website__NoIndex=false` en `Website__PublicBaseUrl`) | feature/contact-forms-module | Core (Hosting/Website), Modules.Offerings (index-markers), Api.SlpSoftware (appsettings) | 2026-11-11 |
|
||||
| Feature | [CI bouwt en test alleen het master-CMS (ci-master-pipeline)](features/ci-master-pipeline/overview.md) | 🟡 Gepusht, eerste CI-run met de nieuwe workflow volgt (buiten AI-DLC gebouwd en achteraf gedocumenteerd) | feature/contact-forms-module | CI/CD (workflow, slnf, rooktest), Core (Website:Mode), Api (alle modules), Tests (ASF-testproject opgeheven) | 2026-11-15 |
|
||||
| Feature | [ASF: host injecteert in voorgerenderde pagina's (asf-host-injection)](features/asf-host-injection/plan.md) | 🔵 Voorstel; bouwen wacht op Bryans akkoord en op .NET 10 op het hostingpakket | feature/contact-forms-module | Core (Hosting/Website), Modules.Offerings, docs | 2026-11-15 |
|
||||
| Bug | [theme-toggle-first-click](bugs/theme-toggle-first-click/bug-fix.md) | ✅ Complete (niet gecommit/gemerged; buiten AI-DLC gebouwd; oorzaak niet in een echte browser nagebootst) | feature/contact-forms-module | Frontend (useTheme, index.html) | 2026-11-15 |
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
# Host injection into ASF's prerendered pages (asf-host-injection)
|
||||
|
||||
- **Slug**: asf-host-injection
|
||||
- **Type**: Feature, **proposal; not approved, build not started**
|
||||
- **Status**: Plan agreed with the ASF session (their counterpart: `AndreaSlopFotografie-packages/aidlc-docs/features/asf-cms-host-injection/plan.md`, section "Host contract"). Bryan accepted the approach (neutral list first, styled cards after hydration; the host writes the list HTML) on 2026-11-15 but said **not to start building yet**: he first reads the plan and finds out whether .NET 10 can run on the hosting package (hosting bundle or self-contained).
|
||||
- **Affected components (planned)**: `SlpModularCms.Core` (`Hosting/Website`: generalise `IndexHtmlInjector`, hook in `PrerenderedSiteMiddleware`), `SlpModularCms.Modules.Offerings` (marker providers), `scripts/smoke-site.sh`, docs
|
||||
- **Documented**: 2026-11-15
|
||||
- **Documentation Language**: English
|
||||
- **Conversation Language**: Dutch (user language)
|
||||
|
||||
## Why
|
||||
|
||||
Bryan's hosting package has one entry per website: the CMS host is that entry and serves the website, the prerendered pages and `/admin`. So ASF in production also runs entirely through Kestrel (IIS passes every request on, serves no static files and caches no HTML). Packages, banners and (later) gallery data can therefore be written into the prerendered HTML by the host: visible to crawlers within about a minute of a CMS change, without a nightly build. A rebuild webhook stays an option only for build-processed gallery images.
|
||||
|
||||
## Host contract (agreed with ASF)
|
||||
|
||||
All markers are found in one pass; a page without markers and without the authored address is still served as a plain static file. **Fail-open everywhere**: missing marker = nothing; invalid data or a provider failure = the baked page is served.
|
||||
|
||||
| Marker | Host behaviour |
|
||||
|---|---|
|
||||
| `<!--CMS:OFFERINGS-HTML-->…<!--/CMS:OFFERINGS-HTML-->` | Replace the content between the markers by a simple crawlable list from the live offerings (C# template following ASF's "Neutral HTML spec" and their golden files; everything HTML-encoded). The markers stay. |
|
||||
| `<!--CMS:BANNER-TOP-HTML-->…<!--/…-->`, `<!--CMS:BANNER-BOTTOM-HTML-->…<!--/…-->` | Same, from the live banner of that position as `<aside><strong/><span/><a/>`; empty (204) empties the region, so an ended banner disappears at once. |
|
||||
| `<!--CMS:DATA-->` directly followed by the baked `<script type="application/json" id="cms-data">` | Replace the pair by the live block `{"siteUrl":…,"offerings":[…],"banners":{"top":…\|null,"bottom":…\|null}}`, the same shapes as the public GETs, `< > &` and U+2028/9 as `\uXXXX`. `siteUrl` = `Website:PublicBaseUrl`, otherwise `Website:AuthoredBaseUrl`, without a trailing slash. |
|
||||
| `<!--CMS:OFFER-JSON-LD slug="x"-->` directly before `<script type="application/ld+json">` | Parse that block and set `offers.price` (whole euros) from the live offering; no live offering or no price derivable (free text) = remove `offers`. A provider failure leaves the baked block. Invalid JSON is left alone. |
|
||||
| `<span data-cms-price="slug">€ 185</span>` | Replace the text by `€` + U+00A0 + whole euros; unknown slug or no price = unchanged. |
|
||||
|
||||
## One artifact for test and production
|
||||
|
||||
`Website:AuthoredBaseUrl` (`https://andreaslop.nl`, the address ASF's build writes) is replaced by `Website:PublicBaseUrl` in html, `sitemap.xml` and `robots.txt` when the host has a `PublicBaseUrl` that differs (test: `Website__PublicBaseUrl=https://test.andreaslop.nl` in the host's env file). Where the host answers `robots.txt` itself (a `NoIndex` test host) that goes first.
|
||||
|
||||
## Serving and caching
|
||||
|
||||
Injected pages: `Cache-Control: no-cache`, strong ETag from the final body, 304 on `If-None-Match`, no `Last-Modified`; behind the 60-second cache with direct invalidation on every CMS change (offering, banner). The proxy must not cache HTML, must pass `ETag`/`If-None-Match`/304 and `Vary`, and must forward `Host` and `X-Forwarded-*`. Measured on test-ASF (2026-11-15): HTML and `robots.txt` already come from the host (host headers, no `Age`/`X-Cache`), gzip is applied on the way. `/assets/` stays immutable.
|
||||
|
||||
## Open before the build starts
|
||||
|
||||
1. Bryan approves the plan; the ASF golden files (input JSON + expected HTML, with a README and commit) are delivered after that.
|
||||
2. Can .NET 10 run on the hosting package (hosting bundle or self-contained)? Decided by Bryan with the hosting provider.
|
||||
3. IIS production: one pass-through entry (ASP.NET Core Module, no static-file handler or HTML caching in IIS; in-process or out-of-process with `ForwardedHeaders:KnownProxies`), a Windows publish artifact and its own publish job. To be written down once the environment is known and tested against test-ASF.
|
||||
4. Hero and gallery: a separate plan (same-origin images with content-hash URLs, variants and dimensions, preload for LCP); the data model keeps room for it.
|
||||
|
||||
## Risks
|
||||
|
||||
Markers stripped by a build (confirmed not the case for ASF's Vite/TanStack prerender); proxy or IIS caching of HTML; .NET 10 unavailable on the package; the per-base-URL cache keyed from the Host header when no `PublicBaseUrl` is configured (to be capped in this unit); several app instances (invalidation is per process; the 60-second TTL bounds the lag). Estimated effort: about 1.5 days for the host side, plus ASF's front-end rework.
|
||||
@@ -0,0 +1,33 @@
|
||||
# CI builds and tests the master CMS only (ci-master-pipeline)
|
||||
|
||||
- **Slug**: ci-master-pipeline
|
||||
- **Type**: Feature (small, infrastructure), built outside the AI-DLC flow and documented afterwards
|
||||
- **Status**: Pushed on `feature/contact-forms-module` (commits 24168c6, ca46ce2, 612263e, ad8841a); first CI run with the new workflow pending
|
||||
- **Affected components**: `.gitea/workflows/continuous_integration.yaml`, `SlpModularCms.Ci.slnf`, `scripts/smoke-site.sh`, `SlpModularCms.Api` (+ Tests), `SlpModularCms.Core` (`CmsHost`, `CmsHostOptions`), site projects, `SlpModularCms.Modules.Contact.Tests`
|
||||
- **Documented**: 2026-11-15
|
||||
- **Documentation Language**: English
|
||||
- **Conversation Language**: Dutch (user language)
|
||||
|
||||
> Not run through the AI-DLC stages; this file records what the code does. Decision by Bryan (relayed by SLS-Main): the CI builds and tests the master CMS only; sites are thin compositions.
|
||||
|
||||
## Idea
|
||||
|
||||
`SlpModularCms.Api` is the master CMS: Core plus **every** module (Availability, Contact, Identity, Master, Offerings). The site projects (`Api.SlpSoftware`, `Api.AndreaSlopFotografie`, `Api.Slave`) only compose: a `Program.cs`, a list of module references and an `appsettings.json`. All behaviour lives in Core and the modules and is tested once, on the master host.
|
||||
|
||||
## What changed
|
||||
|
||||
| Area | Change |
|
||||
|---|---|
|
||||
| Website mode | `Website:Mode` (`SpaFallback` default, `PrerenderedPages`) from configuration (`CmsHostOptions.ResolveWebsiteMode`, decided once as `WebsiteModeSelection`). An unknown value stops the host. ASF sets `PrerenderedPages` in its own `appsettings.json`; no site chooses a mode in code. |
|
||||
| Master host | `SlpModularCms.Api` references all modules and has generic defaults for Website, Email, App, Contact and RateLimiting. |
|
||||
| Tests | The ASF test project is gone (18 tests moved, none lost). Site composition and committed defaults: `Api.Tests/SiteContractTests` (reads each site's csproj and appsettings.json, no build of the site). Site behaviour: the master host run with a site's committed settings on top (`AsfVariantPipelineTests`, `SiteVariantContactTests`). Contact pipeline tests and the OpenAPI snapshot run on the master `Api` (snapshot unchanged). |
|
||||
| CI | `backend-build`/`backend-test` use `SlpModularCms.Ci.slnf` (no site projects). `publish-sls-test` no longer runs on pull requests. `compile-sites` (not required) compiles the three site projects. After each test deploy `smoke-sls-test` / `smoke-asf-test` run `scripts/smoke-site.sh`. |
|
||||
| Branch protection | Required checks on `master`: `backend-test (pull_request)` and `frontend-test (pull_request)` only; the old `publish-test (pull_request)` requirement must be removed before the merge (see `docs/deploy-en-testomgevingen.md`). |
|
||||
|
||||
## Smoke test (`scripts/smoke-site.sh <url> <sls-test|asf-test>`)
|
||||
|
||||
Anonymous requests only: `/health`, public offerings, public banner (200 or 204), `/offerings/all` is 401, `X-Robots-Tag: noindex` and `robots.txt` disallow on a test host, the module list from `/api/v1/System/capabilities` (SLS: all five; ASF: without Master), SLS `/sitemap.xml` 404, ASF unknown path 404 (prerendered mode). A failing check fails the run.
|
||||
|
||||
## Safety net for composition errors
|
||||
|
||||
1. `SiteContractTests`: module references and committed defaults per site. 2. `compile-sites` on pull requests. 3. The smoke test after every test deploy. 4. Policy: production only for a commit that was green on that site's test host.
|
||||
Reference in New Issue
Block a user