- Add highly optimized Dockerfile with Nginx and PHP-FPM 8.4
- Add docker-compose.yml configured with Redis and MariaDB 10.11
- Implement entrypoint.sh and supervisord.conf for background workers
- Refactor legacy IMAP scripts into scheduled Artisan Commands
- Secure app by removing old routes with hardcoded basic auth credentials
- Configure email attachments to use Laravel Storage instead of insecure public/tmp
- Remove single unique constraint on username
- Add composite unique constraint on username, username_type, and provider_type
- Update Filament username form validation with custom unique rule
- Add descriptive validation message for duplicate usernames
- Remove single unique constraint on domain name
- Add composite unique constraint on name, domain_type, and provider_type
- Update Filament domain form validation with custom unique rule
- Add descriptive validation message for duplicate domains
Add sandbox API keys, callback URL configuration, and additional payment options including currency, lifetime, fee settings, underpayment coverage, auto withdrawal, and mixed payment support to
the OxaPay provider seeder.
Add comprehensive webhook validation and processing system with Polar.sh integration:
- Create built-in Standard Webhooks package following official specification
- Implement HMAC-SHA256 signature validation with base64 encoding
- Add webhook factory for multi-provider support (Polar, Stripe, generic)
- Replace custom Polar webhook validation with Standard Webhooks implementation
- Add proper exception handling with custom WebhookVerificationException
- Support sandbox mode bypass for development environments
- Update Polar provider to use database-driven configuration
- Enhance webhook test suite with proper Standard Webhooks format
- Add PaymentProvider model HasFactory trait for testing
- Implement timestamp tolerance checking (±5 minutes) for replay protection
- Support multiple signature versions and proper header validation
This provides a secure, reusable webhook validation system that can be extended
to other payment providers while maintaining full compliance with Standard
Webhooks specification.
BREAKING CHANGE: Polar webhook validation now uses Standard Webhooks format
with headers 'webhook-id', 'webhook-timestamp', 'webhook-signature' instead of
previous Polar-specific headers.
- Add provider_checkout_id column to separate checkout ID from subscription ID
- Update Polar provider to store checkout ID separately and set subscription ID to null initially
- Implement smart sync logic that queries Polar API when subscription ID is missing
- Add fetchPolarSubscriptionId method to find active subscriptions via customer ID
- Update webhook handlers to use provider_checkout_id for subscription lookup
- Make makeAuthenticatedRequest public to enable Subscription model API access
- Support plan metadata matching for accurate subscription identification
- Add fallback to most recent active subscription when no exact match found
This resolves sync button issues by properly tracking checkout vs subscription IDs
and enables automatic subscription ID recovery when webhooks fail.
- Add PaymentProviderSeeder with initial provider data (Stripe, Lemon Squeezy, Polar, OxaPay, Crypto, Activation Key)
- Create migration to disable JSON constraints and change configuration column from JSON to TEXT
- Update PaymentProvider model cast from 'array' to 'encrypted:array' for secure configuration storage
- Add dynamic seeder discovery from database/seeders directory
- Create interactive checkbox interface for Unix systems with arrow key navigation
- Implement Windows-compatible fallback mode with number-based selection
- Add cross-platform terminal detection and appropriate interface handling
- Include descriptive information and default selection for each seeder
- Support bulk operations (select all/none) and individual toggling
- Create 7 new models with full relationships and business logic:
* PlanFeature: Define available features with categories and types
* PlanFeatureLimit: Manage usage limits per plan with trial overrides
* PlanPermission: Granular permissions system for features
* PlanProvider: Multi-provider payment configuration
* PlanTier: Hierarchical plan structure with upgrade paths
* PlanUsage: Real-time usage tracking and analytics
* TrialConfiguration: Advanced trial settings per plan
- Enhance Plan model with 25+ new methods:
* Feature checking: hasFeature(), canUseFeature(), getRemainingUsage()
* Permission system: hasPermission() with trial support
* Payment providers: getAllowedProviders(), supportsProvider()
* Trial management: hasTrial(), getTrialConfig()
* Upgrade paths: isUpgradeFrom(), getUpgradePath()
* Utility methods: getBillingCycleDisplay(), metadata handling
- Completely redesign PlanResource with tabbed interface:
* Basic Info: Core plan configuration with dynamic billing cycles
* Features & Limits: Dynamic feature management with trial overrides
* Payment Providers: Multi-provider configuration (Stripe, Lemon Squeezy, etc.)
* Trial Settings: Advanced trial configuration with always-visible toggle
- Create new Filament resources:
* PlanFeatureResource: Manage available features by category
* PlanTierResource: Hierarchical tier management with parent-child relationships
- Implement comprehensive data migration:
* Migrate legacy plan data to new enhanced system
* Create default features (mailbox accounts, email forwarding, etc.)
* Preserve existing payment provider configurations
* Set up trial configurations (disabled for legacy plans)
* Handle duplicate data gracefully with rollback support
- Add proper database constraints and indexes:
* Unique constraints on plan-feature relationships
* Foreign key constraints with cascade deletes
* Performance indexes for common queries
* JSON metadata columns for flexible configuration
- Fix trial configuration form handling:
* Add required validation for numeric fields
* Implement proper null handling with defaults
* Add type casting for all numeric fields
* Ensure database constraint compliance
- Add unified payment provider architecture with contract-based design
- Implement 6 payment providers: Stripe, Lemon Squeezy, Polar, Oxapay, Crypto, Activation Keys
- Create subscription management with lifecycle handling (create, cancel, pause, resume, update)
- Add coupon system with usage tracking and trial extensions
- Build Filament admin resources for payment providers, subscriptions, coupons, and trials
- Implement payment orchestration service with provider registry and configuration management
- Add comprehensive payment logging and webhook handling for all providers
- Create customer analytics dashboard with revenue, churn, and lifetime value metrics
- Add subscription migration service for provider switching
- Include extensive test coverage for all payment functionality
- Add proper Tests\ namespace to all test classes in tests/Feature and tests/Unit
- Split RemainingModelsTest.php into separate files (PSR-4 compliance)
- Create missing factories: MetaFactory, RemoteEmailFactory
- Add HasFactory trait to RemoteEmail model
- Add missing ReflectionClass imports to test files
- Fix mass assignment issues in Meta and RemoteEmail models
- Override database connection for RemoteEmail in testing environment
- Fix DateTime comparison precision issues in tests
- Fix Laravel bootstrap issues in TestCase setup
- Add missing database factories (Setting, PremiumEmail, ActivationKey, etc.)
- Convert Pest tests to PHPUnit style for compatibility
- Fix model relationships and boolean casts
- Add missing Filament resource actions and filters
- Fix form validation and test data mismatches
- Resolve assertion parameter order issues
- Add proper configuration for test views
- Fix searchable columns and table sorting
- Simplify complex filter assertions for stability