# Technology Stack ## Backend ### Programming Languages - C# (latest for `net10.0`) — all backend projects. `Nullable` and `ImplicitUsings` enabled everywhere. ### Frameworks - .NET / ASP.NET Core `net10.0` — host, MVC controllers, middleware pipeline, static-file serving with SPA fallbacks. SDK observed: **10.0.301**. - ASP.NET Core Identity (`Microsoft.AspNetCore.Identity.EntityFrameworkCore` 10.0.9) — users, roles, password hashing and policy. - Entity Framework Core (`Microsoft.EntityFrameworkCore.SqlServer` 10.0.9, `…Design` 10.0.9) — three `DbContext` types over one connection string. - `Microsoft.AspNetCore.Authentication.JwtBearer` 10.0.9 — bearer token validation, `ClockSkew.Zero`. - `Asp.Versioning.Mvc` 10.0.0 — API version reporting alongside the static `/api/v1` prefix convention. - `Microsoft.AspNetCore.OpenApi` 10.0.9 + `Scalar.AspNetCore` 2.16.3 — OpenAPI document and `/scalar` reference UI, **Development only**. - `Microsoft.Extensions.Http.Resilience` 9.6.0 (with Polly) — retry/timeout pipeline for master→slave HTTP calls. Note: a 9.x package on a `net10.0` target. - ASP.NET Core Data Protection (shared framework) — encrypts slave API keys. Default file-system key ring; **no persistent key store configured**. - Built-in rate limiting (`Microsoft.AspNetCore.RateLimiting`) — fixed-window `login`, sliding-window `refresh`. ### Infrastructure - SQL Server — one database per instance. Local development via a container (`mcr.microsoft.com/mssql/server:2022-latest`) or LocalDB. - No cloud services, message broker, cache server or container orchestration is used. - Deployment target: shared hosting (e.g. mijnhostingpartner.nl) with a single site/application pool and **no server configuration**. The web SDK generates `web.config` on publish for IIS-based hosting. ### Build Tools - .NET SDK 10 / `dotnet` CLI — build, test, publish. - MSBuild — including the custom `BuildAndCopyAdminFrontend` target in `SlpModularCms.Api.csproj`, which makes **Node and pnpm hard prerequisites of `dotnet publish`**. - `dotnet ef` — migration authoring; per-module contexts need `--context` disambiguation (`AvailabilityDbContext`). ### Testing Tools - xUnit 2.9.3 with `xunit.runner.visualstudio` 3.1.4 and `Microsoft.NET.Test.Sdk` 17.14.1. - FluentAssertions 8.10.0 — assertions. - NSubstitute 5.3.0 — mocking. - AutoFixture 4.18.1 — test data. - `Microsoft.EntityFrameworkCore.InMemory` 10.0.9 — in-memory persistence for tests. - coverlet 6.0.4 (`coverlet.collector`) with `coverlet.runsettings` at the repository root. ## Frontend (admin SPA, `frontend/`) ### Programming Languages - TypeScript `~6.0.2` — all frontend code. ### Frameworks and Libraries - React 19.2 + React DOM 19.2. - Vite 8.0 with `@vitejs/plugin-react` 6 — build and dev server. `base: '/admin/'` on build only. - TanStack Router 1.170 — routing, `basepath: import.meta.env.BASE_URL` so it follows the `/admin/` base. - TanStack React Query 5.101 — server state. - Tailwind CSS 4.3 via `@tailwindcss/vite` — styling. - Radix UI primitives (dialog, dropdown-menu, label, select, slot) with shadcn-style wrappers; `class-variance-authority`, `clsx`, `tailwind-merge`. - `lucide-react` 1.21 — icons. `sonner` 2.0 — toasts. - `react-hook-form` 7.79 with `@hookform/resolvers` 5.4 and `zod` 4.4 — forms and validation. Zod also validates app config. - `i18next` 26 / `react-i18next` 17 / `i18next-browser-languagedetector` 8 — NL/EN. ### Build Tools - pnpm — package manager. Observed locally: pnpm 10.33.2, Node v22.15.1. (The README states Node 20+ and pnpm 9+ as the requirement.) - `tsc -b` runs before `vite build`, so type errors fail the build. ### Testing Tools - Vitest 4.1 with `@vitest/coverage-v8` and jsdom 29. - Testing Library: `@testing-library/react` 16.3, `jest-dom` 6.9, `user-event` 14.6. - MSW 2.14 — request mocking in tests, and optionally in the browser via `VITE_ENABLE_MSW=true`. ### Linting and Formatting - ESLint 10 with `typescript-eslint` 8.59, `eslint-plugin-react-hooks` 7, `eslint-plugin-react-refresh` 0.5. - Prettier 3.8 (`format`, `format:check` scripts, 4-space indent). - No linter or analyzer configuration exists for the backend beyond compiler nullable warnings. ## Observability **Not implemented.** The stack currently has: - Logging: default ASP.NET Core console provider only, configured through `Logging:LogLevel` (`Warning` in the production baseline, `Information` in Development). No structured logging, no log sink, no correlation IDs. - Error tracking: none — no Sentry package on either side. - Analytics: none — no Umami script or equivalent. - Uptime/health: no health-check endpoint, no `MapHealthChecks`. - Metrics/tracing: no OpenTelemetry. The intended stack for this feature — **UptimeRobot** for uptime, **Umami** for analytics, **console logging plus Sentry** for logging and errors — is therefore entirely greenfield in this repository. A working reference implementation of the Umami and Sentry parts (for a React/Vite frontend) exists in `K:\Development\SlpSoftware\Projects\SlpSoftware`. ## Environments Three environments are in scope: **local**, **test** and **production**. Configuration follows the three-file appsettings pattern (`appsettings.json`, `appsettings.Development.json`, gitignored `appsettings.local.json`), with production secrets supplied as environment variables using the `Section__Key` convention. There is currently no `appsettings.Test.json` or equivalent, and no `ASPNETCORE_ENVIRONMENT` value defined for a test environment.