feat(server): web server, interface shell, demo mode and Docker image (refs #11 #12 #13 #14 #15 #16 #17)
ci / test (postgres) (push) Successful in 2m22s
ci / test (sqlite) (push) Failing after 2m27s
ci / image (push) Skipped

Phase 1 completed on top of the library foundations:
- Server: startup state machine (config, first run, database down, schema,
  identity, ready) with an error page that retries by itself; the configured
  database is the only one ever opened, and a vanished SQLite file is never
  recreated. REST API and status WebSocket; session cookie auth, CSRF on
  every form and write call; desktop and demo answer only the computer itself.
- Interface: static Blazor rendering with plain forms (no interactive
  runtime), menu, top bar and phone bottom bar as in the mockups, light and
  dark themes with appendix C tokens and a contrast test, Panoramica, Diario,
  Rischio, Impostazioni; service pages for sign-in, first access, desktop
  first run and the database error page with its choices.
- Demo mode (tasks seed-demo): appendix F in a database of its own under the
  temp folder, frozen clock, never touches the configured installation.
- Docker: entrypoint gives /data to PUID:PGID and drops root with setpriv,
  HEALTHCHECK through bash /dev/tcp; proven with SQLite, PostgreSQL, a wrong
  configuration and a database that goes away and comes back.
- tasks screenshots drives the installed Edge/Chrome through DevTools for
  exact 1440 and 390 pixel shots; anubis db export|import on the command line.

Fixes from the independent review: return paths without control characters,
Host check against DNS rebinding, attempt limit counted before the check and
also on the error-page password, one-use TOTP codes and a code to switch the
second factor off, error-page choices serialized with the startup loop,
identity checked before migrating, restore restarts with "Ferma tutto" on,
damaged archives reported instead of crashing. Running the server tests on
PostgreSQL exposed pages rendered before their data arrived; data-loading
components now load first (LoadedComponent).

Decisions in ADR 0007. Tests: 100 on SQLite and on PostgreSQL.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Alby96andClaude Opus 5.5 committed 2026-11-10 12:40:15 +01:00
1 parent 53ca01b7c3
commit f9d71559e8
71 files changed
+5853 -80

No files matched your search

+21 -21
View File
@@ -53,30 +53,30 @@ Le basi su cui si appoggia tutto: piattaforma, database, sicurezza, guscio dell'
**Lavori**
- [ ] [#7](https://gitea.encke-hake.ts.net/BalboSoft/Anubis/issues/7) Strato di piattaforma: configurazione d'avvio Docker e desktop, cartella dei dati, identità dell'installazione
- [ ] [#8](https://gitea.encke-hake.ts.net/BalboSoft/Anubis/issues/8) Database portabile PostgreSQL/SQLite: tipi, accesso ADO.NET, migrazioni SQL
- [ ] [#9](https://gitea.encke-hake.ts.net/BalboSoft/Anubis/issues/9) Esportazione e importazione indipendenti dal motore; salvataggi notturni e prima delle migrazioni
- [ ] [#10](https://gitea.encke-hake.ts.net/BalboSoft/Anubis/issues/10) Nucleo: orologio iniettabile, bus degli eventi, pianificatore, impostazioni, segreti, registri strutturati
- [ ] [#11](https://gitea.encke-hake.ts.net/BalboSoft/Anubis/issues/11) Accesso e sicurezza: PBKDF2, sessioni, CSRF, limite tentativi, TOTP
- [ ] [#12](https://gitea.encke-hake.ts.net/BalboSoft/Anubis/issues/12) Scheletro delle API REST e del WebSocket
- [ ] [#13](https://gitea.encke-hake.ts.net/BalboSoft/Anubis/issues/13) Guscio dell'interfaccia: menu, barra superiore, temi, token grafici, formati italiani
- [ ] [#14](https://gitea.encke-hake.ts.net/BalboSoft/Anubis/issues/14) Schermate di servizio: accesso, primo avvio (Docker e desktop), pagina d'errore del database, prima parte di Impostazioni
- [ ] [#15](https://gitea.encke-hake.ts.net/BalboSoft/Anubis/issues/15) Modalità dimostrativa con i dati dell'appendice F (`tasks seed-demo`)
- [ ] [#16](https://gitea.encke-hake.ts.net/BalboSoft/Anubis/issues/16) Dockerfile definitivo con entrypoint (PUID/PGID, cartella dati, healthcheck)
- [ ] [#17](https://gitea.encke-hake.ts.net/BalboSoft/Anubis/issues/17) Chiusura della fase, revisione indipendente e tag `fase-1`
- [x] [#7](https://gitea.encke-hake.ts.net/BalboSoft/Anubis/issues/7) Strato di piattaforma: configurazione d'avvio Docker e desktop, cartella dei dati, identità dell'installazione
- [x] [#8](https://gitea.encke-hake.ts.net/BalboSoft/Anubis/issues/8) Database portabile PostgreSQL/SQLite: tipi, accesso ADO.NET, migrazioni SQL
- [x] [#9](https://gitea.encke-hake.ts.net/BalboSoft/Anubis/issues/9) Esportazione e importazione indipendenti dal motore; salvataggi notturni e prima delle migrazioni
- [x] [#10](https://gitea.encke-hake.ts.net/BalboSoft/Anubis/issues/10) Nucleo: orologio iniettabile, bus degli eventi, pianificatore, impostazioni, segreti, registri strutturati
- [x] [#11](https://gitea.encke-hake.ts.net/BalboSoft/Anubis/issues/11) Accesso e sicurezza: PBKDF2, sessioni, CSRF, limite tentativi, TOTP
- [x] [#12](https://gitea.encke-hake.ts.net/BalboSoft/Anubis/issues/12) Scheletro delle API REST e del WebSocket
- [x] [#13](https://gitea.encke-hake.ts.net/BalboSoft/Anubis/issues/13) Guscio dell'interfaccia: menu, barra superiore, temi, token grafici, formati italiani
- [x] [#14](https://gitea.encke-hake.ts.net/BalboSoft/Anubis/issues/14) Schermate di servizio: accesso, primo avvio (Docker e desktop), pagina d'errore del database, prima parte di Impostazioni
- [x] [#15](https://gitea.encke-hake.ts.net/BalboSoft/Anubis/issues/15) Modalità dimostrativa con i dati dell'appendice F (`tasks seed-demo`)
- [x] [#16](https://gitea.encke-hake.ts.net/BalboSoft/Anubis/issues/16) Dockerfile definitivo con entrypoint (PUID/PGID, cartella dati, healthcheck)
- [x] [#17](https://gitea.encke-hake.ts.net/BalboSoft/Anubis/issues/17) Chiusura della fase, revisione indipendente e tag `fase-1`
**Criteri di accettazione**
- [ ] Accesso funzionante
- [ ] Il guscio corrisponde ai mockup per menu e barra superiore a 1440 px e per barra superiore e barra in basso a 390 px (screenshot allegati)
- [ ] I formati numerici superano i test
- [ ] L'immagine si costruisce e parte con `ANUBIS_DB_ENGINE=sqlite` e con `postgres`
- [ ] Con una configurazione mancante o sbagliata compare la pagina d'errore e non nasce alcun altro database
- [ ] Staccando il database compare la pagina d'errore e al ritorno l'applicazione riprende da sola
- [ ] La stessa batteria di test passa su entrambi i motori
- [ ] Un archivio esportato da un motore e importato nell'altro dà gli stessi conteggi
- [ ] Con la configurazione desktop il server parte da una cartella dei dati vuota e la chiave dei segreti non finisce in `config.toml`
- [ ] La modalità dimostrativa non tocca il database configurato (test)
- [x] Accesso funzionante
- [x] Il guscio corrisponde ai mockup per menu e barra superiore a 1440 px e per barra superiore e barra in basso a 390 px (screenshot allegati)
- [x] I formati numerici superano i test
- [x] L'immagine si costruisce e parte con `ANUBIS_DB_ENGINE=sqlite` e con `postgres`
- [x] Con una configurazione mancante o sbagliata compare la pagina d'errore e non nasce alcun altro database
- [x] Staccando il database compare la pagina d'errore e al ritorno l'applicazione riprende da sola
- [x] La stessa batteria di test passa su entrambi i motori
- [x] Un archivio esportato da un motore e importato nell'altro dà gli stessi conteggi
- [x] Con la configurazione desktop il server parte da una cartella dei dati vuota e la chiave dei segreti non finisce in `config.toml`
- [x] La modalità dimostrativa non tocca il database configurato (test)
## Fase 2 — Dati di mercato