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,24 @@
|
||||
# ADR 0005 — SQLite e PostgreSQL, un database per azienda
|
||||
|
||||
- **Stato:** accettata
|
||||
- **Data:** 2026-11-10
|
||||
- **Fonte:** SPEC §1.3, §1.4, §5.4
|
||||
|
||||
## Contesto
|
||||
|
||||
Le installazioni vanno dalla demo su un portatile all'azienda con centinaia di GB di dati. Più aziende devono poter
|
||||
convivere sulla stessa istanza con amministrazione condivisa ma dati separati.
|
||||
|
||||
## Decisione
|
||||
|
||||
- **SQLite** per test, demo, prova e archivi in sola lettura; **PostgreSQL ≥ 16** (consigliato 17) per l'uso reale.
|
||||
- **Un database per azienda**: le tabelle operative non hanno `company_id`. Il database dell'azienda contiene anche
|
||||
i suoi utenti, ruoli, preferenze, metadati degli allegati e audit.
|
||||
- Le connection string delle aziende stanno cifrate nel database di sistema (`sys_companies`, AES-256-GCM con
|
||||
`KHAEMHAT_SECRET_KEY`); il `CompanyRegistry` risolve codice → motore e connessione.
|
||||
|
||||
## Conseguenze
|
||||
|
||||
- Isolamento forte tra aziende; backup, ripristino, clonazione ed eliminazione per azienda.
|
||||
- Le query tra aziende diverse non sono possibili per costruzione.
|
||||
- Le migrazioni si applicano a ogni database aziendale, all'avvio o da amministrazione.
|
||||
Reference in new issue
Block a user