Commit Graph

30 Commits

Author SHA1 Message Date
idevakk
c312ec3325 feat: Prepare Zemailnator for Dokploy deployment
- 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
2026-02-28 23:17:39 +05:30
idevakk
4028a9a21e feat(usernames): update unique constraint to composite with type and provider
- 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
2025-12-09 10:14:50 -08:00
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
0724e6da43 feat(payments): implement smart Polar subscription sync with checkout tracking
- 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.
2025-12-06 02:37:52 -08:00
idevakk
34183dc3cb feat(payment): implement secure 1:1 Polar customer binding system
- Add polar_cust_id column to users table for direct customer mapping
  - Rewrite PolarProvider customer logic to use stored customer IDs
  - Eliminate email-based customer lookup to prevent cross-user contamination
  - Implement self-healing mechanism for invalid customer IDs
  - Maintain external_id binding for Polar's reference system
  - Add comprehensive logging for customer lookup operations
2025-12-04 13:05:47 -08:00
idevakk
724a2d9a1f feat(payment): implement database-driven payment provider system with encrypted configuration support
- 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
2025-12-03 02:32:22 -08:00
idevakk
a33c0dfa95 chore: optimized migration files for mariadb 2025-11-27 06:44:48 -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
a7029b5f57 feat: add user impersonation service 2025-11-17 10:44:19 -08:00
idevakk
bbbaf3a234 feat: add Filament packages for enhanced admin functionality
- Add backstage/filament-mails for mail management interface
  - Add binarybuilds/filament-failed-jobs for failed job monitoring
  - Add gboquizosanchez/filament-log-viewer for application log viewing
  - Add jacobtims/filament-logger for enhanced logging capabilities
  - Extend Filament admin panel with comprehensive monitoring tools
  - Improve developer experience with better visibility into system operations
2025-11-17 06:33:07 -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
466a370f28 feat: add domain management system 2025-11-15 11:40:04 -08:00
idevakk
d9291f06eb feat: add performance indexes to optimize database queries 2025-11-14 03:41:46 -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
391af8a778 chore: add admin seeder & add collation only to mysql database in plans table and activation table 2025-11-09 03:25:19 -08:00
Gitea
30bd0c2712 updated plan, and oxapay integration 2025-06-21 04:09:08 +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
671cb6212d added not subscribed page, added premium inbox 2025-05-06 07:21:39 +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
08e1110abd Added blog, pages, menu, category 2025-04-28 01:09:25 +05:30
Gitea
94eb01b1ab Added almost all features except language, ads, seo, pages 2025-04-27 06:28:15 +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
Gitea
59a2c07d81 Initial Commit 2025-04-23 02:28:54 +05:30