docs: add specification, design docs, mockups, wiki and deploy files
Prepare everything needed before development starts on Khaemhat, the ERP + CRM for Italian SMEs: - docs/SPEC.md: the original project specification, unchanged, plus CLAUDE.md with operational rules and amendments (Gitea instead of GitHub/GHCR, Docker image as the only deliverable). - ADR 0001-0011 for the baseline decisions. - Mockups: 22 high-resolution screens, the full gallery, 88 thumbnails cropped from it, mockup.css and an index. - Technical docs (architecture, data model, modules, API, MCP, deploy, security, development process, status with open spec questions). - Full draft wiki in docs/wiki (already published to the Gitea wiki). - Icons in assets/ and deploy files for Docker Compose and Unraid, pointing to the Gitea package registry. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
44fa273be5
commit
e746d99dab
207 files changed
+13496
-1
No files matched your search
@@ -0,0 +1,26 @@
|
||||
# ADR 0004 — Micro-ORM interno e migrazioni in C#
|
||||
|
||||
- **Stato:** accettata
|
||||
- **Data:** 2026-11-10
|
||||
- **Fonte:** SPEC §5.1–§5.3
|
||||
|
||||
## Contesto
|
||||
|
||||
Senza ORM esterni (ADR 0002) e con due motori (SQLite e PostgreSQL), l'accesso ai dati deve essere tipizzato,
|
||||
sicuro contro l'iniezione SQL e prevedibile nelle prestazioni.
|
||||
|
||||
## Decisione
|
||||
|
||||
- `Khaemhat.Data`: mappe esplicite per entità (`EntityMap<T>`), `QueryBuilder<T>` con traduzione di un sottoinsieme
|
||||
sicuro di espressioni, `Repository<T,TKey>` con concorrenza ottimistica (`row_version`), `UnitOfWork` con
|
||||
transazioni esplicite, SQL sempre parametrizzato.
|
||||
- Un provider per dialetto (`Khaemhat.Data.Sqlite`, `Khaemhat.Data.PostgreSql`): tipi, paginazione, upsert, lock.
|
||||
- Migrazioni in C# (`[Migration(yyyymmdd_nnn, "name")]`) con DDL generato per dialetto, catalogo di sistema e
|
||||
aziendale, tabella `schema_version` con checksum, nessun downgrade.
|
||||
- Decimali `numeric(19,6)` su PostgreSQL e interi scalati ×10⁶ su SQLite.
|
||||
|
||||
## Conseguenze
|
||||
|
||||
- Nessun codice sopra lo strato dati conosce il motore; i test girano su entrambi.
|
||||
- Le query pesanti (report, partitari) possono usare SQL scritto a mano per dialetto, sempre parametrizzato.
|
||||
- `docs/DATA-MODEL.md` si genera dalle mappe (`scripts/gen-datamodel.sh`).
|
||||
Reference in new issue
Block a user