CodeIssuesPull RequestsActionsSecurityInsights
✨ AI
More
Settings

feat: TradeQuote AI WordPress plugin v1.0.0 — full implementation #3947

Merged⚡ AI-generatedXLccantynz wants to mergeclaude/tradequote-ai-plugin-spec-ADZYGmainopened May 30, 20260/11 tasks
ccantynzcommented May 30, 2026

Originally written by @ccantynz-alt on GitHub.
Imported from https://github.com/ccantynz-alt/-AI-Quote-to-Invoice-for-Trades/pull/1


Summary

Complete implementation of the TradeQuote AI WordPress plugin per the full product specification. Built from an empty repository — 38 files, ~2,900 lines of code across all layers of the spec.

What's included

PHP Plugin Core

  • tradequote-ai.php — plugin bootstrap, constants, hook wiring
  • class-tqa-activator.php — creates 3 custom DB tables on activation (wp_tqa_customers, wp_tqa_quotes, wp_tqa_invoices)
  • class-tqa-settings.php — all 12 settings fields with sanitisation
  • class-tqa-customer.php — full CRUD + find-or-create (auto-saves on first quote)
  • class-tqa-quote.php — CRUD, auto-numbering (Q-2026-0001), quota enforcement, acceptance rate stats
  • class-tqa-invoice.php — CRUD, one-step create-from-quote, mark-paid
  • class-tqa-ai.php — Claude API (claude-sonnet-4-20250514) integration with BYOK; parses plain-English job descriptions into structured JSON line items
  • class-tqa-pdf.php — mPDF integration with HTML fallback; generates branded quote + invoice PDFs
  • class-tqa-email.phpwp_mail() delivery with PDF attachment, status update on send
  • class-tqa-admin.php — admin menu, asset enqueue, 20+ WordPress REST API endpoints

React Admin UI (src/components/)

  • QuoteBuilder.jsx — describe job → AI generate → edit → preview → save/send
  • LineItemEditor.jsx — inline editable table with live total calculation
  • CustomerSearch.jsx — debounced autocomplete with inline new-customer creation
  • QuotePreview.jsx — live branded preview before saving
  • Dashboard.jsx — stat cards (quotes/month, acceptance rate, outstanding invoices, free quota)
  • JobTracker.jsx — Kanban board: Draft → Sent → Accepted → Invoiced → Paid
  • QuotesList.jsx / InvoicesList.jsx / CustomersList.jsx — filterable tables with inline actions
  • api.js — REST client wrapping all endpoints with nonce auth

Templates

  • pdf-quote.php / pdf-invoice.php — branded A4 HTML templates (logo, line items, totals, payment details)
  • email-quote.php — responsive HTML email body

Config & tooling

  • package.json@wordpress/scripts build pipeline
  • composer.json — mPDF dependency
  • readme.txt — WordPress.org listing copy
  • uninstall.php — full cleanup on plugin delete

Test plan

  • Activate plugin on WordPress 6.x + PHP 8.1 — verify 3 DB tables created and admin menu appears
  • Enter business details and a valid Claude API key in Settings
  • Create a new quote: type a job description, click Generate, verify line items populate
  • Edit a line item quantity — confirm totals recalculate live
  • Save as draft; verify it appears in Quotes list with status "draft"
  • Send the quote; verify PDF email is received and status changes to "sent"
  • Convert to invoice; verify invoice is created with correct line items and due date
  • Mark invoice as paid; verify Kanban card moves to Paid column
  • npm install && npm run build produces admin/js/app/index.js
  • composer install + re-test PDF download produces a real PDF (not HTML fallback)
  • Delete plugin — confirm all tables and options removed

https://claude.ai/code/session_01SYko81ETdN3uyZ8GVdH1s5


Generated by Claude Code

Cross-repo impact

See what breaks downstream if this PR merges.

Analyze →
⮌ Merged

This pull request was merged into main.

c comment · e edit title · m merge · a approve · r request changes · ? shortcuts