spike(CXSPA-13856): Compare approaches. - #21792
Conversation
🚨 PR Title Validation Failed 🚨Your pull request title does not follow the required format. Please update it to match the expected pattern: Expected format: Allowed Types
Example of a valid PR title✅ ❌ Merge is blocked until the PR title is corrected. |
2 similar comments
🚨 PR Title Validation Failed 🚨Your pull request title does not follow the required format. Please update it to match the expected pattern: Expected format: Allowed Types
Example of a valid PR title✅ ❌ Merge is blocked until the PR title is corrected. |
🚨 PR Title Validation Failed 🚨Your pull request title does not follow the required format. Please update it to match the expected pattern: Expected format: Allowed Types
Example of a valid PR title✅ ❌ Merge is blocked until the PR title is corrected. |
Spike: base-site detection for SSR request handlers
(robots.txt, llms.txt, .well-known). Full analysis + recommendation in the ADR.
Example implementations of resolving
baseSiteIdat the SSR layer, comparing three approaches:fetch()to OCC/basesites+ a copiedJava→JS regex converter + in-memory cache, resolved in an Express handler. No Angular.
createApplication(): boots a minimal Angular app once at startup to get apersistent DI injector, queried from an Express handler. (Recommended target: reuse the real
JavaRegExpConverter+OccSiteAdapterthrough the injector — no logic duplication.)provideX): reuses all existing resolution(
SiteContextConfigInitializer) via a server-side provider; AI-SEO handlers become Angular routes.Recommendation: Approach B — the only one that both reuses Spartacus' real resolution and is
callable from the Express serving layer (A =
req.hostnamehand-wave; C resolves but can't serveclean text/plain — CommonEngine renders an HTML shell).
Switch active approach via the tagged blocks in
server.ts/app.config.server.ts.ADR:
branch: spike/base-site-detection-approaches
file: spartacus-requirements/spartacus-classic/adr-base-site-detection-ssr.md