Commit Graph

41 Commits

Author SHA1 Message Date
idevakk
1c4298cdaf feat(domains): update unique constraint to composite with type and provider
- 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
2025-12-08 10:57:56 -08:00
idevakk
5fabec1f9d fix(plans): prevent deletion of plans with active subscriptions
- Fix bulk delete and individual delete actions using before() hook with halt()
  - Add daily/weekly billing cycle options to plan resource and Polar provider
  - Enhance payment confirmation with dynamic polling and loading states
  - Add graceful handling for deleted plans in subscription display
  - Update Polar provider to support dynamic billing cycles
2025-12-07 02:23:14 -08:00
idevakk
6056740a3f refactor: change group to 'Admin' for better navigation 2025-12-02 10:24:39 -08:00
idevakk
2eaf38e139 feat(failed-jobs): add database-agnostic failed jobs with bulk actions
- Create custom implementation to replace vendor plugin
  - Add database-agnostic JSON queries (MySQL, MariaDB, PG, SQLite, SQLSRV)
  - Implement Retry/Prune header actions with queue selection
  - Maintain all original features: filters, search, actions, bulk operations

  BREAKING CHANGE: New route /failed-jobs/compatible-failed-jobs

  Fixes MariaDB JSON syntax errors
2025-12-02 10:23:55 -08:00
idevakk
d767c6cf59 feat(plans): enhance plan management with dynamic providers, improved UI, and bug fixes
Dynamic Provider Integration:
  - Replace hardcoded provider arrays with database-driven payment_providers lookup
  - Display provider status (Active/Inactive) in selection dropdowns
  - Add provider_variant_id and provider_product_id input fields to plan configuration
  - Update EditPlan and SubscriptionForm with dynamic provider selection
  - Add empty state handling with helpful guidance when no providers exist

  UI/UX Improvements:
  - Format billing_cycle_days to readable text (Daily, Weekly, Monthly, Quarterly, Annually)
  - Add color-coded badges for billing cycle frequency
  - Fix plan_providers and plan_feature_limits count display with eager loading
  - Implement intelligent color coding for count indicators
  - Add visual status indicators for provider availability

  Database Compatibility:
  - Fix SQLite strftime() compatibility across all dashboard widgets
  - Fix CAST AS REAL syntax in ChurnAnalysis widget
  - Add database-agnostic date and cast expression methods
  - Support MySQL, SQLite, PostgreSQL, and SQL Server

  Bug Fixes:
  - Fix null reference error in SubscriptionForm provider_data access
  - Add null safety checks for new subscription creation
  - Optimize queries with withCount() to prevent N+1 issues

  Performance Optimizations:
  - Add eager loading with withCount() for relationship counts
  - Optimize plan provider and feature limit queries
  - Prevent N+1 query issues in resource tables

  BREAKING CHANGE: Plan provider configuration now uses dynamic provider options
  from payment_providers table instead of hardcoded list.
2025-12-02 09:47:51 -08:00
idevakk
e60973c391 fix(widgets): add multi-database compatibility to all dashboard widgets
Replace SQLite-specific functions with database-agnostic expressions to support
  MySQL, SQLite, PostgreSQL, and SQL Server across all Filament dashboard widgets.

  - Fix strftime() date formatting in SubscriptionMetrics, RevenueMetrics, and TrialPerformance
  - Fix CAST AS REAL syntax in ChurnAnalysis widget
  - Add getDateFormatExpression() method for date function compatibility
  - Add getCastExpression() method for CAST syntax compatibility
  - Support MySQL/MariaDB, SQLite, PostgreSQL, and SQL Server drivers
  - Maintain identical functionality across all database types

  Fixes multiple SQLSTATE[42000] syntax errors when using MySQL/MariaDB databases.
2025-12-02 07:09:30 -08:00
idevakk
9f45e37693 fix: resolve plan selection off-by-one error in activation key generator 2025-11-28 07:05:40 -08:00
idevakk
38ae2770ea chore: fix mrr calculation and grid import 2025-11-21 12:44:51 -08:00
idevakk
0baacdc386 feat: implements activation key as payment provider and migrate activation key to use unified payment system 2025-11-21 12:14:20 -08:00
idevakk
b497f7796d feat: implement comprehensive enhanced plan management system
- 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
2025-11-21 10:13:14 -08:00
idevakk
27ac13948c feat: implement comprehensive multi-provider payment processing system
- 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
2025-11-19 09:37:00 -08:00
idevakk
52a59eb143 feat: add impersonation log viewer in filament dashboard 2025-11-17 12:22:26 -08:00
idevakk
a7029b5f57 feat: add user impersonation service 2025-11-17 10:44:19 -08:00
idevakk
23cfd0c88d feat: add UserLevel enum and integrate it in User Modal, UserResource and UserFactory 2025-11-17 08:35:31 -08:00
idevakk
e330c4f90e refactor: remove unused Settings page and reorganize PlanResource navigation
- Remove unused Filament Settings.php page
  - Change PlanResource navigation group for better organization
  - Clean up obsolete settings page that is no longer needed
  - Update PlanResource navigation icon to OutlinedInboxStack
  - Improve navigation structure by relocating plan management
