simone
1e4f917b51
docs(phase-11): add code review + verification (code-complete, DB migration pending)
...
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com >
2026-06-13 16:35:02 +02:00
simone
0387805041
docs(11-04): complete catalog database-view plan
...
- Mark OFFER-10 complete (REQUIREMENTS.md) — client-side search delivered
- STATE.md: position advanced to Phase 11 plans 1-4 all executed (92%), session/decisions/metrics updated
- 11-04-SUMMARY.md: append self-check results
2026-06-13 16:05:13 +02:00
simone
9bc1e43738
docs(11-04): add plan summary and log unused createService action
...
- 11-04-SUMMARY.md documents ServiceTable database-view rewrite + CatalogSearch
- deferred-items.md: log now-unused createService/serviceSchema in actions.ts (item 6)
2026-06-13 16:03:10 +02:00
simone
e424653ece
docs(11-03): complete EditableCell + TagMultiSelect plan
...
- add 11-03-SUMMARY.md documenting EditableCell/TagMultiSelect delivery
and the react-hooks lint-rule fix (Rule 1 deviation)
- update STATE.md position (3 of 4 -> 4 of 4), progress 86% -> 89%,
performance metrics, and decisions log
- log gsd-sdk unavailability and OFFER-07/08 status timing as deferred
items for Phase 11
2026-06-13 15:56:06 +02:00
simone
62d5e97f39
docs(11-02): complete catalog query layer + server actions plan
...
- SUMMARY.md for Plan 02 (ServiceWithTags + 4 new server actions)
- STATE.md: advance to Plan 3/4, record metrics and decision
- REQUIREMENTS.md: mark OFFER-07/08/09 backend foundation complete
2026-06-13 15:47:07 +02:00
simone
a447494dde
docs(11-01): complete plan 1 — tags schema + consolidation scripts, DB-execution gated
...
- Advance STATE.md to plan 2/4, record metrics/decisions/blocker for 11-01
- Fix Status/Progress fields regressed by state advance-plan (status was
reset to "Ready to execute" / 0% despite phase being mid-execution)
- Note .planning/ROADMAP.md is an empty PLACEHOLDER (pre-existing v2.1
planning gap) — roadmap update-plan-progress is a no-op until populated
2026-06-13 15:35:18 +02:00
simone
afe789c415
docs(11-01): add execution summary and deferred items log
...
Documents Phase 11 Plan 1 outcome: tags table schema + migration scripts
complete and committed; DB-execution steps (push migration, run legacy
consolidation, run tag-assignment + validators) blocked by network/SSH
access gate to 178.104.27.55:54321 (firewalled, SSH-only per project
memory). Logs pre-existing drizzle-kit migration tooling drift and the
stale quote_items<->service_catalog JOIN as deferred non-blocking items.
2026-06-13 15:30:03 +02:00
simone
d1b1047368
docs(11): create phase plan — 4 plans, 4 waves
...
Catalog Database-View UX & Legacy Consolidation (OFFER-07/08/09/10/13)
- 11-01: tags table + polymorphic junction + additive legacy migration
- 11-02: getAllServices tag join + inline-edit/tag/quick-add server actions
- 11-03: EditableCell + TagMultiSelect components
- 11-04: database-view ServiceTable + client-side search
Verified by gsd-plan-checker (VERIFICATION PASSED).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com >
2026-06-13 15:07:17 +02:00
simone
03898f2a59
docs(planning): v2.1 milestone setup + Phase 11 context/patterns
...
- 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 >
2026-06-13 15:07:06 +02:00
simone
008a43469d
feat(10-redo-C): CRM leads module — schema, services, UI (Phase 10 redo)
...
Stage C of staged Phase 10 redo. Restores dangling phase10-wip work:
- schema.ts: leads expansion + activities/reminders tables + relations
- lead-service.ts / lead-validators.ts service layer
- /admin/leads list + detail + actions, LeadTable/LeadDetail/LeadForm
- LogActivityModal, SendQuoteModal, FollowUpWidget on dashboard
- migration 0005 (applied to prod DB in Stage B, along with
previously-missing 0001/0003/0004 — root cause of all post-deploy
500s: prod DB had no migrations applied since 0000)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com >
2026-06-11 20:58:14 +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
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
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
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
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
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
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
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
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
Simone Cavalli
cf1f67229a
docs(02-04): complete client interactions plan summary
...
- 2 tasks completed: approve + comment API routes, and ApproveButton/CommentForm/CommentList client components
- 3 auto-fixed blocking issues documented (missing dep, missing .env.local, prop signature updates)
- all STRIDE threats T-02-15 through T-02-20 mitigated
- build passes cleanly
2026-05-15 21:52:12 +02:00
Simone Cavalli
20c25cbb70
docs(02-03): complete admin client workspace plan summary
...
- SUMMARY.md for Plan 02-03: Radix Tabs workspace with all four tab components
- Documents deviations: Next.js 16 params await fix and FormData type annotations
- Records all threat mitigations applied (T-02-10 through T-02-14)
2026-05-15 21:30:34 +02:00
Simone Cavalli
feede57c05
docs(02-02): complete admin client list and create-client plan summary
...
- Covers Task 1 (admin-queries, NavBar, layout) and Task 2 (admin page, ClientRow, new client form + Server Action)
2026-05-15 19:55:19 +02:00
Simone Cavalli
e7279ee957
docs(02-01): complete Auth.js admin session plan summary
...
- SUMMARY.md for plan 02-01: next-auth@4 CredentialsProvider + proxy guard
- Documents two auto-fixed deviations (Next.js 16 proxy export name, Suspense boundary)
- Self-check PASSED: all files and commits verified
2026-05-15 10:43:30 +02:00