Deliver portable native Architecture B deployment and final verification

This commit is contained in:
Steffen committed 2026-10-14 16:32:20 +02:00
1 parent f451b55de1
commit 36740d2492
92 files changed
+10939 -926

No files matched your search

+24 -31
View File
@@ -1,45 +1,38 @@
# HealthAppRepositoryB
# Health App Architecture B
## Project Purpose
Architecture B implements the approved modular monolith: one ASP.NET Core HTTPS application, typed Profile/Observations/Analytics/Overview/Guidance modules, and one PostgreSQL database with owned schemas. API/access enforces normalized patient/professional identity and actual resource ownership. Numerical calculations, clinical content and public REST/JSON semantics are preserved from the pinned Architecture A reference, with the approved US-16 and dependency-failure revisions.
HealthAppRepositoryB is part of a Master's thesis in IT investigating the use of Large Language Models (LLMs) for software architecture design and energy efficiency.
Approval and implementation evidence are in [ImplementationPlan](ImplementationPlan/implementation-plan.md); the authoritative target remains [ArchitectureProposal](ArchitectureProposal/software-architecture.md). [Approval decisions](Docs/ApprovalRequirements/architecture-b-implementation-approval.md) include portable Linux installation. Input requirements/diagrams and the original repository remain unchanged. No frontend, identity server, background worker, broker or clinical-result store was introduced.
The research question is:
## Build and test
> To what extent can Large Language Models be used to identify and suggest changes to an existing software architecture that result in measurable improvements in the energy efficiency of the implemented system?
Use the .NET 10 SDK selected by `global.json`:
## Project Objective
```bash
dotnet restore HealthApp.slnx
dotnet build HealthApp.slnx -c Release
TEST_POSTGRES_CONNECTION='Host=127.0.0.1;Database=postgres;Username=TEST_ADMIN;Password=YOUR_TEST_PASSWORD' \
dotnet test HealthApp.slnx -c Release
```
The purpose of this repository is to develop a software architecture for the Health App based on its documented functional requirements, domain concepts, and relevant constraints.
Optional automatic disposable-server harness: `HEALTHAPP_DOTNET=/path/to/dotnet python3 tools/run-disposable-tests.py` (requires administrative Docker access for test infrastructure only).
An LLM-based architecture agent is tasked with evaluating architectural alternatives and designing an architecture that satisfies the application's requirements while considering energy efficiency as an important design objective.
Use only a disposable test PostgreSQL server with create/drop database and role permissions. Fixtures create isolated databases and DML-only runtime roles, apply module schema scripts twice, exercise real Kestrel HTTP, and remove their own resources. Do not point tests at Architecture A or production databases. Framework/provider/EF/xUnit versions remain pinned; no algorithm replacement or technology migration is included.
The resulting architecture may resemble or differ from the original Health App architecture. Architectural decisions must be justified by their suitability rather than by novelty.
The unchanged executable source/test baseline lives under [Reference/ArchitectureA](Reference/README.md), copied from `2117236366130775214d9fd2611984d4348f2b79`. It is excluded from the final B solution and preserves original architecture-specific tests. Never build/test in `../HealthAppRepository/`.
## Research Context
## Deploy and run
This repository represents the architecture-design work associated with the thesis.
```bash
bash deploy/build-release.sh --output NEW_RELEASE_DIRECTORY
# In the new bundle on a supported systemd Linux host:
sudo bash install.sh --host YOUR_DNS_OR_IP
```
The original Health App serves as the reference system. The proposed architecture will be evaluated for its feasibility and potential energy-related consequences, with the intention of supporting a later empirical comparison.
The installer supplies dependencies, fresh database/roles/schemas, protected secrets/configuration, generated or supplied HTTPS certificate, persistent token keys, migrations and `healthapp-b.service`. It verifies representative operations and application stop/restart without stopping PostgreSQL. Remote database mode requires verified TLS/hostname and installs no local PostgreSQL. See [installation guide](deploy/INSTALLATION.md).
Energy-efficiency benefits suggested during architecture design are hypotheses, not established measurements.
For an already provisioned B development database, supply external accounts/assignments, connection, key directory and HTTPS settings through `HEALTHAPP_CONFIGURATION_FILE=/absolute/protected/appsettings.json` or normal .NET configuration. [Configuration example](deploy/appsettings.example.json) is illustrative, not a prepared credential file. Production rejects plain HTTP. Use `dotnet run --project src/HealthApp -c Release`; the app never applies migrations itself.
## Repository Structure
[Trend methods](src/TRENDS.md) describe unchanged formulas, timestamp ties, full-period direction/variation and clinical limits. [Conformance](ImplementationPlan/architecture-conformance.md), [functional verification](ImplementationPlan/functional-equivalence.md) and [test adaptations](ImplementationPlan/test-adaptations.md) distinguish executed evidence from limitations. Native Debian 12 systemd local/remote installation was exercised in isolated Linux environments; other distribution adapters are intended support with explicit prerequisites.
- `AGENT.md` — Instructions and constraints for the architecture-design agent.
- `Docs/` — Functional requirements, domain information, existing design documentation, and relevant constraints.
- `ArchitectureProposal/` — Architecture specifications, editable Draw.io diagrams, architectural decisions, requirements traceability, and supporting documentation produced by the agent.
## Scope
The architecture-design work focuses on software architecture and system-level decisions, including component boundaries, communication, data management, persistence, deployment, and architectural patterns.
Code-level optimization, algorithm replacement, and LLM training or inference energy consumption are outside the research scope.
The architecture-design agent does not implement application code. Its responsibility is to produce a coherent, justified, and sufficiently detailed software architecture.
## Research Status
**Current phase:** Architecture design.
The repository preserves the documentation and agent instructions used as input to the architectural design process.
This repository remains part of the thesis research. Installation/testing is not an energy experiment or clinical certification. [Measurement context](ImplementationPlan/measurement-context.md) records environment differences and equivalent reproducible synthetic dataset setup. Clinical classifications are preserved for comparison; uncertain provenance is documented without asserting new clinical validity.