Gives the company tables of the previous commit their screens, so a company
can be configured from the browser, and makes the base data runnable outside
the web server.
- one generic editor for the 26 coded tables (/tabelle/<slug>), described in
TableScreens: grid with active/disabled filter, detail with errors and
warnings, disable instead of delete, CSV export and all-or-nothing import,
"update from base tables"; index page and menu entries
- company profile in tabs with the fiscal pack checks, fiscal years with
month lock/unlock, exchange rates with manual rates
- PaymentTermService: installments saved together, percentages must sum to 100
- a new profile proposes the registered company name instead of its code
- seed verb in Khaemhat.Web and scripts/seed.sh --base [--company CODE],
shipped in the image under /app/scripts
- ADR 0026 (base data only adds missing codes; ISTAT and ABI/CAB lists come
as separate datasets), wiki, CHANGELOG, STATUS
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every later milestone stores its data through this layer, so it has to behave the same on both engines and be safe
by construction:
- Khaemhat.Data: explicit entity maps, typed queries over a safe expression subset, SqlFragment where every
interpolated value becomes a parameter, unit of work with transactions, repositories with audit columns and
optimistic concurrency on row_version, retries on transient errors.
- SQLite provider (STRICT tables, WAL, exact decimals as integers scaled by 10^6, Unicode case-insensitive LIKE,
serialised writes) and PostgreSQL 16+ provider (numeric(19,6), timestamptz, jsonb, advisory locks, database
creation and server info). Databases are configured from postgres:// and sqlite:// URLs whose password never
appears in messages.
- C# migrations with system and company catalogues, schema_version with checksums, one transaction per migration
under a lock, refusal of unknown applied versions; first system tables sys_companies and sys_settings.
- CompanyRegistry stores each company's database URL encrypted with the instance key (AES-256-GCM, HKDF-derived key,
purpose as associated data), so a copied row cannot be read for another company.
- tools/Khaemhat.DataModelTool, scripts/gen-datamodel.sh and scripts/new-migration.sh: the current schema section of
docs/DATA-MODEL.md is generated from the migrations and a test fails when it is stale.
- C# 14 binds array.Contains to MemoryExtensions over spans; the query translator unwraps the span conversion.
- Tests run every data scenario on SQLite and PostgreSQL (PostgreSQL in CI); ADR 0018 records where the contracts
differ from SPEC 5.1. Docs, wiki, changelog and status updated.
Closes#7, #8, #9, #10, #11, #12, #13, #14
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Start development with the skeleton every later milestone builds on, so
that code, image and release path exist and are verified from day one.
- Khaemhat.sln with the ten projects of SPEC section 3 and six MSTest
projects; shared build rules with warnings as errors, analyzers and
Central Package Management restricted to the allowlist.
- Architecture tests and scripts/check-packages.sh fail on any project
reference or package that SPEC does not allow.
- Khaemhat.Web serves an Italian "under construction" page with the
official icons and version, plus /health/live, /health/ready and
/health (ADR 0012); honours KHAEMHAT_URLS and KHAEMHAT_LOG_LEVEL.
- docker/Dockerfile (non-root app user aligned to PUID/PGID by the
entrypoint, pg_dump 17, healthcheck, OCI and Unraid labels) and
compose files for PostgreSQL and a standalone SQLite demo.
- Gitea Actions: ci.yml (build, tests, image smoke test, PostgreSQL
16/17 on tags, YAML check), release.yml (image and release from a
vX.Y.Z tag, skipping versions already published) and wiki.yml.
- Development scripts, VS Code launch/tasks for debugging, and ADR
0012-0017 deciding the M0 open points of docs/STATUS.md.
Closes#1, #2, #3, #4, #5, #114
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>