Spensara Spensara Knowledge Base & Documentation Repository

Repository Docs & Knowledge Base

Consolidated Spensara documentation repository (722 Markdown & architecture documents in ../repository)
Built Word Documents (.docx): Spensara Overview (.docx) Capability Assessment (.docx) Brink POS Ingestion Analysis (.docx) The Borg Ingestion Architecture (.docx)

Implementation Specs (157)

Detailed engineering and feature implementation specifications.
implementation-specs/specs/BackendDatabaseConsolidation/TASK1.3.md 2,088 bytes · Updated Oct 23, 2026 10:44 AM EDT
Raw File

TASK 1.3: Wire Aspire host for Keycloak-backed local app configuration

Summary

Wire the Aspire AppHost so local application resources receive the Keycloak configuration they need to participate in the new auth flow.

This task covers the orchestration layer for local development, not the deeper auth logic inside backend or Laravel.

Dependencies

  • TASK 1.1 complete

Files to Modify

Likely files:

  • backend/Kds.Ai.AppHost/AppHost.cs
  • Front/Dockerfile or Front/Dockerfile.local if Aspire containerization needs a dedicated local image contract
  • Front environment/config files if they need explicit container-friendly Keycloak variable names documented for Aspire injection

Required Behavior

The Aspire host must:

  • define the local Keycloak resource needed by this slice,
  • pass required Keycloak settings to backend/Kds.Ai.ApiService, including values such as client id, client secret, authority/issuer, realm, and related local endpoints as needed by the chosen contract,
  • add the Laravel app from Front/ as an Aspire docker container resource,
  • pass the corresponding Keycloak settings and backend API service URL into the Laravel container as environment variables,
  • keep the local setup reproducible so backend, Front, and Keycloak start with compatible auth configuration from one AppHost.

Acceptance Criteria

  • [ ] Aspire AppHost provisions local Keycloak with stable local development settings
  • [ ] apiservice receives the Keycloak environment/config values required for auth validation
  • [ ] Laravel from Front/ is added to Aspire as a docker container resource
  • [ ] Laravel container receives the Keycloak environment/config values required for its login flow and the backend API service URL it should call
  • [ ] Local Aspire startup documents or encodes enough configuration to run the auth-connected stack without manual per-service patching

Notes

  • This task is specifically about local orchestration and configuration handoff.
  • Keep secrets and local defaults pragmatic for development, but make the contract explicit.