2025-11-17 05:49:12 -08:00
idevakk
7ac0a436b1 feat: add IMAP connection testing and website settings optimization
- Add dynamic IMAP connection testing for multiple account types (public, premium)
  - Implement testIMAPConnection method using ZEmail::connectMailBox for reliable testing
  - Add comprehensive error handling and user-friendly notifications
  - Support easy extension for future IMAP configurations (vip, etc.)
  - Add queued artisan command execution in WebsiteSettings (optimize, optimize:clear)
  - Enhance website settings with performance optimization controls
  - Add validation for IMAP extension availability and helpful error messages
2025-11-17 05:27:19 -08:00
idevakk
e3da8cf950 feat: add Website Settings, Imap Settings and Configuration Settings via inerba/filament-db-config 2025-11-16 10:56:48 -08:00
idevakk
ea0bc91251 feat: add username management system 2025-11-15 21:41:28 -08:00
idevakk
ca94c360ea feat: add domain management system 2025-11-15 19:57:01 -08:00
idevakk
466a370f28 feat: add domain management system 2025-11-15 11:40:04 -08:00
idevakk
ae795880ed chore: code refactor via rector 2025-11-14 02:01:01 -08:00
idevakk
90ab79b3a2 chore: code styling via pint 2025-11-14 01:51:35 -08:00
idevakk
3892c48ef2 feat: upgrade filament to v4 and ensure 100% test coverage
- Upgrade Filament framework from v3 to v4
   - Update all Filament resources and pages for v4 compatibility
   - Fix test suite to maintain 100% pass rate (321 tests passing)
   - Add visibility condition for ticket close action (only when not closed)
   - Update dependencies and build assets for new Filament version
   - Maintain backward compatibility while leveraging v4 improvements
2025-11-14 01:42:07 -08:00
idevakk
68ef391c5d test: achieve 100% test coverage with comprehensive test suite fixes
- 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
2025-11-13 09:11:14 -08:00
idevakk
664637fa30 fix: add pre-check if imap is supported before trying to connect 2025-11-09 03:25:59 -08:00
Gitea
30bd0c2712 updated plan, and oxapay integration 2025-06-21 04:09:08 +05:30
Gitea
930144f8f8 updated stats, add logs and other data in user resource 2025-06-20 21:44:33 +05:30
Gitea
b43461e180 added email notification for TicketResource.php, add option to edit users - ban, unban 2025-05-18 21:50:24 +05:30
Gitea
c00cad3cf1 fixed minor bug 2025-05-17 20:36:54 +05:30
Gitea
175a7203f3 added support ticket and added more stat widgets 2025-05-17 05:11:29 +05:30
Gitea
93515e7845 added crypto pm and activation key system 2025-05-16 11:24:08 +05:30
Gitea
23b5a45d0b fixed blog images,
added custom add-on links,
added sitemap.xml
2025-05-14 00:56:04 +05:30
Gitea
887f6316f6 added outlook mail support 2025-05-13 17:37:05 +05:30
Gitea
cf010f018b stats overview 2025-05-08 09:56:13 +05:30
Gitea
3b9967a749 add dashboard mailbox, added usage log, pending-switch email, mailbox history, email history 2025-05-04 19:39:53 +05:30
Gitea
6e2a750c4e added cashier subscription, subscription plans 2025-05-03 06:13:19 +05:30
Gitea
797ab6ce98 Added Premium Domains and Gmail Users to dashboard, also added flush cache upon setting update 2025-05-02 19:06:24 +05:30
Gitea
08e1110abd Added blog, pages, menu, category 2025-04-28 01:09:25 +05:30
Gitea
b799ac3f9a Added Setting.php, [Logs, Messages] Model 2025-04-23 17:52:22 +05:30
Gitea
20ebb7e4a4 Added imap_setting to Setting Page 2025-04-23 04:44:46 +05:30
Gitea
65f6df64aa Added Website Setting Page 2025-04-23 02:44:47 +05:30