jmrashed / laravel-installer
A complete web installer for Laravel applications, making the setup process simple and user-friendly.
Installs: 69
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 2
Forks: 1
Open Issues: 0
pkg:composer/jmrashed/laravel-installer
Requires
- php: >=8.1.0
- illuminate/console: ^9.0|^10.0|^11.0
- illuminate/http: ^9.0|^10.0|^11.0
- illuminate/support: ^9.0|^10.0|^11.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.0
- mockery/mockery: ^1.4
- orchestra/testbench: ^7.0|^8.0|^9.0
- phpstan/phpstan: ^1.0
- phpunit/phpunit: ^9.5|^10.0
- squizlabs/php_codesniffer: ^3.6
Suggests
- jmrashed/laravel-core-application-service: To extend functionality with core application services.
README
Laravel Installer v2.0.0 is a complete enterprise-grade package designed to simplify and secure the installation process for Laravel projects. This installer features advanced security, performance monitoring, database backup/recovery, and a comprehensive 9-step installation process.
π What's New in v2.0.0
β Complete 9-Step Installation Process
- Welcome Screen - Introduction and overview
- Server Requirements - PHP version and extension checks
- File Permissions - Directory permission validation
- Dependencies Check - Composer dependency validation (NEW)
- Environment Setup - .env file configuration
- Database Configuration - Database connection setup
- Database Backup & Migration - Automated backup and migration (NEW)
- Cache & Queue Setup - Performance optimization (NEW)
- Performance Dashboard - Real-time monitoring (NEW)
π‘οΈ Enhanced Security Features
- XSS Protection - Input sanitization and validation
- Rate Limiting - IP-based request throttling (20 req/5min)
- Security Headers - CSP, Frame Options, XSS Protection
- Audit Logging - Comprehensive security event logging
- Suspicious Content Detection - Automatic threat detection
β‘ Performance Monitoring
- Real-time Metrics - Execution time, memory usage tracking
- Performance Dashboard - Interactive charts and graphs
- Database Optimization - Query optimization for large datasets
- Cache Management - Automated cache clearing and optimization
- Memory Optimization - Garbage collection and memory management
π Resumable Installation
- Progress Tracking - Visual progress indicators
- State Persistence - Resume interrupted installations
- Step Validation - Prevent skipping required steps
- Error Recovery - Automatic rollback on failures
πΎ Database Backup & Recovery
- Pre-migration Backup - Automatic database backup
- Multi-database Support - MySQL, PostgreSQL, SQLite
- Rollback Capability - Restore on migration failures
- Batch Processing - Handle large database migrations
π Statistics
π Features
Core Features
- β System Requirements Check - PHP version and extension validation
- β Environment File Setup - Interactive .env configuration
- β Database Configuration - Multi-database support with testing
- β Purchase Code Validation - Envato marketplace integration
- β User-Friendly Interface - Modern responsive design
v2.0.0 New Features
- β Dependency Management - Composer package validation and installation
- β Performance Monitoring - Real-time metrics and optimization
- β Security Enhancements - XSS protection, rate limiting, audit logging
- β Database Backup/Recovery - Automated backup with rollback capability
- β Cache & Queue Setup - Redis, database, sync queue configuration
- β Progress Tracking - Resumable installation with state persistence
- β Multi-language Support - 18+ languages supported
- β API Endpoints - RESTful APIs for all installation operations
π οΈ Installation
Step 1: Install Package
composer require jmrashed/laravel-installer
Step 2: Publish Configuration
php artisan vendor:publish --provider="Jmrashed\LaravelInstaller\Providers\LaravelInstallerServiceProvider"
php artisan vendor:publish --tag=installer-config
Step 3: Publish Assets (Optional)
php artisan vendor:publish --tag=laravelinstaller --force
π How to Use
Web Interface
Navigate to /install
in your browser to start the installation wizard.
Command Line
php artisan installer:run
Clear Installer Caches
php artisan installer:clear-caches
Demo Screenshots
π§ API Endpoints
Progress Tracking
GET /install/api/progress
- Get installation progressPOST /install/api/progress/update
- Update progress step
Dependencies
GET /install/api/dependencies/check
- Check dependenciesPOST /install/api/dependencies/install
- Install packages
Performance
GET /install/api/performance/metrics
- Get real-time metricsPOST /install/api/performance/optimize
- Optimize performance
Database
POST /install/api/database/migrate
- Run migrations with backupPOST /install/api/database/rollback
- Rollback to backup
Cache & Queue
POST /install/api/cache/clear
- Clear all cachesPOST /install/api/queue/setup
- Configure queue drivers
π‘οΈ Security Features
Input Validation
// All inputs are sanitized and validated $sanitizedInput = SecurityHelper::sanitizeInput($request->input());
Rate Limiting
// IP-based rate limiting (20 requests per 5 minutes) RateLimiter::attempt('installer:' . $request->ip(), 20, 300);
Security Headers
X-Content-Type-Options: nosniff
X-Frame-Options: DENY
X-XSS-Protection: 1; mode=block
Content-Security-Policy: default-src 'self'
β‘ Performance Features
Real-time Monitoring
// Performance metrics are tracked automatically fetch('/install/api/performance/metrics') .then(response => response.json()) .then(data => { console.log('Execution Time:', data.execution_time); console.log('Memory Usage:', data.memory_used); });
Database Optimization
// Large database handling DatabaseOptimizer::optimizeForLargeDatabase(); DatabaseOptimizer::runMigrationsInBatches(10);
πΎ Database Backup
Automatic Backup
// Backup is created automatically before migrations $backupId = DatabaseBackupManager::createBackup();
Manual Rollback
// Rollback to previous state DatabaseBackupManager::restoreBackup($backupId);
π Progress Tracking
Check Progress
$progress = ProgressTracker::getProgress(); echo "Current Step: " . $progress['current_step']; echo "Completion: " . $progress['completion_percentage'] . "%";
Resume Installation
if (ProgressTracker::canResume('database')) { // Continue from database step }
π Envato Integration
API Configuration
// Update API endpoints in PurchaseController $envatoApiTokenUrl = 'https://your-domain.com/api/get-envato-barrier-token'; $envatoApiStoreUrl = 'https://your-domain.com/api/store-envato-verification-response';
Sample API Response
{ "message": "Welcome to the Envato Purchase Validation API", "account1": { "token": "fsHuTBwXZTlEqZYQacniBeNZFCrT01eZ" }, "validation": { "url": "https://api.envato.com/v3/market/author/sale" } }
π v2.0.0 Directory Structure
src/
βββ Commands/
β βββ ClearInstallerCaches.php
β βββ InstallerRunCommand.php
βββ Config/
β βββ installer.php
β βββ audit.php
β βββ logging.php
βββ Controllers/
β βββ CacheQueueController.php # NEW
β βββ DatabaseController.php # ENHANCED
β βββ DependencyController.php # NEW
β βββ PerformanceController.php # NEW
β βββ ProgressController.php # NEW
β βββ [existing controllers...]
βββ Helpers/
β βββ BackupManager.php # NEW
β βββ CacheQueueManager.php # NEW
β βββ DatabaseBackupManager.php # NEW
β βββ DependencyChecker.php # NEW
β βββ PerformanceMonitor.php # NEW
β βββ ProgressTracker.php # NEW
β βββ SecurityHelper.php # NEW
β βββ [existing helpers...]
βββ Middleware/
β βββ SecurityMiddleware.php # NEW
β βββ PerformanceMiddleware.php # NEW
β βββ ProgressMiddleware.php # NEW
β βββ DependencyMiddleware.php # NEW
β βββ [existing middleware...]
βββ Views/
β βββ dependencies.blade.php # NEW
β βββ performance-dashboard.blade.php # NEW
β βββ cache-queue.blade.php # NEW
β βββ database-backup.blade.php # NEW
β βββ resume-installation.blade.php # NEW
β βββ [existing views...]
βββ Routes/
βββ web.php # ENHANCED
βββ backup.php # NEW
π§ System Requirements
Minimum Requirements
- PHP: 8.0 or higher
- Laravel: 9.0 or higher
- Memory: 128MB minimum, 512MB recommended
- Disk Space: 50MB for package files
Required PHP Extensions
mbstring
- String manipulationopenssl
- Encryption and securitypdo
- Database connectivitytokenizer
- Code parsingxml
- XML processingctype
- Character type checkingjson
- JSON processingcurl
- HTTP requests (for Envato API)
Optional Extensions
redis
- For Redis queue/cache supportopcache
- For performance optimizationzip
- For backup compression
π Release Information
Version: v2.0.0
Release Date: December 19, 2024
Status: Production Ready
Breaking Changes: Yes (major version upgrade)
Migration from v1.x
# Backup your current installation cp -r vendor/jmrashed/laravel-installer vendor/jmrashed/laravel-installer-backup # Update to v2.0.0 composer update jmrashed/laravel-installer # Republish configuration php artisan vendor:publish --tag=installer-config --force
π€ Contributing
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature
- Commit changes:
git commit -m 'Add amazing feature'
- Push to branch:
git push origin feature/amazing-feature
- Open a Pull Request
π License
This package is licensed under the MIT License.
π¬ Support
- GitHub Issues: Report bugs and request features
- Documentation: Full documentation
- Email Support: Contact us directly for enterprise support
Author
Md Rasheduzzaman
Full-Stack Software Engineer & Technical Project Manager
Building scalable, secure & AI-powered SaaS platforms across ERP, HRMS, CRM, LMS, and E-commerce domains.
Over 10 years of experience leading full-stack teams, cloud infrastructure, and enterprise-grade software delivery.
π Portfolio: jmrashed.github.io
βοΈ Email: jmrashed@gmail.com
πΌ LinkedIn: linkedin.com/in/jmrashed
π Blog: medium.com/@jmrashed
π» GitHub: github.com/jmrashed
βNeed a Reliable Software Partner? I build scalable, secure & modern solutions for startups and enterprises.β