Commit Graph

16 Commits

Author SHA256 Message Date
Claude Dev
de8ec69ea0 feat: add advanced features — KB, tickets v2, multi-currency, cart, quotes, affiliates, credits, staff RBAC, fraud detection, service panels
Major additions:
- Knowledge base with categories, articles, revisions, and voting
- Enhanced ticket system: departments, SLA policies, canned responses, tags, custom fields, satisfaction ratings, internal notes
- Multi-currency support with exchange rate sync
- Shopping cart and quote system with PDF generation
- Affiliate program with referrals, commissions, and payouts
- Account credits, credit notes, and debit notes
- Staff management with granular role-based permissions
- Fraud detection and order risk assessment
- ServerHunter SEO integration
- Service lifecycle events (suspend/unsuspend/terminate)
- Service management panels for VPS, Dedicated, Hosting, and Game servers
- Plan lifecycle fields and per-customer overrides
- 30+ migrations, 17 factories, 8 feature test suites

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 07:35:10 -04:00
Claude Dev
b4ef90465c feat: complete pre-launch audit — frontend polish, churn prevention, login history, financial reports, configurable checkout
Includes all work from phases 6-9+ and frontend polish rounds 1 & 2:

- Login history with device trust, new device notifications, session management
- Churn prevention: cancellation surveys, winback campaigns with email sequences
- Financial reports: revenue, P&L, tax, aging, refund, subscription reports with PDF/CSV/JSON export
- Configurable checkout: plan config groups/options, build-your-own VPS
- Frontend polish: fix broken legal links, add SEO meta tags, favicon, font display=swap,
  Head titles on all 14 marketing pages, mobile responsive fixes, AuthLayout legal footer,
  remove false 24/7 claims, hide empty stats, correct uptime SLA to 99.9%,
  GameServers notify buttons linked to /contact, 301 redirects for /terms and /privacy
- WHMCS migration scripts
- Update legal page effective dates to March 16, 2026

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-16 11:39:25 -04:00
Claude Dev
c034be820e feat: add plan_prices table, PlanPrice model, and Plan relationship
- Create plan_prices migration with unique(plan_id, billing_cycle)
- PlanPrice model with factory
- Plan::prices() relationship and priceForCycle() helper
- Tests for model relationships, uniqueness, cascade delete

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-14 23:31:12 -04:00
Claude Dev
f194b60d5c Fix 5 critical issues: provisioning storage, webhook auth, password exposure, middleware, model conflict
- Store VirtFusion provisioning info in credentials column instead of non-existent provisioning_info key
- Add PayPal webhook header verification to reject unsigned requests
- Stop exposing VPS root password in flash message, use separate new_password key
- Apply ensure_not_suspended middleware to account routes
- Rename User::invoices() to billingInvoices() to avoid overriding Cashier's invoices() method

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-14 18:47:31 -04:00
Claude Dev
40c1ecc6fe Remove old Vuexy wrapper components (AppTextField, AppSelect, AppTextarea, FlashMessages, NotificationBell)
All pages now use native Vuetify components directly. Flash messages are handled
by the ToastStack component via Pinia store. Notifications use NotificationPanel.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-14 17:10:23 -04:00
Claude Dev
45d25d61ba Idempotent provisioning, service soft-delete, Plans page redesign, doc updates
Part A: Fix duplicate Service creation on provisioning retry
- All 4 provisioning services use Service::firstOrCreate() keyed on
  subscription_id+service_type to prevent duplicates on queue retries
- HandleSubscriptionCreated sends notification before provisioning,
  no longer re-throws on failure
- RetryProvisioningCommand simplified to reuse existing Service records

Part B: Plans/Pricing page complete redesign
- Service type tabs (VPS, Dedicated, Web Hosting, MySQL)
- Billing cycle segmented toggle (monthly/quarterly/semi-annual/annual)
- Feature icons per service type, Popular/Best Value badges
- Stock indicators, effective monthly price calculations

Part C: Admin service soft-delete/archive
- Service model uses SoftDeletes trait
- Admin can archive and restore services
- Show archived toggle on services list
- Migration adds deleted_at column

Docs: Updated TASKS.md, CLAUDE.md, PROJECT_DEVELOPMENT.md, MEMORY.md
- Phase 3 marked complete, test counts updated (252 passing)
- SupportPal references replaced with standalone ticket system
- Frontend design skill background rule added
- Closed GitHub issues #3, #6, #7, #8, #9

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 06:30:57 -05:00
Claude Dev
c82ee91b9a Enhance service detail page with type-specific sections and provisioning info
Add service-type-specific detail cards (VPS, Dedicated, Game, Web Hosting),
provisioning info accessor that filters sensitive credentials, and improved
sidebar with service overview and quick actions.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-09 20:30:12 -05:00
Claude Dev
76c49e9ed7 Add admin customer edit, status management, and admin notes
Adds edit/update endpoints for customer management with admin notes
field, form request validation, status change audit logging, and
8 new tests (171 total, 846 assertions).

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-09 20:09:57 -05:00
Claude Dev
015949a7f6 Add email integration for ticket system and IMAP inbound support
Email integration: IMAP polling via webklex/php-imap (M365/Zoho/MIAB
compatible), TicketEmailProcessor with 3-strategy ticket matching
(In-Reply-To, References, subject line [EZSCALE-{id}]), signature and
quote stripping, scheduled command every 2min.

