03898f2a59
- Archive v2.0 phases (07-10) under .planning/milestones/ - v2.1 REQUIREMENTS/ROADMAP (Phases 11-17: Offer Studio + Proposal AI) - DESIGN-SYSTEM.md (database-view UI contract for Phases 11-14) - Phase 11 CONTEXT, DISCUSSION-LOG, PATTERNS Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
10 KiB
10 KiB
Requirements — ClientHub v2.0 Business Operations Suite
Dashboard Cliente (v1)
| ID | Requirement | Status |
|---|---|---|
| DASH-01 | Ogni cliente ha un URL segreto univoco (nessun login richiesto) | Pending |
| DASH-02 | La dashboard mostra nome cliente, nome brand, brief del progetto e stato attuale | Pending |
| DASH-03 | Il piano è strutturato per fasi con milestone e task all'interno di ogni fase | Pending |
| DASH-04 | I task hanno stato visibile (da fare / in corso / fatto) | Pending |
| DASH-05 | Il cliente può approvare i deliverable dalla sua area | Pending |
| DASH-06 | Il cliente può lasciare commenti su task e deliverable | Pending |
| DASH-07 | Il cliente vede solo il totale del preventivo accettato (non i prezzi dei singoli servizi) | Pending |
| DASH-08 | Il cliente vede lo stato dei pagamenti: acconto 50% (da saldare / inviata / saldato) e saldo 50% (da saldare / inviata / saldato) | Pending |
| DASH-09 | Link a documenti e file (Google Drive, PDF, deliverable) | Pending |
| DASH-10 | Storico note e decisioni prese nel tempo | Pending |
Area Amministratore (v1)
| ID | Requirement | Status |
|---|---|---|
| ADMIN-01 | Vista di tutti i clienti con stato sintetico | Pending |
| ADMIN-02 | Gestione completa di ogni cliente: fasi, task, documenti, pagamenti | Pending |
| ADMIN-03 | Preventivo completo con dettaglio servizi (non visibile al cliente) | Pending |
Catalogo Servizi (v1)
| ID | Requirement | Status |
|---|---|---|
| CAT-01 | File/database dei servizi con prezzi e cosa è incluso | Pending |
| CAT-02 | Usato come base per la generazione assistita dei preventivi | Pending |
Progetti Multi-Project (Phase 4)
| ID | Requirement | Status |
|---|---|---|
| PROJ-01 | Ogni cliente può avere N progetti; ogni progetto ha workspace indipendente (fasi, pagamenti, preventivo, timer) | Pending |
| PROJ-02 | La dashboard cliente mostra tabs per 2+ progetti; con 1 progetto mostra direttamente il workspace senza selettore | Pending |
| PROJ-03 | La pagina /admin/projects elenca tutti i progetti con €/h reale e timer; /admin/projects/[id] è il workspace progetto | Pending |
| PROJ-04 | Il link cliente supporta slug personalizzabile (/c/mario-rossi) con fallback al token esistente | Pending |
| PROJ-05 | Analytics profittabilità per progetto: ore lavorate, accepted_total, €/h reale vs target_hourly_rate globale | Pending |
Offer System (Phase 5)
| ID | Requirement | Status |
|---|---|---|
| OFFER-01 | Admin può creare macro-offerte (es. Entry Offer, Signature Offer, Retainer) con nome interno, nome pubblico e promessa di trasformazione macro | Pending |
| OFFER-02 | Ogni macro-offerta ha micro-offerte figlie (es. Entry A/B/C) con nome interno, nome pubblico, promessa di trasformazione micro e durata in mesi | Pending |
| OFFER-03 | Admin può creare servizi con nome, prezzo e descrizione della trasformazione; ogni servizio è assegnabile a più micro-offerte via multi-select (many-to-many) | Pending |
| OFFER-04 | Admin può assegnare una o più micro-offerte a un progetto; admin vede le offerte attive per ogni progetto e cliente | Pending |
| OFFER-05 | La dashboard cliente mostra le offerte attive con nome pubblico, prezzo cumulativo dei servizi inclusi e prezzo finale accettato in evidenza; se ha più offerte le vede tutte | Pending |
| OFFER-06 | Admin ha una vista revenue forecast dei 12 mesi successivi basata su offerte attive, durata e accepted_total; breakdown mensile con totale fatturato per mese | Pending |
Catalogo Unificato & Offer Builder (Phase 7–8)
| ID | Requirement | Status |
|---|---|---|
| CAT-U-01 | Un'unica tabella services unifica service_catalog + offer_services; migrazione zero data loss con audit trail (migrated_from) |
Phase 7 |
| CAT-U-02 | Admin /admin/catalog list/add/edit/soft-delete per i servizi singoli (nome, prezzo_unitario, attivo) |
Phase 7 |
| OFFER-B-01 | Offer = nome + tag tipo (Entry/Signature/Retainer/custom) + fasi ordinate; fasi indipendenti l'una dall'altra (es. Signature A/B/C non ereditate) | Phase 8 |
| OFFER-B-02 | /admin/offers/[id]/edit two-column builder: left colonna servizi (ricerca), right colonna fasi con drag&drop tra fasi e dentro fase (reorder) |
Phase 8 |
| OFFER-B-03 | Drag&drop salva per singolo drop con optimistic update client-side + validazione server; versioning previene race condition da multi-tab edit | Phase 8 |
Quote Builder & Public Proposal Pages (Phase 9)
| ID | Requirement | Status |
|---|---|---|
| QUOTE-01 | /admin/quotes/new: select cliente + 1-3 offerte + override prezzo per ciascuna offerta + genera link pubblico /quote/[token] |
Phase 9 |
| QUOTE-02 | Public /quote/[token] pagina multistep (Zod validazione): Step 1 (overview) → Step 2 (tier A/B/C selection + prezzi + fasi) → Step 3 (summary + accept/decline) |
Phase 9 |
| QUOTE-03 | Accept CTA → POST /api/public/quote/accept?token=X con cattura email (opzionale) + note opzionali; registra timestamp accepted_at immutabile |
Phase 9 |
| QUOTE-04 | Quote token: nanoid 21 char (~122 bits), unico, validato in proxy come /client/[token] (nessun login sessione); rate limit 3 views/min per IP |
Phase 9 |
| QUOTE-05 | Mai esporre quote_items (prezzi per servizio) via public API; client API vede solo accepted_total (server-side ClientView type enforces) |
Phase 9 |
CRM Pipeline & Activity Logging (Phase 10)
| ID | Requirement | Status |
|---|---|---|
| CRM-01 | Lead CRUD: /admin/leads list table (name, email, company, status, last_contact_date, next_action) con create/edit/delete |
Phase 10 |
| CRM-02 | Lead detail page /admin/leads/[id]: full profilo, activity log (reverse chronological), quote(s) sent, actions menu (log activity, send quote, mark won) |
Phase 10 |
| CRM-03 | Pipeline stages: Contacted → Qualified → Proposal Sent → Negotiating → Won / Lost; transizioni via dropdown (manual di default) | Phase 10 |
| CRM-04 | Activity logging: tipi (call, email, meeting, note); ogni attività: type, date, durata (opz), notes; auto-aggiorna lead.last_contact_date | Phase 10 |
| CRM-05 | "Log activity" modal: <10 sec UX (type dropdown, date picker, notes textarea, save) — bassa tolleranza per data entry lunghi | Phase 10 |
| CRM-06 | Follow-up reminders widget in dashboard: "Follow up today" (leads dove last_contact_date < oggi - 7 giorni); click → jump lead detail | Phase 10 |
| CRM-07 | "Send Quote" button in lead detail: select existing quote o crea nuovo; update lead.last_quote_sent + status → "Proposal Sent" | Phase 10 |
Auto-Onboarding on Win (Phase 11)
| ID | Requirement | Status |
|---|---|---|
| WIN-01 | "Mark as Won" button in lead detail (o auto-triggered da public quote accept); idempotency: call 2 volte = idempotent, stesso client token | Phase 11 |
| WIN-02 | winLead(leadId, quoteId): crea client (name da lead, token = nanoid), crea project (name = company/offer name), copia offer fasi → project fasi | Phase 11 |
| WIN-03 | 1-4 pagamenti: user sceglie split template (50/50, 3-part, 4-part, custom); registra importo accepted_total da quote | Phase 11 |
| WIN-04 | Generate client dashboard link (/client/[token]), invia via email al lead (copy-paste OK, email automation deferred Phase 12+) |
Phase 11 |
| WIN-05 | Quote accept da public link /quote/[token] auto-aggiorna lead.status → "Proposal Sent" + trigga win (auto-onboarding) |
Phase 11 |
| WIN-06 | Copy offer phases → project phases: tutte le fasi copiate con status = "upcoming", le fasi modificabili dopo (template immutabile, instance editable) | Phase 11 |
Flusso Claude (v3 — deferred to Phase 13+)
| ID | Requirement | Status |
|---|---|---|
| CLAUDE-01 | Onboarding guidato step-by-step via chat per aggiungere un nuovo cliente | Deferred |
| CLAUDE-02 | Generazione del piano a fasi basato dal brief | Deferred |
| CLAUDE-03 | Generazione preventivo assistita (Claude suggerisce struttura offerta, tu approvi) | Deferred |
Out of Scope (v2.0)
- Fatturazione e invio fatture (solo stato pagamenti)
- App mobile nativa (solo web responsive)
- Multi-utente con team (solo admin singolo)
- Prezzi singoli visibili al cliente (solo totale accettato)
- Email automation (manual copy-paste OK per MVP)
- Lead scoring / predictive analytics
- Team collaboration
- Lead de-duplication (manual link on Win)
- Proposal expiry logic (open indefinitely)
- BullMQ persistent reminders (in-app computed, persistent deferred Phase 12+)
Traceability
| Requirement | Phase | Status |
|---|---|---|
| DASH-01 | Phase 1 | Pending |
| DASH-02 | Phase 1 | Pending |
| DASH-03 | Phase 1 | Pending |
| DASH-04 | Phase 1 | Pending |
| DASH-07 | Phase 1 | Pending |
| DASH-08 | Phase 1 | Pending |
| DASH-09 | Phase 1 | Pending |
| DASH-10 | Phase 1 | Pending |
| ADMIN-01 | Phase 2 | Pending |
| ADMIN-02 | Phase 2 | Pending |
| DASH-05 | Phase 2 | Pending |
| DASH-06 | Phase 2 | Pending |
| CAT-01 | Phase 3 | Pending |
| CAT-02 | Phase 3 | Pending |
| ADMIN-03 | Phase 3 | Pending |
| PROJ-01 | Phase 4 | Pending |
| PROJ-02 | Phase 4 | Pending |
| PROJ-03 | Phase 4 | Pending |
| PROJ-04 | Phase 4 | Pending |
| PROJ-05 | Phase 4 | Pending |
| OFFER-01 | Phase 5 | Pending |
| OFFER-02 | Phase 5 | Pending |
| OFFER-03 | Phase 5 | Pending |
| OFFER-04 | Phase 5 | Pending |
| OFFER-05 | Phase 5 | Pending |
| OFFER-06 | Phase 5 | Pending |
| CAT-U-01 | Phase 7 | Phase 7 |
| CAT-U-02 | Phase 7 | Phase 7 |
| OFFER-B-01 | Phase 8 | Phase 8 |
| OFFER-B-02 | Phase 8 | Phase 8 |
| OFFER-B-03 | Phase 8 | Phase 8 |
| QUOTE-01 | Phase 9 | Phase 9 |
| QUOTE-02 | Phase 9 | Phase 9 |
| QUOTE-03 | Phase 9 | Phase 9 |
| QUOTE-04 | Phase 9 | Phase 9 |
| QUOTE-05 | Phase 9 | Phase 9 |
| CRM-01 | Phase 10 | Phase 10 |
| CRM-02 | Phase 10 | Phase 10 |
| CRM-03 | Phase 10 | Phase 10 |
| CRM-04 | Phase 10 | Phase 10 |
| CRM-05 | Phase 10 | Phase 10 |
| CRM-06 | Phase 10 | Phase 10 |
| CRM-07 | Phase 10 | Phase 10 |
| WIN-01 | Phase 11 | Phase 11 |
| WIN-02 | Phase 11 | Phase 11 |
| WIN-03 | Phase 11 | Phase 11 |
| WIN-04 | Phase 11 | Phase 11 |
| WIN-05 | Phase 11 | Phase 11 |
| WIN-06 | Phase 11 | Phase 11 |
| CLAUDE-01 | Phase 13 (v3) | Deferred |
| CLAUDE-02 | Phase 13 (v3) | Deferred |
| CLAUDE-03 | Phase 13 (v3) | Deferred |