initial commit
This commit is contained in:
69
docs/development/devlog/2025-12-15-111000_initial_plan.md
Normal file
69
docs/development/devlog/2025-12-15-111000_initial_plan.md
Normal file
@@ -0,0 +1,69 @@
|
||||
# Piano di Sviluppo - Zentral (OBIS Safety)
|
||||
Data: 2025-12-15
|
||||
Stato: Pianificazione Iniziale
|
||||
|
||||
## Obiettivo
|
||||
Creare una Web App SaaS ("Zentral") per la gestione della formazione sicurezza OBIS, sostituendo Excel con un sistema automatizzato.
|
||||
|
||||
## 1. Architettura del Sistema
|
||||
|
||||
### Backend (Node.js)
|
||||
- **Framework**: Express.js con TypeScript.
|
||||
- **Struttura**: Modulare (vedi `src/backend/src/modules`).
|
||||
- **Database**:
|
||||
- **ORM**: Prisma (Supporto nativo per SQLite in dev e PostgreSQL in prod).
|
||||
- **Dev**: SQLite (`dev.db`).
|
||||
- **Prod**: PostgreSQL.
|
||||
- **API**: RESTful standard `api/[modulo]/[risorsa]`.
|
||||
- **Sicurezza**: Helmet, CORS, input validation (Zod/Joi), password hashing (Argon2/Bcrypt).
|
||||
|
||||
### Frontend (React)
|
||||
- **Build Tool**: Vite.
|
||||
- **Linguaggio**: TypeScript.
|
||||
- **UI/UX**:
|
||||
- Design System: Custom basato su "Material Design" ma con estetica "Premium" (colori vibranti, glassmorphism).
|
||||
- Styling: Vanilla CSS (Variabili CSS per temi) + CSS Modules per scoping.
|
||||
- Componenti: React standard.
|
||||
- **Stato**: React Context + Hooks per gestione globale semplice.
|
||||
|
||||
## 2. Roadmap di Implementazione
|
||||
|
||||
### Fase 1: Setup e Fondamenta (Oggi)
|
||||
- [x] Inizializzazione Repository e Cartelle (`src/backend`, `src/frontend`).
|
||||
- [x] Setup Backend: Express, Prisma, Struttura Modulare base.
|
||||
- [x] Setup Frontend: Vite React, Configurazione CSS Base (Design Tokens), Layout App Shell (Sidebar, Header).
|
||||
- [x] Configurazione Database iniziale (Schema Prisma: User, Company preliminary).
|
||||
|
||||
### Fase 2: Gestione Anagrafiche
|
||||
- [x] Modulo Aziende (Companies): CRUD, Sedi.
|
||||
- [x] Modulo Lavoratori (Workers): CRUD, Associazione Azienda.
|
||||
- [x] UI per Anagrafiche: Tabelle moderne, Form di inserimento laterali o modali.
|
||||
|
||||
### Fase 3: Core Formazione
|
||||
- [x] Modulo Corsi (Courses): Catalogo, tipologie, validità.
|
||||
- [x] Modulo Eventi (TrainingEvents): Gestione eventi, upload attestati (Parziale).
|
||||
- [x] Logica Calcolo Scadenze (Service layer dedicate).
|
||||
|
||||
### Fase 4: Scadenzario e Dashboard
|
||||
- [x] Dashboard KPI: Grafici di copertura.
|
||||
- [x] Scadenzario: Datatable avanzata (Filtri, Sort, Export Excel).
|
||||
|
||||
### Fase 5: Notifiche e Comunicazioni
|
||||
- [x] Sistema Code Mail (Redis/Bull o tabella DB semplice per MVP).
|
||||
- [x] Template Engine (Mock/Simple).
|
||||
- [x] Workflow approvazione manuale invii.
|
||||
|
||||
## 3. Modello Dati Preliminare (Schema ER semplificato)
|
||||
|
||||
- **Company**: id, name, vatNumber, email, phone, status...
|
||||
- **Site**: id, companyId, address, city...
|
||||
- **Worker**: id, companyId, siteId, firstName, lastName, taxCode (CF), jobTitle, status...
|
||||
- **Course**: id, title, type, validityYears, hasPostExpiryReminder...
|
||||
- **TrainingEvent**: id, workerId, courseId, eventDate, expiryDate, provider, status (Valid/Expiring/Expired), certificateUrl...
|
||||
- **Notification**: id, companyId, type (Pre/At/Post), status (Pending/Sent/Error), scheduledDate...
|
||||
|
||||
## 4. Azioni Immediate
|
||||
1. Creare struttura cartelle.
|
||||
2. Inizializzare Backend (`npm init`, installazione dipendenze base).
|
||||
3. Inizializzare Frontend (`npm create vite`).
|
||||
4. Definire Schema Prisma iniziale.
|
||||
Reference in New Issue
Block a user