Update TASKS.md to reflect Phase 1 and Phase 2 completion

Mark all completed items for Phase 1 (foundation) and Phase 2
(billing & subscriptions). Add remaining Phase 2 items that still
need work (PDF invoices, multi-currency, tax, admin coupon CRUD,
email notifications).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Claude Dev
2026-02-09 07:36:23 -05:00
parent 67ea1ef22a
commit a86324c8cc

View File

@@ -1,49 +1,48 @@
# TASKS.md - EZSCALE Site Task Tracker
## Phase 1: Foundation & Core Setup
## Phase 1: Foundation & Core Setup
- [x] Initialize Laravel 12 project with Vue + Inertia starter kit (base install in `website/`)
- [ ] Configure domain routing (ezscale.cloud, account.ezscale.cloud, admin.ezscale.cloud)
- [ ] Set up MySQL 8.x with multi-region replication and automated backups
- [ ] Configure Redis (cache, queue, sessions)
- [ ] Install core dependencies:
- [ ] laravel/cashier (Stripe)
- [ ] laravel/fortify (authentication)
- [ ] laravel/passport (OAuth2 for SSO)
- [ ] srmklive/laravel-paypal
- [ ] spatie/laravel-permission
- [ ] Create complete database schema and migrations (users, profiles, plans, subscriptions, services, bandwidth, etc.)
- [ ] Set up Laravel Fortify with Vue/Inertia auth pages (login, register, verify)
- [ ] Implement 2FA (TOTP for customers, WebAuthn/passkeys for admins)
- [ ] Configure spatie roles: `admin` and `customer`
- [ ] Set up middleware: auth, role-based, rate limiting
- [x] Configure domain routing (ezscale.dev, account.ezscale.dev, admin.ezscale.dev)
- [x] Set up MySQL 8.x database (ezscale_billing + test DB)
- [x] Configure Redis (cache, queue, sessions)
- [x] Install core dependencies (cashier, fortify, passport, paypal, spatie, inertia, vue3)
- [x] Create complete database schema (30 migrations, 15 custom tables)
- [x] Set up Laravel Fortify with Vue/Inertia auth pages (7 pages: login, register, forgot/reset password, verify email, confirm password, 2FA challenge)
- [x] Implement 2FA (TOTP via Fortify)
- [x] Configure spatie roles: `admin` and `customer`
- [x] Set up middleware: auth, role-based, rate limiting, HandleInertiaRequests, EnsureUserNotSuspended
- [x] Create 14 Eloquent models with factories, relationships, and casts
- [x] Create seeders (roles/permissions, plans, admin user)
- [x] Build customer dashboard + admin dashboard (placeholder)
- [x] Set up Pest testing framework (24 Phase 1 tests passing)
- [x] Dark mode UI across all pages
- [ ] Configure Cloudflare Zero Trust for admin panel
- [ ] Set up GitHub Actions CI/CD pipeline
- [ ] Create staging environment (staging.account.ezscale.cloud)
- [ ] Configure Mailgun or SendGrid for emails
- [ ] Set up testing framework (PHPUnit/Pest)
## Phase 2: Billing & Subscriptions
- [ ] Implement `BillingServiceInterface` abstraction
- [ ] Build `StripeBillingService` (wraps Laravel Cashier)
- [ ] Build `PayPalBillingService` (wraps srmklive/laravel-paypal)
- [ ] Create plan catalog with all service types:
- [ ] VPS plans (various tiers with pricing)
- [ ] Dedicated server plans
- [ ] Web hosting plans
- [ ] Game server plans (Minecraft, ARK, etc.)
- [ ] Implement subscription creation flow (select plan → payment → provision)
- [ ] Build payment method management (multiple cards/PayPal per customer)
- [ ] Implement invoice generation (PDF, custom numbering, multi-currency)
- [ ] Set up webhook handlers for Stripe and PayPal
- [ ] Implement proration logic for upgrades/downgrades
- [ ] Build dunning system (failed payment handling, retry logic)
- [ ] Implement coupon system:
- [ ] Coupon creation and management (admin)
- [ ] Coupon redemption (customer checkout)
- [ ] Usage tracking and expiry
## Phase 2: Billing & Subscriptions
- [x] Implement `BillingServiceInterface` abstraction
- [x] Build `StripeBillingService` (wraps Laravel Cashier)
- [x] Build `PayPalBillingService` (wraps srmklive/laravel-paypal)
- [x] Create plan catalog with seeder (6 sample plans across VPS, dedicated, hosting, game)
- [x] Implement subscription creation flow (plan browsing → checkout → payment → coupon support)
- [x] Build payment method management (add/remove/set default via Stripe)
- [x] Build invoice and transaction history pages (paginated, download support)
- [x] Set up webhook handlers for Stripe and PayPal
- [x] Build subscription management (cancel/resume/swap plan)
- [x] Build dunning system (DunningService + scheduled ProcessDunning command)
- [x] Implement coupon system (validation, redemption, percentage/fixed discounts)
- [x] Automatic suspension policy (grace period → suspend → terminate)
- [x] Event-driven architecture (PaymentSucceeded/Failed, SubscriptionCreated/Cancelled)
- [x] 8 Vue pages for billing flow (plans, checkout, subscriptions, billing/invoices/transactions)
- [x] 29 Phase 2 tests (53 total passing)
- [ ] Invoice PDF generation (dedicated package)
- [ ] Multi-currency support (EUR, GBP, USD, etc.)
- [ ] Tax calculation integration (TaxJar/Avalara or manual rates)
- [ ] Automatic suspension policy (X days past due → suspend → Y days → terminate)
- [ ] Proration logic for upgrades/downgrades (Cashier swap method)
- [ ] Admin coupon management CRUD
- [ ] Email notifications for payment events
## Phase 3: Provisioning Automation
- [ ] Create `ProvisioningServiceInterface` abstraction