Outbound: 4 notification classes (TicketCreated, CustomerReply,
StaffReply, StatusChanged) with email threading headers via
withSymfonyMessage(). Staff replies set Reply-To: support@ezscale.cloud.

Frontend: ticket reference chips on all pages, "Via Email" badges on
email-originated replies. 12 new tests (163 total, 816 assertions).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 17:10:04 -05:00
Claude Dev
a4cf7026bc Add screenshot auth middleware, remove SupportPal references
Screenshot auth: dev-only middleware that authenticates headless Chrome
via ?_screenshot_token= query param. Auto-selects admin/customer user
by subdomain. Only active when APP_ENV=local or explicitly enabled.

SupportPal cleanup: dropped supportpal_ticket_id column, removed env
vars and Phase 7 task tracking. 7 new tests (151 total, 782 assertions).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 16:52:15 -05:00
Claude Dev
6f39c32270 Add standalone support ticket system with customer and admin interfaces
Replaces planned SupportPal integration with a built-in ticket system.
Customer side: create tickets, reply, close. Admin side: manage all
tickets with search/filters, staff replies, status updates. Includes
30 Pest tests (144 total, 775 assertions).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 16:20:12 -05:00
Claude Dev
9603803928 Add plan upgrade/downgrade, order management, impersonation, and contact form
- Plan upgrade/downgrade flow: UpgradeController with price difference
  calculations, Upgrade.vue with feature comparison and confirmation dialog
- Admin order management: Order model/migration/factory, OrderController
  with process/complete/cancel/notes, Index and Show pages with filters
- Admin impersonation: start/stop endpoints, session-based tracking,
  impersonation banner in AccountLayout, audit logging
- Contact form: ContactRequest validation, ContactController with email,
  marketing route for form submission
- FlashMessages now supports info alerts
- Inertia shared data includes impersonation state
- 114 tests passing (623 assertions)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 13:55:27 -05:00
Claude Dev
813fde30c2 Add admin audit log viewer and system settings
Phase 5 (Admin Panel):
- Audit log viewer: searchable with action/date filters, expandable
  rows showing JSON changes, color-coded action chips, user avatars
- System settings: tabbed page (General, API Credentials, Billing,
  Notifications) with masked sensitive values, per-group save
- Settings model with get/set/getGroup/setGroup helpers
- Settings migration for key-value store with groups
- 52 tests passing, build clean

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 10:45:31 -05:00
Claude Dev
d9ec414264 Add coupon management, customer services, and update TASKS.md
Phase 5 (Admin Panel):
- Admin coupon management: full CRUD with create/edit/deactivate,
  auto-generate codes, plan restrictions multi-select, usage tracking,
  redemption history on edit page
- Add active flag migration for coupons table

Phase 4 (Customer Dashboard):
- Customer services list page with plan info and status
- Customer service detail page with network info, plan details,
  control panel links (VirtFusion/SynergyCP/Enhance), important dates
- Service status/type resolver utilities

Documentation:
- Update TASKS.md with all completed Phase 3/4/5/8 items

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 10:38:12 -05:00
Claude Dev
26704f9721 Implement Phase 1: Foundation & Core Setup
Complete foundation for the EZSCALE billing platform replacing WHMCS:

- Install Composer deps (Fortify, Passport, Cashier, PayPal, Spatie Permissions, Inertia)
- Install Vue 3 + Inertia.js with Vite, 3 layouts (App, Auth, Admin)
- Configure subdomain routing (marketing, account, admin) with domain-based route files
- Create 30 database migrations (15 custom tables + package defaults)
- Create 14 Eloquent models with relationships, factories, and encrypted casts
- Set up Fortify auth with 7 Vue pages (Login, Register, ForgotPassword, ResetPassword, VerifyEmail, ConfirmPassword, TwoFactorChallenge)
- Add 2FA TOTP setup page with QR code and recovery codes
- Configure middleware (Inertia, Spatie roles/permissions, EnsureUserNotSuspended)
- Create seeders for roles/permissions, sample plans, and admin user
- Build dashboard controllers and Vue pages for customer and admin panels
- Add 4 shared Vue components (Card, Button, NavLink, FlashMessages)
- Generate Passport OAuth2 keys for future SSO/API use
- Write 24 Pest tests (auth, role-based access, models) — all passing

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 02:50:46 -05:00
Claude EZSCALE
133bc56bfb Base Laravel 2026-02-09 01:20:27 -05:00