feat: TradeQuote AI WordPress plugin v1.0.0 — full implementation #3947
Cross-repo impact
See what breaks downstream if this PR merges.
⮌ Merged
This pull request was merged into main.
c comment · e edit title · m merge · a approve · r request changes · ? shortcuts
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 wiringclass-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 sanitisationclass-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 statsclass-tqa-invoice.php— CRUD, one-step create-from-quote, mark-paidclass-tqa-ai.php— Claude API (claude-sonnet-4-20250514) integration with BYOK; parses plain-English job descriptions into structured JSON line itemsclass-tqa-pdf.php— mPDF integration with HTML fallback; generates branded quote + invoice PDFsclass-tqa-email.php—wp_mail()delivery with PDF attachment, status update on sendclass-tqa-admin.php— admin menu, asset enqueue, 20+ WordPress REST API endpointsReact Admin UI (
src/components/)QuoteBuilder.jsx— describe job → AI generate → edit → preview → save/sendLineItemEditor.jsx— inline editable table with live total calculationCustomerSearch.jsx— debounced autocomplete with inline new-customer creationQuotePreview.jsx— live branded preview before savingDashboard.jsx— stat cards (quotes/month, acceptance rate, outstanding invoices, free quota)JobTracker.jsx— Kanban board: Draft → Sent → Accepted → Invoiced → PaidQuotesList.jsx/InvoicesList.jsx/CustomersList.jsx— filterable tables with inline actionsapi.js— REST client wrapping all endpoints with nonce authTemplates
pdf-quote.php/pdf-invoice.php— branded A4 HTML templates (logo, line items, totals, payment details)email-quote.php— responsive HTML email bodyConfig & tooling
package.json—@wordpress/scriptsbuild pipelinecomposer.json— mPDF dependencyreadme.txt— WordPress.org listing copyuninstall.php— full cleanup on plugin deleteTest plan
npm install && npm run buildproducesadmin/js/app/index.jscomposer install+ re-test PDF download produces a real PDF (not HTML fallback)https://claude.ai/code/session_01SYko81ETdN3uyZ8GVdH1s5
Generated by Claude Code