simone
7d1af24016
docs(state): update Phase 10 Plan 3 completion status
...
- Marked Phase 10 Plans 1-3 complete (100% Wave 1-2)
- Updated progress: 6/8 plans complete (75%)
- Updated timestamp: 2026-06-11T12:38:00Z
- Added Phase 10 summary: CRM foundation, lead UI, activity logging and follow-up widget
- All tasks verified: build passes, TypeScript checks pass, routes generated
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com >
2026-06-11 12:38:33 +02:00
simone
694b54f2ce
docs(10-03): complete Phase 10 Plan 3 execution summary
...
Activity logging and quote sending modals implemented:
- LogActivityModal: Fast form (<10 sec) for registering calls, emails, meetings, notes
- SendQuoteModal: Two tabs for assigning existing quotes or creating new ones
- FollowUpWidget: Dashboard card showing leads needing follow-up (>7 days no contact)
- Server actions validate and update lead status to 'proposal_sent' on quote assignment
All requirements met (CRM-04, CRM-05, CRM-06, CRM-07). Build passes with 0 errors.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com >
2026-06-11 12:38:00 +02:00
simone
a453df5a8e
docs(10-02): complete Phase 10 Plan 2 execution — lead management UI
2026-06-11 12:32:40 +02:00
simone
1aed8a0909
feat(10-01): add CRM schema with leads, activities, reminders tables and service layer
...
- Add TypeScript type exports for Activity, NewActivity, Reminder, NewReminder
- Create lead-validators.ts: Zod schemas for CRUD operations with Italian localization
- Create lead-service.ts: Query layer with 14 functions (leads, activities, reminders)
- Implement immutable activity audit trail with auto-update of lead.last_contact_date
- Add pipeline stage enums (6 stages) and activity type enums (4 types)
- Cascade delete configured for data integrity
- Full TypeScript type safety throughout
- npm run build: PASSED (0 errors)
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com >
2026-06-11 12:28:35 +02:00
simone
0bca8a6c4d
docs(state): Phase 9 Plan 3 execution complete — public quote page live
...
State changes:
- Progress: 5/8 plans complete (62.5%)
- Phase 09 Plan 03: DONE (30 minutes)
- Multistep wizard, rate limiting, immutable acceptance all implemented
Roadmap changes:
- Phase 9 execution summary: 3/3 plans complete
- Phase 7-9 now 6/11 total v2.0 plans DONE
- Ready for Phase 10 (CRM) and Phase 11 (Auto-provisioning)
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com >
2026-06-11 07:41:06 +02:00
simone
bf0695901f
docs(09-03): phase 9 plan 3 execution summary — public quote page complete
...
- 3 tasks completed (rate limiting, components, page/actions)
- 9 files created, 1 file modified
- Public /quote/[token] route with multistep wizard (3 steps)
- Rate limiting: 3 views/min per IP via proxy middleware
- Immutable quote acceptance with optional email/notes capture
- quote_items never exposed; only accepted_total and phase summary visible
- All threat model mitigations in place
- npm run build: PASS (0 TypeScript errors)
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com >
2026-06-11 07:40:02 +02:00
simone
5d1736922f
docs(09-02): complete Phase 9 Plan 2 execution — admin quote builder UI
2026-06-11 07:35:20 +02:00
simone
5fb34c57a3
docs(09-01): complete Phase 9 Plan 1 execution summary
...
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com >
2026-06-11 07:31:03 +02:00
simone
9ea905cb45
docs(10): phase 10 planning complete — 3 plans (CRM leads + activity logging + follow-ups)
2026-06-11 07:20:37 +02:00
simone
1898dc5ccc
docs(state): Phase 8 execution complete — schema foundation ready
...
- Update progress: 3/8 plans complete (37.5%)
- Update current position: Phase 8 executed, Phase 9 ready for execution
- Add Phase 8 build summary (4 new tables, 7 columns, 5 query functions)
- Update session info with Phase 8 completion
- Update operator next steps: Phase 8 database migration when Postgres ready
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com >
2026-06-11 07:17:26 +02:00
simone
7d1006594b
docs(08): complete Phase 8 execution summary
...
Phase 8 (Offer Phases & Quote Builder Schema) — COMPLETE
Tasks executed:
- Task 1: Schema definitions (4 new tables, 7 columns, 6 relations, 10 types)
- Task 2: Migration script (89 lines, additive-only, zero data loss)
- Task 3: Query layer (5 async functions for builder UI)
Deliverables:
- src/db/schema.ts: offer_phases, offer_phase_services, quotes, leads tables
- src/types/offer.ts: Type re-exports (11 types)
- src/db/migrations/0003_offer_phases_quote_templates.sql: Migration ready for Postgres
- scripts/validate-phase8-migration.ts: 10-check validation suite
- src/lib/admin-queries.ts: Query functions (getOfferPhases, getOfferPhaseServices, getQuoteById, getQuoteByToken, getQuotesByClient)
Status: Build verified, all TypeScript checks passed, ready for Phase 9.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com >
2026-06-11 07:16:43 +02:00
simone
645f33cdd4
docs(state): phase 8-9 planning complete — 6 plans total ready for execution
2026-06-11 07:08:13 +02:00
simone
a98fe7a9f3
docs(09): phase 9 planning complete — 3 plans in 2 waves (schema + admin builder + public quote page)
...
Phase 9 breaks into two parts:
- Wave 0: Schema foundation (Phase 8) — offer_phases, quotes, quote_items tables + type system
- Wave 1: Admin Quote Builder (/admin/quotes/new) — form, server action, price validation
- Wave 2: Public Quote Page (/quote/[token]) — multistep form, acceptance, rate limiting
Plans:
- 09-01: Database schema (offer_phases, quotes, quote_items) + Drizzle migration + query layer types
- 09-02: Admin builder UI (two-column form, client/offer selection, live preview) + createQuote action
- 09-03: Public quote page (token-gated route, middleware rate limit 3/min, multistep wizard, acceptQuote action)
Key constraints per CLAUDE.md:
- quote_items NEVER exposed to client API (public query layer enforces PublicQuoteView type)
- Server-side price recalculation prevents tampering (client-side total validated against item sum)
- Immutability enforced: accepted_at timestamp immutable once set (DB constraint + app check)
- Token: nanoid 21-char (~122-bit entropy), unique, rate-limited at middleware
Estimated execution: 4-5 days. Wave 0 can run in parallel with Wave 1 (no blocking).
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com >
2026-06-11 07:06:47 +02:00
simone
329ccd49b4
docs(09): research phase 9 — quote builder & public routes architecture
2026-06-11 07:01:09 +02:00
simone
06660c3fe6
docs(08): phase 8 planning complete — 1 plan (offer phases + quote templates schema)
2026-06-11 06:54:39 +02:00
simone
243f20f1ad
docs(state): phase 7 execution complete — both plans finished (schema migration + admin crud rewire)
2026-06-11 06:29:24 +02:00
simone
02d51179b3
docs(07-unified-service-catalog): complete phase 7 plan 2 execution summary
...
Phase 7 Plan 2 (Unified Service Catalog - Admin CRUD + Quote Builder) execution complete:
- Task 1: Query layer refactored to read from services table (3 queries updated)
- Task 2: Admin catalog CRUD + UI components rewired to services table with category field
- Task 3: Validation script enhanced with net-new services check
All must-haves satisfied:
- /admin/catalog list/add/edit/soft-delete fully functional on services table
- New services created post-migration have migrated_from=null
- Quote builder service picker reads from services via activeServices
- Historical quote_items.service_id FK to service_catalog remains untouched
Build status: TypeScript OK, npm run build passes
ROADMAP success criteria 3-4 satisfied for CAT-U-02 (admin catalog unification)
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com >
2026-06-11 06:27:38 +02:00
simone
bbc89136f5
docs(state): record phase 7 plan 1 execution completion
...
Phase 7 Plan 1 (Unified Service Catalog) complete:
- Status: executing (was: planning)
- Progress: 1/5 phases, 1/8 plans completed (12%)
- Current position: Phase 07-unified-service-catalog, Plan 07-01 complete → 07-02 planning
- Last activity: 2026-06-11T04:21:50Z
Phase 7 Plan 1 summary:
- Schema definition with audit trail (migrated_from/migrated_id)
- Idempotent backfill script (56 rows: 21 from service_catalog + 35 from offer_services)
- Zero-data-loss validation suite (5-check verification)
- Database migration pending external connectivity
Next steps: Apply migration when DB reachable, or plan Phase 7-02.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com >
2026-06-11 06:23:12 +02:00
simone
02dcc688c8
docs(07-01): complete phase 7 plan 1 summary — unified service catalog expand phase
...
Phase 7 Plan 1 execution complete:
- Task 1: services table schema with audit trail (migrated_from/migrated_id)
- Task 2: Idempotent backfill script (21 service_catalog + 35 offer_services rows)
- Task 3: Zero-data-loss validation suite (5-check verification)
All code ready to run; database migration pending external DB connectivity.
Schema changes are additive-only, Data Safety LOCKED constraints honored.
No data deleted, no tables dropped, legacy compatibility preserved.
Commits: e4ddb87 (schema), de0888b (scripts)
Duration: 3m 14s
Status: Ready for database migration
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com >
2026-06-11 06:22:33 +02:00
simone
23cb057f0b
docs(07): phase 7 planning complete — 2 plans (schema migration + admin crud)
...
Wave 1: 07-01-PLAN.md — Unified services table (audit trail, backfill, validation)
Wave 2: 07-02-PLAN.md — Admin catalog CRUD rewire (preserve historical references)
Ready for execution: /gsd-execute-phase 7
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com >
2026-06-11 06:17:29 +02:00
simone
bdcdd26f17
docs(07): create phase plan for Unified Service Catalog
...
Two-plan, two-wave migration: schema + backfill (07-01) then admin
catalog CRUD rewire (07-02), per CAT-U-01/CAT-U-02 and the
expand-contract pattern from PITFALLS_V2 Pitfall 1.
2026-06-11 06:14:05 +02:00
simone
3b1f49d059
docs(v2.0): finalize roadmap + requirements — phases 7-11 approved for planning
...
- Upgrade PROJECT.md: v2.0 Business Operations Suite (unified catalog, offers with phases, public quotes, CRM pipeline, auto-provisioning)
- Create REQUIREMENTS.md sections: CAT-U, OFFER-B, QUOTE, CRM, WIN requirements for phases 7-11
- Extend ROADMAP.md: 5-phase structure (7-11), 14-19 days total, risk/flag registry
- Archive v1.0 milestone (phases 1-6, complete)
- Switch STATE.md to v2.0, status=planning
- Create research documents: STACK.md, FEATURES_v2.0.md, ARCHITECTURE.md, PITFALLS.md, SUMMARY.md
Ready for: /gsd-plan-phase 7
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com >
2026-06-11 06:01:59 +02:00
simone
6239eed6e6
docs(research): complete v2.0 stack, features, architecture, and pitfalls analysis
...
Synthesized research outputs from 4 parallel researcher agents:
- STACK.md: 7 new npm packages (dnd-kit, TanStack Table, RHF, BullMQ), React 19 compat verified
- FEATURES_v2.0.md: Feature landscape (table stakes, differentiators, anti-features), MVP breakdown
- ARCHITECTURE.md: Schema additions (services, offer_phases, leads, quotes), 5-phase build order
- PITFALLS.md: Critical/moderate/minor pitfalls + prevention strategies
Ready for roadmap planning and phase-by-phase execution.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com >
2026-06-11 05:56:55 +02:00
simone
6e97a53b73
docs(06-02): complete dashboard KPI + activity feed plan
...
- getDashboardStats() in dashboard-queries.ts
- RSC dashboard at /admin with 4 KPI cards + activity feed
- npm run build passes
2026-05-31 20:12:54 +02:00
simone
d1d83011aa
docs(06-01): complete sidebar layout plan — AdminSidebar + AppShell + /admin/clients
2026-05-31 20:10:13 +02:00
simone
26a688cec8
docs(06): create Phase 6 UX Overhaul plans — sidebar + dashboard (2 plans, 2 waves)
2026-05-31 20:06:53 +02:00
simone
280e177a67
docs(05): add phase 5 verification report
2026-05-30 16:59:01 +02:00
simone
2a5a6fc526
docs(phase-5): complete phase execution — Offer System done
2026-05-30 16:56:33 +02:00
simone
fadf72dc35
test(05): persist human verification items as UAT
2026-05-30 16:49:00 +02:00
simone
00783c4c15
docs(05-04): complete client dashboard offer card + admin forecast plan
...
- SUMMARY.md: 2 tasks, 6 files, commits c398d6d and 745f8a7
- activeOffers in ProjectView/ClientView (public_name only, T-05-09/10 mitigated)
- /admin/forecast 12-month RSC table complete
2026-05-30 16:44:25 +02:00
simone
1001320b36
docs(05-03): complete plan 3 — OffersTab + project offer assignment + client active offers
2026-05-30 16:39:21 +02:00
simone
2faf2fedf1
docs(05-02): complete offer catalog admin CRUD plan — SUMMARY.md
...
- RSC page at /admin/offers with macro/micro/service CRUD fully functional
- ServiceCheckboxList for many-to-many service assignment
- NavBar updated with Forecast and Offerte links
2026-05-30 16:23:15 +02:00
simone
d670d49048
docs(05-01): create SUMMARY.md for Phase 5 Plan 1 — offer schema migration
...
- Documents schema.ts changes (5 new tables, relations, TypeScript types)
- Documents Phase 4+5 DB migration applied via SSH due to drizzle-kit TTY limitation
- Confirms zero data loss; all 5 clients and related data preserved
2026-05-30 15:33:42 +02:00
simone
c83e5e5a7e
fix(05): apply checker revisions — OFFER-04 client coverage, RESOLVED questions, wave fix, verify fix
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-30 15:14:00 +02:00
simone
cd55cba56c
docs(05): create Phase 5 Offer System plans — 4 plans in 3 waves
...
Wave 1: 05-01 schema migration (5 new tables, additive only)
Wave 2: 05-02 offer catalog CRUD (/admin/offers + NavBar)
Wave 3: 05-03 project offer assignment (OffersTab) + 05-04 client dashboard offers + /admin/forecast
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-30 15:07:52 +02:00
simone
4d8678b1a3
docs(04-04): capture phase summary — slug resolution + multi-project dashboard
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-22 11:37:37 +02:00
simone
5d785a1c1c
feat(04-04): slug resolution + multi-project client dashboard + slug edit
...
- validate-slug API route: resolves clients.slug for Edge middleware
- proxy.ts: slug-first resolution (D-06) — tries slug then falls back to token
- client-view.ts: complete rewrite — getClientWithProjectsByToken + getProjectView
- No quote_items, no payment amounts in client API (CLAUDE.md security invariants)
- client/[token]/page.tsx: multi-project dashboard — 1 project = direct view,
2+ projects = shadcn Tabs with project names (D-09/D-10)
- edit/page.tsx: slug field with link preview + unique constraint error handling
- actions.ts: updateClient now persists slug, redirects on success/slug_taken
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-22 11:31:32 +02:00
simone
5bf5dfce71
infra(04-00): route /c/ → /client/, Dockerfile, Gitea deploy
...
- Rename src/app/c/[token] → src/app/client/[token]
- Update proxy.ts, ClientRow, admin client detail with /client/ path
- Add output: "standalone" to next.config.ts for Docker build
- Add Dockerfile (multi-stage, node:20-alpine) and .dockerignore
- Push schema to Coolify Postgres via SSH tunnel (drizzle-kit push ✓)
- Update CLAUDE.md constraint 4 to reflect /client/ route
- Add Phase 4 planning artifacts (04-00, 04-RESEARCH, 04-PATTERNS)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-21 16:12:05 +02:00
simone
49ef45da83
fix(04): revision 1 — depends_on format + D-12 client list coverage
...
- 04-02/03/04: change depends_on from filename format to plan ID format
('04-01-PLAN.md' → '04-01') to match orchestrator expectations and
Phase 3 precedent
- 04-02: add Task 3 implementing D-12 — /admin/clients list shows brand
names below client name and LTV as sum of project accepted_totals;
update getAllClientsWithPayments query and ClientRow component;
add src/app/admin/page.tsx, src/lib/admin-queries.ts,
src/components/admin/ClientRow.tsx to files_modified
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-21 11:10:25 +02:00
simone
d210cf6202
docs(04): create phase plan — 4 plans in 2 waves for multi-project architecture
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-21 11:02:56 +02:00
simone
3e3b34bbe2
docs(04): capture phase context — Progetti multi-project per cliente
2026-05-20 19:16:08 +02:00
Simone Cavalli
67e4483b48
docs(phase-03): complete phase execution — service catalog + quote builder verified
2026-05-19 23:12:59 +02:00
Simone Cavalli
fe0a65ebeb
docs(03-04): complete E2E verification — all tests approved, phase 3 verified
2026-05-19 23:06:26 +02:00
Simone Cavalli
511c7d1d43
fix: resolve merge conflict in admin-queries.ts — keep both quote_items and service_catalog imports
2026-05-17 11:50:38 +02:00
Simone Cavalli
8641253e85
docs(03-03): complete quote builder plan summary
...
- SUMMARY.md for plan 03-03 (2/2 tasks complete)
- Covers quote-actions.ts, QuoteTab.tsx, admin-queries extension, page.tsx wiring
- Security verification: requireAdmin on all actions, 0 quote_items in client-view
2026-05-17 11:46:11 +02:00
Simone Cavalli
f1ea4c3887
docs(03-02): complete service catalog plan — NavBar + page + actions + components
...
- SUMMARY.md for plan 03-02 with all task commits, decisions, deviations
2026-05-17 11:45:09 +02:00
Simone Cavalli
8c83a76b30
docs(03-01): complete schema migration plan — nullable service_id + custom_label pushed to Neon
...
- SUMMARY.md created with full task record, self-check passed
- Task 1 commit: 9ddb699 (schema edit)
- Task 2: drizzle-kit push confirmed changes applied, second run "No changes detected"
2026-05-17 11:39:04 +02:00
Simone Cavalli
a4942d7684
docs(03): plan Phase 3 — Service Catalog & Quote Builder (4 plans, 2 waves)
...
Wave 1: schema push (service_id nullable + custom_label).
Wave 2 (parallel): catalog CRUD page + quote builder tab.
Wave 3: E2E human verification checkpoint.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-17 11:23:15 +02:00
Simone Cavalli
80d93993a9
docs(phase-02): evolve PROJECT.md after phase completion
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-15 21:55:53 +02:00
Simone Cavalli
88f4e0fb08
docs(phase-02): complete phase execution — admin area + interactive features
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-15 21:55:16 +02:00