Skip to content

Commit 9064de4

Browse files
committed
feat!: better cache layers and more optimized and simpler discovery flows
1 parent 654ccc4 commit 9064de4

30 files changed

+1643
-4521
lines changed

README.md

Lines changed: 237 additions & 787 deletions
Large diffs are not rendered by default.

composer.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,7 @@
4545
],
4646
"require": {
4747
"php": ">=8.2",
48-
"filament/filament": "^4.0",
49-
"nwidart/laravel-modules": "^11.0|^12.0"
48+
"filament/filament": "^4.0"
5049
},
5150
"autoload": {
5251
"psr-4": {

config/modulite.php

Lines changed: 47 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -188,11 +188,25 @@
188188
*/
189189
'registration' => [
190190
'auto_register' => env('MODULITE_AUTO_REGISTER_COMPONENTS', true),
191-
'sort_by' => 'name', // 'name', 'priority', 'none'
192-
'validate_before_register' => app()->hasDebugModeEnabled(),
191+
'sort_by' => env('MODULITE_SORT_COMPONENTS', 'none'), // 'name', 'priority', 'none'
192+
'validate_before_register' => env('MODULITE_VALIDATE_COMPONENTS', app()->hasDebugModeEnabled()),
193193
'group_by_module' => true,
194194
],
195195

196+
/*
197+
|--------------------------------------------------------------------------
198+
| Component Discovery Performance
199+
|--------------------------------------------------------------------------
200+
|
201+
| Performance settings for component discovery process.
202+
|
203+
*/
204+
'discovery' => [
205+
'cache_discovery_stats' => env('MODULITE_CACHE_DISCOVERY_STATS', false),
206+
'skip_disabled_modules' => env('MODULITE_SKIP_DISABLED_MODULES', true),
207+
'batch_component_scans' => env('MODULITE_BATCH_COMPONENT_SCANS', true),
208+
],
209+
196210
/*
197211
|--------------------------------------------------------------------------
198212
| Scanning Options
@@ -286,6 +300,22 @@
286300
'enabled' => true,
287301
'max_items' => 1000,
288302
],
303+
304+
/*
305+
|--------------------------------------------------------------------------
306+
| Performance Optimizations
307+
|--------------------------------------------------------------------------
308+
|
309+
| Additional performance optimizations for production environments.
310+
| These settings are automatically optimized for production vs development.
311+
|
312+
*/
313+
'optimizations' => [
314+
'static_caching' => env('MODULITE_STATIC_CACHING', true),
315+
'defer_validation' => env('MODULITE_DEFER_VALIDATION', !app()->hasDebugModeEnabled()),
316+
'skip_duplicate_panels' => env('MODULITE_SKIP_DUPLICATE_PANELS', true),
317+
'disable_reflection' => env('MODULITE_DISABLE_REFLECTION', app()->isProduction()),
318+
],
289319
],
290320

291321
/*
@@ -348,10 +378,24 @@
348378
| Module Integration
349379
|--------------------------------------------------------------------------
350380
|
351-
| Configure integration with nwidart/laravel-modules package.
381+
| Configure integration with different module management packages.
352382
|
353383
*/
354384
'modules' => [
385+
/*
386+
|--------------------------------------------------------------------------
387+
| Module System Approach
388+
|--------------------------------------------------------------------------
389+
|
390+
| Specify which module management system you're using:
391+
| - 'nwidart': Use nwidart/laravel-modules package
392+
| - 'panicdevs': Use panicdevs/modules package
393+
|
394+
| This determines how Modulite discovers and interacts with your modules.
395+
|
396+
*/
397+
'approach' => env('MODULITE_APPROACH', 'panicdevs'),
398+
355399
/*
356400
|--------------------------------------------------------------------------
357401
| Module System Integration

src/Attributes/ComponentDiscovery.php

Lines changed: 0 additions & 233 deletions
This file was deleted.

0 commit comments

Comments
 (0)