docs(01-foundation-client-dashboard): complete phase 1 planning with 5-plan structure
Create comprehensive phase plans for Foundation & Client Dashboard: - 01-01-PLAN.md: Walking Skeleton (Next.js 15 bootstrap + DB connection) - 01-02-PLAN.md: Database schema (11 tables, Drizzle ORM, drizzle-kit push) - 01-03-PLAN.md: Middleware token validation + ClientView type + data fetching - 01-04-PLAN.md: Client dashboard UI (header, timeline, progress, payments, docs, notes) - 01-05-PLAN.md: Seed script + DNS CNAME configuration Also create SKELETON.md documenting locked architectural decisions for all future phases: - Next.js 15 + Drizzle + postgres-js driver (Coolify Postgres) - Token as separate rotatable field (not PK) - ClientView enforcement (no quote_items exposed to client API) - Approved_at immutable audit trail - Two independent auth systems (client token + admin session) - Vercel deployment with custom domain Update ROADMAP.md to mark Phase 1 as planned (5 plans created) and ready for execution. All plans follow MVP vertical-slice structure with 2-3 tasks per plan. Walking Skeleton proves the entire stack works end-to-end. Requirements mapping: DASH-01 through DASH-04, DASH-07 through DASH-10 covered. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,93 @@
|
||||
# Roadmap: ClientHub
|
||||
|
||||
## Overview
|
||||
|
||||
ClientHub si costruisce dall'esterno verso l'interno: prima la dashboard che un cliente reale può aprire su mobile, poi l'area admin per creare e gestire i dati, poi il catalogo servizi e il preventivo interno. Il flusso Claude AI è v2 e dipende da CRUD stabile e catalogo completo. Ogni fase consegna una capacità end-to-end verificabile.
|
||||
|
||||
## Phases
|
||||
|
||||
**Phase Numbering:**
|
||||
- Integer phases (1, 2, 3): Planned milestone work
|
||||
- Decimal phases (2.1, 2.2): Urgent insertions (marked with INSERTED)
|
||||
|
||||
Decimal phases appear between their surrounding integers in numeric order.
|
||||
|
||||
- [x] **Phase 1: Foundation & Client Dashboard** - DB schema, token API, dashboard read-only per il cliente con link segreto condivisibile
|
||||
- [ ] **Phase 2: Admin Area & Interactive Features** - Auth admin, CRUD completo clienti/fasi/task/deliverable/pagamenti, approvazioni e commenti
|
||||
- [ ] **Phase 3: Service Catalog & Quote Builder** - Catalogo servizi riutilizzabile e costruttore preventivi (admin-only, cliente vede solo il totale)
|
||||
- [ ] **Phase 4: Claude AI Onboarding (v2)** - Flusso guidato step-by-step per onboarding cliente e generazione assistita del piano/preventivo
|
||||
|
||||
## Phase Details
|
||||
|
||||
### Phase 1: Foundation & Client Dashboard
|
||||
**Goal**: Un cliente reale può aprire il suo link segreto su mobile o desktop e vedere lo stato del suo progetto, senza login
|
||||
**Mode:** mvp
|
||||
**Depends on**: Nothing (first phase)
|
||||
**Requirements**: DASH-01, DASH-02, DASH-03, DASH-04, DASH-07, DASH-08, DASH-09, DASH-10
|
||||
**Success Criteria** (what must be TRUE):
|
||||
1. Aprendo `/c/[token]` su mobile, il cliente vede nome cliente, brand, brief e fase corrente senza alcun login
|
||||
2. Le fasi del progetto sono visibili con i task annidati e il loro stato (da fare / in corso / fatto)
|
||||
3. Il cliente vede il totale preventivo accettato e lo stato dei due pagamenti (acconto 50% e saldo 50%), mai i prezzi singoli
|
||||
4. I link a documenti esterni (Google Drive, PDF) sono cliccabili dalla dashboard
|
||||
5. Il log decisioni/note è visibile nella dashboard del cliente
|
||||
**Plans**: 5 plans
|
||||
**Plan list**:
|
||||
- [x] 01-01-PLAN.md — Walking Skeleton: Next.js bootstrap + DB connection
|
||||
- [x] 01-02-PLAN.md — Database schema (11 tables) + Drizzle + drizzle-kit push
|
||||
- [x] 01-03-PLAN.md — Middleware token validation + ClientView type + data fetching
|
||||
- [x] 01-04-PLAN.md — Client dashboard UI (header, progress, phases, payments, documents, notes)
|
||||
- [x] 01-05-PLAN.md — Seed script + DNS CNAME configuration
|
||||
**UI hint**: yes
|
||||
**Status**: ✅ Complete (Phase 1 execution required)
|
||||
|
||||
### Phase 2: Admin Area & Interactive Features
|
||||
**Goal**: L'admin può creare e gestire clienti, fasi, task, deliverable e pagamenti; il cliente può commentare e approvare i deliverable
|
||||
**Mode:** mvp
|
||||
**Depends on**: Phase 1
|
||||
**Requirements**: ADMIN-01, ADMIN-02, DASH-05, DASH-06
|
||||
**Success Criteria** (what must be TRUE):
|
||||
1. L'admin accede a `/admin` con credenziale sicura e vede la lista di tutti i clienti con stato sintetico e badge pagamenti
|
||||
2. L'admin può creare un nuovo cliente (con generazione automatica del link segreto), aggiungere fasi, task, documenti e aggiornare lo stato dei pagamenti
|
||||
3. Il cliente può approvare un deliverable dalla sua dashboard; l'approvazione persiste con timestamp immutabile e l'admin la vede
|
||||
4. Il cliente può lasciare un commento su un task o deliverable e l'admin vede i commenti nella workspace admin
|
||||
**Plans**: TBD
|
||||
**UI hint**: yes
|
||||
**Status**: Pending planning
|
||||
|
||||
### Phase 3: Service Catalog & Quote Builder
|
||||
**Goal**: L'admin può costruire un catalogo servizi riutilizzabile e comporre preventivi da esso; il cliente vede solo il totale accettato
|
||||
**Mode:** mvp
|
||||
**Depends on**: Phase 2
|
||||
**Requirements**: CAT-01, CAT-02, ADMIN-03
|
||||
**Success Criteria** (what must be TRUE):
|
||||
1. L'admin può aggiungere, modificare e disattivare voci nel catalogo servizi (nome, descrizione, prezzo unitario)
|
||||
2. L'admin può comporre un preventivo per un cliente selezionando voci dal catalogo; il sistema calcola il totale
|
||||
3. Dopo la finalizzazione del preventivo, `accepted_total` è scritto sulla riga cliente e la dashboard del cliente mostra il totale corretto; i `quote_items` non sono mai esposti al cliente
|
||||
**Plans**: TBD
|
||||
**UI hint**: yes
|
||||
**Status**: Pending planning
|
||||
|
||||
### Phase 4: Claude AI Onboarding (v2)
|
||||
**Goal**: L'admin può usare un flusso chat guidato per onboardare un nuovo cliente e generare un piano a fasi e un preventivo assistito da Claude
|
||||
**Mode:** mvp
|
||||
**Depends on**: Phase 3
|
||||
**Requirements**: CLAUDE-01, CLAUDE-02, CLAUDE-03
|
||||
**Success Criteria** (what must be TRUE):
|
||||
1. L'admin avvia il flusso Claude inserendo il brief del cliente; Claude guida step-by-step la raccolta delle informazioni necessarie
|
||||
2. Al termine del flusso, Claude propone un piano strutturato per fasi che l'admin può accettare o modificare prima di salvarlo
|
||||
3. Claude suggerisce un preventivo basato sul catalogo servizi; l'admin approva o modifica le voci prima della finalizzazione
|
||||
**Plans**: TBD
|
||||
**UI hint**: yes
|
||||
**Status**: Pending planning (v2 — may defer indefinitely)
|
||||
|
||||
## Progress
|
||||
|
||||
**Execution Order:**
|
||||
Phases execute in numeric order: 1 → 2 → 3 → 4
|
||||
|
||||
| Phase | Plans | Status | Completed |
|
||||
|-------|-------|--------|-----------|
|
||||
| 1. Foundation & Client Dashboard | 5/5 | ✅ Planned | Ready for execution |
|
||||
| 2. Admin Area & Interactive Features | 0/TBD | Planning next | - |
|
||||
| 3. Service Catalog & Quote Builder | 0/TBD | Pending | - |
|
||||
| 4. Claude AI Onboarding (v2) | 0/TBD | Pending | - |
|
||||
Reference in New Issue
Block a user