Files
slp-modular-cms/aidlc-docs/features/slpsoftware-api/construction/slpsoftware-client-setup/infrastructure-design/deployment-architecture.md
T
SluijsensandClaude Sonnet 5 fa389e42ee
Continuous Integration / config (pull_request) Successful in 11s
Continuous Integration / changes (pull_request) Successful in 21s
Continuous Integration / backend-build (pull_request) Successful in 6m10s
Continuous Integration / vulnerability-scan (pull_request) Successful in 4m59s
Continuous Integration / frontend-prepare (pull_request) Successful in 1m27s
Continuous Integration / backend-test (pull_request) Failing after 7m48s
Continuous Integration / frontend-build (pull_request) Successful in 2m5s
Continuous Integration / frontend-test (pull_request) Successful in 4m24s
Continuous Integration / frontend-lint (pull_request) Successful in 2m0s
Continuous Integration / publish-test (pull_request) Skipped
Continuous Integration / publish-production (pull_request) Skipped
Continuous Integration / deploy-test (pull_request) Skipped
Continuous Integration / deploy-production (pull_request) Skipped
Adds SlpModularCms.Api.SlpSoftware and extracts shared CmsHost composition
Unit 1 of the slpsoftware-api feature (FR-1/FR-2/FR-3): a new Client project
in the Clients solution folder, intended to eventually become the deployed
API for test.slpsoftware.nl/slpsoftware.nl, hosting the same four modules as
SlpModularCms.Api plus a future Offerings module.

- Extracts SlpModularCms.Api/Program.cs's hosting-pipeline composition into
  SlpModularCms.Core.Hosting.CmsHost (ConfigureServices/ConfigurePipeline),
  shared by both Client projects so they cannot drift apart
- Moves StaticContentExtensions.cs + WebsitePlaceholder.html from Api into
  Core, since CmsHost cannot live in Api but Core cannot depend on Api
- Adds SlpModularCms.Api.SlpSoftware with its own isolated local dev database
  and dev ports (5286/7223, distinct from Api's and Api.Slave's)
- Adds SlpModularCms.Api.Tests with WebApplicationFactory-based pipeline
  regression tests (security headers, health check, SPA fallback, rate
  limiting), scoped to Api per NFR Design
- Adds a frontend dev:slpsoftware pnpm script mirroring dev:slave
- Fixes GlobalExceptionHandler logging routine 401s (e.g. an expired/missing
  refresh token) as unhandled errors -- pre-existing, unrelated to this
  feature's own scope, found while testing the new instance

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FWyStNL2ZsjrS7FLd7xvvN
2026-08-02 01:28:39 +02:00

2.9 KiB

Deployment Architecture — Unit: SlpSoftware Client Setup

Status note: this diagram documents the target state after the Operations-phase cutover (D-15) — it is reference/planning context for Code Generation, not something this unit deploys itself. No infrastructure changes happen as part of this Construction stage.

graph TD
    visitor["Site Visitor / CMS Administrator browser"]
    proxy["Proxy Pi<br/>nginx + TLS (certbot)"]
    pimain["pi-main<br/>systemd --user"]
    svc_test["slpsoftware-test.service<br/>port 5100"]
    svc_prod["slpsoftware-production.service<br/>port 5101"]
    dll["SlpModularCms.Api.SlpSoftware.dll<br/>(replaces Api.dll at cutover)"]
    db["MariaDB<br/>SlpSoftwareTest / SlpSoftwareProduction"]
    sentry["Sentry (shared project)"]

    visitor -->|"HTTPS"| proxy
    proxy -->|"proxy_pass, plain HTTP over LAN"| pimain
    pimain --> svc_test
    pimain --> svc_prod
    svc_test --> dll
    svc_prod --> dll
    dll -->|"EF Core / MariaDB provider"| db
    dll -->|"error/event reporting"| sentry

    classDef external fill:#e9d8fd,stroke:#553c9a,stroke-width:2px,color:#000000,font-weight:bold;
    classDef proxy fill:#bee3f8,stroke:#2b6cb0,stroke-width:2px,color:#000000,font-weight:bold;
    classDef compute fill:#fefcbf,stroke:#b7791f,stroke-width:2px,color:#000000,font-weight:bold;
    classDef data fill:#c6f6d5,stroke:#2f855a,stroke-width:2px,color:#000000,font-weight:bold;

    class visitor external;
    class proxy proxy;
    class pimain,svc_test,svc_prod,dll compute;
    class db,sentry data;

    linkStyle default stroke:#666666,stroke-width:2px;

Text alternative: a visitor's browser reaches the proxy Pi over HTTPS, which forwards plain HTTP over the LAN to pi-main; pi-main runs two systemd-managed instances (test on port 5100, production on port 5101), both eventually running SlpModularCms.Api.SlpSoftware.dll after the cutover, each talking to its own MariaDB database and the shared Sentry project (purple = external actor, blue = the TLS-terminating proxy, yellow = compute/hosting, green = data/observability backends).

Local Development (Current Scope of This Unit)

graph LR
    dev["Developer machine"]
    api["SlpModularCms.Api<br/>(existing dev host)"]
    apislp["SlpModularCms.Api.SlpSoftware<br/>(new, this unit)"]
    dbA["Local DB: Api"]
    dbB["Local DB: Api.SlpSoftware (isolated)"]

    dev --> api
    dev --> apislp
    api --> dbA
    apislp --> dbB

    classDef dev fill:#fefcbf,stroke:#b7791f,stroke-width:2px,color:#000000,font-weight:bold;
    classDef data fill:#c6f6d5,stroke:#2f855a,stroke-width:2px,color:#000000,font-weight:bold;

    class dev,api,apislp dev;
    class dbA,dbB data;

    linkStyle default stroke:#666666,stroke-width:2px;

Text alternative: locally, Api and the new Api.SlpSoftware each connect to their own separate, isolated database (decision Q1 = B) — no shared local dev data between the two.