From ea6b04f3f47bbee42940e934be7de07629bf79b5 Mon Sep 17 00:00:00 2001 From: Arturo Corro Date: Thu, 29 May 2025 10:05:27 -0600 Subject: [PATCH] Prepare Beta Version --- config/auth.php | 117 ++++++ config/keyvault_db.php | 20 - config/koneko.php | 16 +- config/koneko_admin.php | 107 ----- config/koneko_key_vault.php | 57 +++ config/koneko_key_vault_db.php | 16 + config/koneko_layout.php | 48 +++ config/{logging.php => koneko_logging.php} | 0 config/koneko_security.php | 59 +++ config/koneko_ui.php | 39 ++ config/vuexy_menu.php | 19 +- ..._082230_create_vault_client_keys_table.php | 78 ++++ ...024_12_14_082234_create_settings_table.php | 132 +++--- ...4_12_14_082235_create_vault_keys_table.php | 56 --- docs/.html | 68 ---- docs/Helpers/cache-helper-guide.md | 20 +- .../component-access-and-exposure-policy.md | 6 +- docs/Helpers/security-logger-helper-guide.md | 2 +- resources/assets/js/utils/favicon.js | 18 + resources/scss/app.scss | 2 +- .../layouts/vuexy/sections/styles.blade.php | 2 +- .../navbar/vuexy-quicklinks.blade.php | 8 +- .../menu-access-cards.blade copy.php | 6 +- .../dashboard/menu-access-cards.blade.php | 11 +- routes/koneko.php | 2 - .../Extenders/Api/ApiModuleRegistry.php | 4 +- src/Application/Bootstrap/KonekoModule.php | 291 ++++--------- .../{ => Manager}/KonekoModuleBootManager.php | 110 ++--- .../{ => Registry}/KonekoModuleRegistry.php | 15 +- .../___KonekoComponentContextRegistrar.php} | 11 +- .../Builders/KonekoAdminVarsBuilder copy.php | 104 +++++ .../Cache/Builders/KonekoAdminVarsBuilder.php | 114 ++++++ .../KonekoVuexyCustomizerVarsBuilder.php | 28 ++ .../Cache/Builders/SettingCacheKeyBuilder.php | 100 +++++ src/Application/Cache/CacheConfigService.php | 301 -------------- .../Contracts/CacheRepositoryInterface.php | 67 +++ .../Cache/Driver/KonekoCacheDriver.php | 34 ++ .../Cache/KonekoCacheManager copy 2.php | 186 --------- .../Cache/KonekoCacheManager copy.php | 185 --------- src/Application/Cache/KonekoCacheManager.php | 232 ----------- .../Cache/KonekoSessionManager.php | 155 ------- .../Manager/Concerns/___HasCacheContext.php | 21 + .../Cache/Manager/KonekoCacheManager.php | 181 +++++++++ .../{ => Manager}/LaravelCacheManager.php | 4 +- .../Cache/Services/KonekoVarsService.php | 131 ++++++ .../Cache/VuexyVarsBuilderService.php | 191 --------- .../Config/Cast/VuexyLayoutCast.php | 17 + .../Contracts/ConfigRepositoryInterface.php | 64 +++ .../Manager/Concerns/HasConfigContext.php | 62 +++ .../Config/Manager/KonekoConfigManager.php | 257 ++++++++++++ .../Manager/___KonekoConfigManager copy.php | 149 +++++++ .../Config/Registry/ConfigBlockRegistry.php | 37 ++ .../___KonekoConfigResolverService.php | 146 +++++++ .../ExternalApiRegistryInterface.php | 32 -- .../Catalogs/CatalogServiceInterface.php | 13 - ...robabilisticAttributesFactoryInterface.php | 11 - .../Modules/VuexyModuleServiceInterface.php | 89 ---- .../SettingsRepositoryInterface copy.php | 44 -- .../Settings/SettingsRepositoryInterface.php | 32 -- src/Application/CoreModule.php | 9 + .../Enums/ExternalApi/ApiProvider.php | 31 -- .../Enums/Settings/SettingEnvironment.php | 15 - .../Enums/Settings/SettingScope.php | 16 - .../Notifications/NotificationEmitted.php | 36 ++ .../Events/Settings/SettingChanged.php | 19 - .../___VuexyCustomizerSettingsUpdated.php} | 0 .../Helpers/KonekoCatalogHelper.php | 2 +- src/Application/Helpers/VuexyHelper.php | 9 +- .../Controllers/VuexyNavbarController.php | 30 +- .../Controllers/___AuthUserController.php | 146 ------- .../Http/Controllers/___VuexyController.php | 190 --------- .../Middleware/AdminTemplateMiddleware.php | 20 +- .../Authentication/HandleFailedLogin.php | 2 +- .../Authentication/HandleUserLogout.php | 11 +- .../Settings/ApplyVuexyCustomizerSettings.php | 20 - .../Settings/SettingCacheListener.php | 23 -- .../Logger/____SystemLoggerService.php | 82 ---- .../____UserInteractionLoggerService.php | 68 ---- .../Contracts}/SecurityLoggerInterface.php | 0 .../Contracts}/SystemLoggerInterface.php | 0 .../UserInteractionLoggerInterface.php | 0 .../KonekoSecurityAuditLogger.php | 2 +- .../KonekoSecurityLogger.php | 10 +- .../KonekoSystemLogger.php | 15 +- .../KonekoUserInteractionLogger.php | 8 +- .../Macros/___LogMacrosServiceProvider.php | 29 -- .../Macros/___SettingsScopesMacro.php | 42 -- .../Macros/___VuexyAdminLoggerMacro.php | 27 -- .../Macros/___VuexyAdminSettingsMacro.php | 167 -------- .../ModulePackageAnalyzerService.php | 0 .../ModulePackageGitFetcher.php | 0 .../ModulePackageInstallPreviewService.php | 0 .../ModulePackageInstallerService.php | 0 .../ModulePackageRegistrarService.php | 0 .../ModulePackageZipDownloader.php | 0 .../RBAC/{ => Sync}/KonekoRbacSyncManager.php | 5 +- src/Application/Security/VaultKeyService.php | 64 --- .../Main/HandlesSeederLoggingAndReporting.php | 2 +- .../Concerns}/Main/HasSeederChunkSupport.php | 2 +- .../Main/HasSeederFactorySupport.php | 2 +- .../Concerns}/Main/HasSeederLogger.php | 2 +- .../Concerns}/Main/HasSeederProgressBar.php | 2 +- .../Main/SanitizeRowWithFillableAndCasts.php | 2 +- .../Seeding/SeederOrchestrator.php | 7 +- .../Concerns/HasSettingAttributes.php | 54 +++ .../Settings/Concerns/HasSettingCache.php | 137 +++++++ .../Concerns/HasSettingEncryption.php | 81 ++++ .../Concerns/HasSettingFileSupport.php | 68 ++++ .../Settings/Concerns/HasSettingMetadata.php | 23 ++ .../Contracts/SettingsRepositoryInterface.php | 122 ++++++ .../Settings/Manager/KonekoSettingManager.php | 383 ++++++++++++++++++ .../Settings/Registry/ScopeRegistry.php | 98 +++++ src/Application/Settings/SettingDefaults.php | 14 + .../System/KonekoSettingManager copy 2.php | 333 --------------- .../System/KonekoSettingManager copy 3.php | 234 ----------- .../System/KonekoSettingManager copy.php | 137 ------- .../System/KonekoSettingManager.php | 120 ------ .../System/___ExternalApiRegistryService.php | 72 ---- .../System/___RbacManagerService.php | 109 ----- src/Application/System/___SettingsService.php | 328 --------------- .../HandlesIndexColumns.php | 0 .../HandlesIndexLabels.php | 0 .../HandlesModelMetadata.php | 0 .../HandlesQueryBuilder.php | 0 .../HandlesTableConfig.php | 0 .../Traits/Indexing/HandlesFactory.php | 16 - .../Traits/System/Context/HasBaseContext.php | 316 +++++++++++++++ .../Context/HasBaseContextValidator.php | 69 ++++ .../Context/HasCacheContextValidation.php | 24 ++ .../Context/HasConfigContextValidation.php | 26 ++ .../System/Context/HasContextQueryBuilder.php | 122 ++++++ .../Context/HasSettingsContextValidation.php | 24 ++ .../UI/Avatar/AvatarImageService.php | 5 +- .../KonekoVuexy/Plugins/VuexyQuicklinks.php | 21 +- .../Pages/Dashboards/MenuAccessCards copy.php | 281 ------------- .../Pages/Dashboards/MenuAccessCards.php | 4 +- .../EnvironmentVarsOffCanvasForm.php | 16 +- .../VuexyInterface/VuexyInterfaceIndex.php | 6 +- .../Settings/WebInterface/AppFaviconCard.php | 10 +- .../WebInterface/LogoOnDarkBgCard.php | 10 +- .../WebInterface/LogoOnLightBgCard.php | 10 +- .../VuexyBreadcrumbsBuilder.php} | 4 +- .../___VuexyConfigSynchronizer.php} | 30 +- .../___VuexyLayoutConfigSynchronizer.php | 68 ++++ .../WebAdminImageHandler.php} | 6 +- ...uilderService.php => VuexyMenuBuilder.php} | 9 +- .../UX/Menu/VuexyMenuFormatter.php | 177 ++++---- .../UX/Menu/VuexyMenuMergeService.php | 81 ---- src/Application/UX/Menu/VuexyMenuRegistry.php | 12 +- ...Service.php => VuexyQuicklinksBuilder.php} | 183 +++++---- ...rService.php => VuexySearchBarBuilder.php} | 61 ++- .../Notifications/Builder/NotifyBuilder.php | 86 ++++ .../Builder/VuexyNotificationsBuilder.php | 37 ++ .../Concerns/ResolvesNotifySettings.php | 42 ++ .../NotificationChannelDriverInterface.php | 23 ++ .../Drivers/ToastToastrDriver.php | 40 ++ .../Manager/KonekoNotifyManager.php | 36 ++ .../Registry/NotificationChannelRegistry.php | 49 +++ .../Notifications/Support/NotifyPayload.php | 33 ++ .../VuexyNotificationsBuilderService.php | 29 -- .../___VuexyNotificationDispatcher.php | 88 ---- .../CustomResetPasswordNotification.php | 0 .../Helpers/VuexyNotifyHelper.php | 0 .../Helpers/VuexyToastrHelper.php | 0 .../Manager}/NotifyChannelManager.php | 2 +- .../Vault/Drivers/VaultKeyApiDriver.php | 39 ++ src/Application/Vault/VaultKeyClient.php | 97 +++++ src/Application/Vault/VaultKeyService.php | 98 +++++ .../{ => Cache}/KonekoCacheHelperCommand.php | 20 +- .../DownloadGeoIpDatabase.php | 2 +- .../{ => Layout}/VuexyMenuBuildCommand.php | 14 +- .../VuexyMenuListModulesCommand.php | 4 +- .../VuexyDeviceTokenPruneCommand.php | 2 +- .../{ => Orquestator}/ApisReportCommand.php | 2 +- .../VuexyListCatalogsCommand.php | 2 +- .../VuexyModuleInstallCommand.php | 2 +- .../{ => Orquestator}/VuexySeedCommand.php | 2 +- .../Commands/{ => RBAC}/VuexyRbacCommand.php | 8 +- .../{ => UI}/VuexyAvatarInitialsCommand.php | 2 +- .../KonekoVaultKeyCommand.old.php} | 6 +- .../Commands/Vault/VaultKeyInfoCommand.php | 48 +++ .../Commands/Vault/VaultKeyRotateCommand.php | 40 ++ .../Commands/Vault/VaultResetCommand.php | 43 ++ .../Commands/VuexyRbacCommand copy.php | 89 ---- src/Database/Factories/DeviceTokenFactory.php | 2 +- .../Factories/NotificationFactory.php | 4 +- .../Factories/SystemNotificationFactory.php | 4 +- src/Database/Factories/UserFactory.php | 5 +- src/Database/Seeders/DeviceTokenSeeder.php | 2 +- src/Database/Seeders/NotificationSeeder.php | 2 +- src/Database/Seeders/RbacSeeder.php | 2 +- src/Database/Seeders/SettingSeeder.php | 2 +- .../Seeders/SystemNotificationSeeder.php | 2 +- src/Database/Seeders/UserSeeder.php | 4 +- src/Models/Notification.php | 2 +- src/Models/PermissionMeta.php | 2 +- src/Models/SecurityEvent.php | 4 +- src/Models/Setting.php | 336 +++++++++------ src/Models/SystemNotification.php | 4 +- src/Models/UserLogin.php | 2 +- src/Models/VaultClientKey.php | 87 ++++ src/Models/VaultKey.php | 118 ------ src/Providers/Concerns/EnforcesHttps.php | 19 + .../Concerns/RegistersTrustedProxies.php | 16 +- src/Providers/FortifyServiceProvider.php | 16 +- src/Providers/VuexyAdminServiceProvider.php | 10 +- .../AbstractTableConfigBuilder.php | 2 - .../Cache/AbstractCachedBuilderService.php | 99 ----- .../Cache/AbstractKeyValueCacheBuilder.php | 250 ------------ .../Catalogs/AbstractCatalogService.php | 2 +- .../Contracts/Enums/LabeledEnumInterface.php | 0 .../Contracts/Files/ParsableFileInterface.php | 2 +- .../Contracts/Flags/FlagEnumInterface.php | 0 .../Contracts/Seeders/DataSeederInterface.php | 0 .../Enums/ExternalApi/ApiAuthType.php | 2 +- .../Enums/ExternalApi/ApiEnvironment.php | 2 +- .../Notifications/NotificationChannel.php} | 4 +- .../Enums/Permissions/PermissionAction.php | 2 +- .../SecurityEvents/SecurityEventStatus.php | 2 +- .../SecurityEvents/SecurityEventType.php | 2 +- .../Enums/SystemLog/LogLevel.php | 2 +- .../Enums/SystemLog/LogTriggerType.php | 2 +- .../SystemNotificationPriority.php | 2 +- .../SystemNotificationScope.php | 2 +- .../SystemNotificationStyle.php | 2 +- .../SystemNotificationType.php | 2 +- .../InteractionSecurityLevel.php | 2 +- .../{ => Base}/AbstractModelFactory.php | 2 +- .../GeoLocationResolver.php | 0 .../Macros/StrMacros.php | 2 +- src/Support/Parsers/CsvParser.php | 2 +- src/Support/Parsers/JsonParser.php | 2 +- src/Support/Parsers/ParserFactory.php | 2 +- src/Support/Parsers/XlsxParser.php | 2 +- src/Support/Routing/RouteScope.php | 2 +- .../Seeders/{ => Base}/AbstractDataSeeder.php | 4 +- src/Support/Traits/Auth/HasResolvableUser.php | 36 ++ .../Traits/Cache/HasCacheManagerHelpers.php | 40 ++ .../Cache/InteractsWithKonekoVarsCache.php | 118 ------ .../Traits/Cache/___KonekoCacheSupport.php | 161 -------- .../HandlesStaticRegistryMerge.php | 0 .../HasLabeledEnumHelpers.php | 0 .../HasUserFactoryFlagsExtension.php | 2 +- .../HasGeolocation.php | 2 +- .../Livewire/Cache/HasKonekoCacheSupport.php | 66 --- .../HandlesAsyncNotifications.php | 19 - .../HasDynamicModelExtenders.php | 0 .../Traits/Model/HasVuexyModelMetadata.php | 2 +- .../Traits/Modules/KonekoModuleBoots.php | 4 +- .../Modules/____BootsVuexyModule copy.php | 58 --- .../____DispatchesVuexyNotifications.php | 74 ---- .../Traits/Seeders/HandlesFileSeeders.php | 2 +- src/helpers.php | 186 ++++++--- src/vuexy-admin.module.php | 73 ++-- 254 files changed, 5653 insertions(+), 6569 deletions(-) create mode 100644 config/auth.php delete mode 100644 config/keyvault_db.php delete mode 100644 config/koneko_admin.php create mode 100644 config/koneko_key_vault.php create mode 100644 config/koneko_key_vault_db.php create mode 100644 config/koneko_layout.php rename config/{logging.php => koneko_logging.php} (100%) create mode 100644 config/koneko_security.php create mode 100644 config/koneko_ui.php create mode 100644 database/migrations/2024_12_14_082230_create_vault_client_keys_table.php delete mode 100644 database/migrations/2024_12_14_082235_create_vault_keys_table.php delete mode 100644 docs/.html create mode 100644 resources/assets/js/utils/favicon.js rename src/Application/Bootstrap/{ => Manager}/KonekoModuleBootManager.php (72%) rename src/Application/Bootstrap/{ => Registry}/KonekoModuleRegistry.php (90%) rename src/Application/Bootstrap/{KonekoComponentContextRegistrar.php => Registry/___KonekoComponentContextRegistrar.php} (92%) create mode 100644 src/Application/Cache/Builders/KonekoAdminVarsBuilder copy.php create mode 100644 src/Application/Cache/Builders/KonekoAdminVarsBuilder.php create mode 100644 src/Application/Cache/Builders/KonekoVuexyCustomizerVarsBuilder.php create mode 100644 src/Application/Cache/Builders/SettingCacheKeyBuilder.php delete mode 100644 src/Application/Cache/CacheConfigService.php create mode 100644 src/Application/Cache/Contracts/CacheRepositoryInterface.php create mode 100644 src/Application/Cache/Driver/KonekoCacheDriver.php delete mode 100644 src/Application/Cache/KonekoCacheManager copy 2.php delete mode 100644 src/Application/Cache/KonekoCacheManager copy.php delete mode 100644 src/Application/Cache/KonekoCacheManager.php delete mode 100644 src/Application/Cache/KonekoSessionManager.php create mode 100644 src/Application/Cache/Manager/Concerns/___HasCacheContext.php create mode 100644 src/Application/Cache/Manager/KonekoCacheManager.php rename src/Application/Cache/{ => Manager}/LaravelCacheManager.php (99%) create mode 100644 src/Application/Cache/Services/KonekoVarsService.php delete mode 100644 src/Application/Cache/VuexyVarsBuilderService.php create mode 100644 src/Application/Config/Cast/VuexyLayoutCast.php create mode 100644 src/Application/Config/Contracts/ConfigRepositoryInterface.php create mode 100644 src/Application/Config/Manager/Concerns/HasConfigContext.php create mode 100644 src/Application/Config/Manager/KonekoConfigManager.php create mode 100644 src/Application/Config/Manager/___KonekoConfigManager copy.php create mode 100644 src/Application/Config/Registry/ConfigBlockRegistry.php create mode 100644 src/Application/Config/___Builder/___KonekoConfigResolverService.php delete mode 100644 src/Application/Contracts/ApiRegistry/ExternalApiRegistryInterface.php delete mode 100644 src/Application/Contracts/Catalogs/CatalogServiceInterface.php delete mode 100644 src/Application/Contracts/Factories/ProbabilisticAttributesFactoryInterface.php delete mode 100644 src/Application/Contracts/Modules/VuexyModuleServiceInterface.php delete mode 100644 src/Application/Contracts/Settings/SettingsRepositoryInterface copy.php delete mode 100644 src/Application/Contracts/Settings/SettingsRepositoryInterface.php create mode 100644 src/Application/CoreModule.php delete mode 100644 src/Application/Enums/ExternalApi/ApiProvider.php delete mode 100644 src/Application/Enums/Settings/SettingEnvironment.php delete mode 100644 src/Application/Enums/Settings/SettingScope.php create mode 100644 src/Application/Events/Notifications/NotificationEmitted.php delete mode 100644 src/Application/Events/Settings/SettingChanged.php rename src/Application/Events/{Settings/VuexyCustomizerSettingsUpdated.php => ___Settings/___VuexyCustomizerSettingsUpdated.php} (100%) delete mode 100644 src/Application/Http/Controllers/___AuthUserController.php delete mode 100644 src/Application/Http/Controllers/___VuexyController.php delete mode 100644 src/Application/Listeners/Settings/ApplyVuexyCustomizerSettings.php delete mode 100644 src/Application/Listeners/Settings/SettingCacheListener.php delete mode 100644 src/Application/Logger/____SystemLoggerService.php delete mode 100644 src/Application/Logger/____UserInteractionLoggerService.php rename src/Application/{Contracts/Loggers => Loggers/Contracts}/SecurityLoggerInterface.php (100%) rename src/Application/{Contracts/Loggers => Loggers/Contracts}/SystemLoggerInterface.php (100%) rename src/Application/{Contracts/Loggers => Loggers/Contracts}/UserInteractionLoggerInterface.php (100%) rename src/Application/{Logger => Loggers}/KonekoSecurityAuditLogger.php (97%) rename src/Application/{Logger => Loggers}/KonekoSecurityLogger.php (83%) rename src/Application/{Logger => Loggers}/KonekoSystemLogger.php (81%) rename src/Application/{Logger => Loggers}/KonekoUserInteractionLogger.php (81%) delete mode 100644 src/Application/Macros/___LogMacrosServiceProvider.php delete mode 100644 src/Application/Macros/___SettingsScopesMacro.php delete mode 100644 src/Application/Macros/___VuexyAdminLoggerMacro.php delete mode 100644 src/Application/Macros/___VuexyAdminSettingsMacro.php rename src/Application/{UX => }/ModulePackages/ModulePackageAnalyzerService.php (100%) rename src/Application/{UX => }/ModulePackages/ModulePackageGitFetcher.php (100%) rename src/Application/{UX => }/ModulePackages/ModulePackageInstallPreviewService.php (100%) rename src/Application/{UX => }/ModulePackages/ModulePackageInstallerService.php (100%) rename src/Application/{UX => }/ModulePackages/ModulePackageRegistrarService.php (100%) rename src/Application/{UX => }/ModulePackages/ModulePackageZipDownloader.php (100%) rename src/Application/RBAC/{ => Sync}/KonekoRbacSyncManager.php (98%) delete mode 100644 src/Application/Security/VaultKeyService.php rename src/Application/{Traits/Seeders => Seeding/Concerns}/Main/HandlesSeederLoggingAndReporting.php (98%) rename src/Application/{Traits/Seeders => Seeding/Concerns}/Main/HasSeederChunkSupport.php (96%) rename src/Application/{Traits/Seeders => Seeding/Concerns}/Main/HasSeederFactorySupport.php (86%) rename src/Application/{Traits/Seeders => Seeding/Concerns}/Main/HasSeederLogger.php (89%) rename src/Application/{Traits/Seeders => Seeding/Concerns}/Main/HasSeederProgressBar.php (93%) rename src/Application/{Traits/Seeders => Seeding/Concerns}/Main/SanitizeRowWithFillableAndCasts.php (95%) create mode 100644 src/Application/Settings/Concerns/HasSettingAttributes.php create mode 100644 src/Application/Settings/Concerns/HasSettingCache.php create mode 100644 src/Application/Settings/Concerns/HasSettingEncryption.php create mode 100644 src/Application/Settings/Concerns/HasSettingFileSupport.php create mode 100644 src/Application/Settings/Concerns/HasSettingMetadata.php create mode 100644 src/Application/Settings/Contracts/SettingsRepositoryInterface.php create mode 100644 src/Application/Settings/Manager/KonekoSettingManager.php create mode 100644 src/Application/Settings/Registry/ScopeRegistry.php create mode 100644 src/Application/Settings/SettingDefaults.php delete mode 100644 src/Application/System/KonekoSettingManager copy 2.php delete mode 100644 src/Application/System/KonekoSettingManager copy 3.php delete mode 100644 src/Application/System/KonekoSettingManager copy.php delete mode 100644 src/Application/System/KonekoSettingManager.php delete mode 100644 src/Application/System/___ExternalApiRegistryService.php delete mode 100644 src/Application/System/___RbacManagerService.php delete mode 100644 src/Application/System/___SettingsService.php rename src/Application/Traits/{Indexing => ConfigBuilder}/HandlesIndexColumns.php (100%) rename src/Application/Traits/{Indexing => ConfigBuilder}/HandlesIndexLabels.php (100%) rename src/Application/Traits/{Indexing => ConfigBuilder}/HandlesModelMetadata.php (100%) rename src/Application/Traits/{Indexing => ConfigBuilder}/HandlesQueryBuilder.php (100%) rename src/Application/Traits/{Indexing => ConfigBuilder}/HandlesTableConfig.php (100%) delete mode 100644 src/Application/Traits/Indexing/HandlesFactory.php create mode 100644 src/Application/Traits/System/Context/HasBaseContext.php create mode 100644 src/Application/Traits/System/Context/HasBaseContextValidator.php create mode 100644 src/Application/Traits/System/Context/HasCacheContextValidation.php create mode 100644 src/Application/Traits/System/Context/HasConfigContextValidation.php create mode 100644 src/Application/Traits/System/Context/HasContextQueryBuilder.php create mode 100644 src/Application/Traits/System/Context/HasSettingsContextValidation.php delete mode 100644 src/Application/UI/Livewire/Pages/Dashboards/MenuAccessCards copy.php rename src/Application/UX/{Content/VuexyBreadcrumbsBuilderService.php => Breadcrumbs/VuexyBreadcrumbsBuilder.php} (97%) rename src/Application/UX/{Template/VuexyConfigSynchronizer.php => Customize/___VuexyConfigSynchronizer.php} (69%) create mode 100644 src/Application/UX/Customize/___VuexyLayoutConfigSynchronizer.php rename src/Application/UX/{Template/VuexyAdminImageHandlerService.php => ImageHandler/WebAdminImageHandler.php} (97%) rename src/Application/UX/Menu/{VuexyMenuBuilderService.php => VuexyMenuBuilder.php} (68%) delete mode 100644 src/Application/UX/Menu/VuexyMenuMergeService.php rename src/Application/UX/Navbar/{VuexyQuicklinksBuilderService.php => VuexyQuicklinksBuilder.php} (52%) rename src/Application/UX/Navbar/{VuexySearchBarBuilderService.php => VuexySearchBarBuilder.php} (76%) create mode 100644 src/Application/UX/Notifications/Builder/NotifyBuilder.php create mode 100644 src/Application/UX/Notifications/Builder/VuexyNotificationsBuilder.php create mode 100644 src/Application/UX/Notifications/Concerns/ResolvesNotifySettings.php create mode 100644 src/Application/UX/Notifications/Contracts/NotificationChannelDriverInterface.php create mode 100644 src/Application/UX/Notifications/Drivers/ToastToastrDriver.php create mode 100644 src/Application/UX/Notifications/Manager/KonekoNotifyManager.php create mode 100644 src/Application/UX/Notifications/Registry/NotificationChannelRegistry.php create mode 100644 src/Application/UX/Notifications/Support/NotifyPayload.php delete mode 100644 src/Application/UX/Notifications/VuexyNotificationsBuilderService.php delete mode 100644 src/Application/UX/Notifications/___VuexyNotificationDispatcher.php rename src/Application/{UI/Notifications => UX/Notifications_1/Email}/CustomResetPasswordNotification.php (100%) rename src/Application/{ => UX/Notifications_1}/Helpers/VuexyNotifyHelper.php (100%) rename src/Application/{ => UX/Notifications_1}/Helpers/VuexyToastrHelper.php (100%) rename src/{Support/Notifications => Application/UX/Notifications_1/Manager}/NotifyChannelManager.php (97%) create mode 100644 src/Application/Vault/Drivers/VaultKeyApiDriver.php create mode 100644 src/Application/Vault/VaultKeyClient.php create mode 100644 src/Application/Vault/VaultKeyService.php rename src/Console/Commands/{ => Cache}/KonekoCacheHelperCommand.php (76%) rename src/Console/Commands/{ => Geolocationg}/DownloadGeoIpDatabase.php (97%) rename src/Console/Commands/{ => Layout}/VuexyMenuBuildCommand.php (94%) rename src/Console/Commands/{ => Layout}/VuexyMenuListModulesCommand.php (95%) rename src/Console/Commands/{ => Notifications}/VuexyDeviceTokenPruneCommand.php (91%) rename src/Console/Commands/{ => Orquestator}/ApisReportCommand.php (98%) rename src/Console/Commands/{ => Orquestator}/VuexyListCatalogsCommand.php (97%) rename src/Console/Commands/{ => Orquestator}/VuexyModuleInstallCommand.php (93%) rename src/Console/Commands/{ => Orquestator}/VuexySeedCommand.php (99%) rename src/Console/Commands/{ => RBAC}/VuexyRbacCommand.php (90%) rename src/Console/Commands/{ => UI}/VuexyAvatarInitialsCommand.php (95%) rename src/Console/Commands/{Security/KonekoVaultKeyCommand.php => Vault/KonekoVaultKeyCommand.old.php} (91%) create mode 100644 src/Console/Commands/Vault/VaultKeyInfoCommand.php create mode 100644 src/Console/Commands/Vault/VaultKeyRotateCommand.php create mode 100644 src/Console/Commands/Vault/VaultResetCommand.php delete mode 100644 src/Console/Commands/VuexyRbacCommand copy.php create mode 100644 src/Models/VaultClientKey.php delete mode 100644 src/Models/VaultKey.php create mode 100644 src/Providers/Concerns/EnforcesHttps.php rename src/Support/Builders/{ => Table}/AbstractTableConfigBuilder.php (95%) delete mode 100644 src/Support/Cache/AbstractCachedBuilderService.php delete mode 100644 src/Support/Cache/AbstractKeyValueCacheBuilder.php rename src/{Application => Support}/Contracts/Enums/LabeledEnumInterface.php (100%) rename src/{Application => Support}/Contracts/Files/ParsableFileInterface.php (87%) rename src/{Application => Support}/Contracts/Flags/FlagEnumInterface.php (100%) rename src/{Application => Support}/Contracts/Seeders/DataSeederInterface.php (100%) rename src/{Application => Support}/Enums/ExternalApi/ApiAuthType.php (89%) rename src/{Application => Support}/Enums/ExternalApi/ApiEnvironment.php (87%) rename src/{Application/Enums/Notifications/NotificationCahennel.php => Support/Enums/Notifications/NotificationChannel.php} (65%) rename src/{Application => Support}/Enums/Permissions/PermissionAction.php (98%) rename src/{Application => Support}/Enums/SecurityEvents/SecurityEventStatus.php (87%) rename src/{Application => Support}/Enums/SecurityEvents/SecurityEventType.php (88%) rename src/{Application => Support}/Enums/SystemLog/LogLevel.php (75%) rename src/{Application => Support}/Enums/SystemLog/LogTriggerType.php (84%) rename src/{Application => Support}/Enums/SystemNotifications/SystemNotificationPriority.php (74%) rename src/{Application => Support}/Enums/SystemNotifications/SystemNotificationScope.php (67%) rename src/{Application => Support}/Enums/SystemNotifications/SystemNotificationStyle.php (73%) rename src/{Application => Support}/Enums/SystemNotifications/SystemNotificationType.php (74%) rename src/{Application => Support}/Enums/UserInteractions/InteractionSecurityLevel.php (90%) rename src/Support/Factories/{ => Base}/AbstractModelFactory.php (93%) rename src/Support/{Geo => GeoLocation}/GeoLocationResolver.php (100%) rename src/{Application => Support}/Macros/StrMacros.php (98%) rename src/Support/Seeders/{ => Base}/AbstractDataSeeder.php (97%) create mode 100644 src/Support/Traits/Auth/HasResolvableUser.php create mode 100644 src/Support/Traits/Cache/HasCacheManagerHelpers.php delete mode 100644 src/Support/Traits/Cache/InteractsWithKonekoVarsCache.php delete mode 100644 src/Support/Traits/Cache/___KonekoCacheSupport.php rename src/{Application/Traits/Indexing => Support/Traits/ConfigBuilder}/HandlesStaticRegistryMerge.php (100%) rename src/Support/Traits/{Helpers => Enums}/HasLabeledEnumHelpers.php (100%) rename src/Support/Traits/{ => Flags}/Factories/HasUserFactoryFlagsExtension.php (88%) rename src/Support/Traits/{Helpers => Geolocation}/HasGeolocation.php (77%) delete mode 100644 src/Support/Traits/Livewire/Cache/HasKonekoCacheSupport.php delete mode 100644 src/Support/Traits/Livewire/Notifications/HandlesAsyncNotifications.php rename src/Support/Traits/{Helpers => Model}/HasDynamicModelExtenders.php (100%) delete mode 100644 src/Support/Traits/Modules/____BootsVuexyModule copy.php delete mode 100644 src/Support/Traits/Notifications/____DispatchesVuexyNotifications.php diff --git a/config/auth.php b/config/auth.php new file mode 100644 index 0000000..9bf96e6 --- /dev/null +++ b/config/auth.php @@ -0,0 +1,117 @@ + [ + 'guard' => env('AUTH_GUARD', 'web'), + 'passwords' => env('AUTH_PASSWORD_BROKER', 'users'), + ], + + /* + |-------------------------------------------------------------------------- + | Authentication Guards + |-------------------------------------------------------------------------- + | + | Next, you may define every authentication guard for your application. + | Of course, a great default configuration has been defined for you + | which utilizes session storage plus the Eloquent user provider. + | + | All authentication guards have a user provider, which defines how the + | users are actually retrieved out of your database or other storage + | system used by the application. Typically, Eloquent is utilized. + | + | Supported: "session" + | + */ + + 'guards' => [ + 'web' => [ + 'driver' => 'session', + 'provider' => 'users', + ], + ], + + /* + |-------------------------------------------------------------------------- + | User Providers + |-------------------------------------------------------------------------- + | + | All authentication guards have a user provider, which defines how the + | users are actually retrieved out of your database or other storage + | system used by the application. Typically, Eloquent is utilized. + | + | If you have multiple user tables or models you may configure multiple + | providers to represent the model / table. These providers may then + | be assigned to any extra authentication guards you have defined. + | + | Supported: "database", "eloquent" + | + */ + + 'providers' => [ + 'users' => [ + 'driver' => 'eloquent', + 'model' => env('AUTH_MODEL', Koneko\VuexyAdmin\Models\User::class), + ], + + // 'users' => [ + // 'driver' => 'database', + // 'table' => 'users', + // ], + ], + + /* + |-------------------------------------------------------------------------- + | Resetting Passwords + |-------------------------------------------------------------------------- + | + | These configuration options specify the behavior of Laravel's password + | reset functionality, including the table utilized for token storage + | and the user provider that is invoked to actually retrieve users. + | + | The expiry time is the number of minutes that each reset token will be + | considered valid. This security feature keeps tokens short-lived so + | they have less time to be guessed. You may change this as needed. + | + | The throttle setting is the number of seconds a user must wait before + | generating more password reset tokens. This prevents the user from + | quickly generating a very large amount of password reset tokens. + | + */ + + 'passwords' => [ + 'users' => [ + 'provider' => 'users', + 'table' => env('AUTH_PASSWORD_RESET_TOKEN_TABLE', 'password_reset_tokens'), + 'expire' => 60, + 'throttle' => 60, + ], + ], + + /* + |-------------------------------------------------------------------------- + | Password Confirmation Timeout + |-------------------------------------------------------------------------- + | + | Here you may define the amount of seconds before a password confirmation + | window expires and users are asked to re-enter their password via the + | confirmation screen. By default, the timeout lasts for three hours. + | + */ + + 'password_timeout' => env('AUTH_PASSWORD_TIMEOUT', 10800), + +]; diff --git a/config/keyvault_db.php b/config/keyvault_db.php deleted file mode 100644 index b25079b..0000000 --- a/config/keyvault_db.php +++ /dev/null @@ -1,20 +0,0 @@ - [ - 'keyvault' => [ - 'driver' => 'mysql', - 'host' => env('KEYVAULT_DB_HOST', '127.0.0.1'), - 'database' => env('KEYVAULT_DB_DATABASE', 'key_vault'), - 'username' => env('KEYVAULT_DB_USERNAME', 'vault_user'), - 'password' => env('KEYVAULT_DB_PASSWORD', 'secret'), - 'charset' => 'utf8mb4', - 'collation' => 'utf8mb4_unicode_ci', - 'prefix' => env('KEYVAULT_DB_PREFIX', ''), - 'strict' => true, - 'engine' => null, - ], - ], -]; \ No newline at end of file diff --git a/config/koneko.php b/config/koneko.php index 4940b18..c1e2763 100644 --- a/config/koneko.php +++ b/config/koneko.php @@ -1,5 +1,5 @@ "Koneko Soluciones Tecnológicas", "description" => "Koneko Soluciones Tecnológicas ofrece desarrollo de sistemas empresariales, sitios web profesionales, inteligencia artificial, infraestructura y soluciones digitales avanzadas para negocios en México.", @@ -7,4 +7,18 @@ return [ "app_name" => "koneko.mx", "app_logo" => "../vendor/vuexy-admin/img/logo/koneko-04.png", "favicon" => "../vendor/vuexy-admin/img/logo/koneko-04.png", + + // ================== 📦 CACHE GENERAL ================== + 'cache' => [ + 'enabled' => (bool) env('KONEKO_CACHE_ENABLED', true), + 'ttl' => (int) env('KONEKO_CACHE_TTL', 20 * 24 * 60), // 20 días + ], + + // ================== 📦 CACHE DE COMPONENTE ================== + 'core' => [ + 'cache' => [ + 'enabled' => (bool) env('KONEKO_CORE_CACHE_ENABLED', true), + 'ttl' => (int) env('KONEKO_CORE_CACHE_TTL', 20 * 24 * 60), + ], + ], ]; diff --git a/config/koneko_admin.php b/config/koneko_admin.php deleted file mode 100644 index fbac28e..0000000 --- a/config/koneko_admin.php +++ /dev/null @@ -1,107 +0,0 @@ - [ - 'myLayout' => 'horizontal', // Options[String]: vertical(default), horizontal - 'myTheme' => 'theme-semi-dark', // Options[String]: theme-default(default), theme-bordered, theme-semi-dark - 'myStyle' => 'light', // Options[String]: light(default), dark & system mode - 'myRTLSupport' => false, // options[Boolean]: true(default), false // To provide RTLSupport or not - 'myRTLMode' => false, // options[Boolean]: false(default), true // To set layout to RTL layout (myRTLSupport must be true for rtl mode) - 'hasCustomizer' => true, // options[Boolean]: true(default), false // Display customizer or not THIS WILL REMOVE INCLUDED JS FILE. SO LOCAL STORAGE WON'T WORK - 'displayCustomizer' => true, // options[Boolean]: true(default), false // Display customizer UI or not, THIS WON'T REMOVE INCLUDED JS FILE. SO LOCAL STORAGE WILL WORK - 'contentLayout' => 'compact', // options[String]: 'compact', 'wide' (compact=container-xxl, wide=container-fluid) - 'navbarType' => 'static', // options[String]: 'sticky', 'static', 'hidden' (Only for vertical Layout) - 'footerFixed' => false, // options[Boolean]: false(default), true // Footer Fixed - 'menuFixed' => false, // options[Boolean]: true(default), false // Layout(menu) Fixed (Only for vertical Layout) - 'menuCollapsed' => true, // options[Boolean]: false(default), true // Show menu collapsed, (Only for vertical Layout) - 'headerType' => 'static', // options[String]: 'static', 'fixed' (for horizontal layout only) - 'showDropdownOnHover' => false, // true, false (for horizontal layout only) - 'authViewMode' => 'cover', // Options[String]: cover(default), basic - 'maxQuickLinks' => 8, // options[Integer]: 8(default), 6, 8, 10 - 'customizerControls' => [ - 'style', - 'headerType', - 'contentLayout', - 'layoutCollapsed', - 'layoutNavbarOptions', - 'themes', - ], // To show/hide customizer options - ], - - // HTTPS y proxies - 'security' => [ - 'force_https' => (bool) env('FORCE_HTTPS', false), - 'trust_proxy' => (bool) env('TRUST_PROXY', false), - 'trust_proxy_ips' => env('TRUST_PROXY_IPS', '*'), - - // Key Vault & Encryption Management - 'key_vault' => [ - 'driver' => env('VUEXY_KEY_VAULT_DRIVER', 'laravel'), // Options: laravel, sqlite, mysql, mariadb, go_service - 'enabled' => (bool) env('VUEXY_KEY_VAULT_ENABLED', true), - - // Laravel Default Encryption (APP_KEY) - 'laravel' => [ - 'key' => env('APP_KEY'), - 'algorithm' => 'AES-256-CBC', - ], - - // Second DB Configuration (Requires separate connection) - 'database' => [ - 'connection' => env('VUEXY_KEY_VAULT_DB_CONNECTION', 'vault'), - 'table' => env('VUEXY_KEY_VAULT_DB_TABLE', 'vault_keys'), - 'algorithm' => env('VUEXY_KEY_VAULT_DB_ALGORITHM', 'AES-256-CBC'), - ], - - // External Go Microservice - 'service' => [ - 'base_url' => env('VUEXY_KEY_VAULT_SERVICE_URL'), - 'api_token' => env('VUEXY_KEY_VAULT_SERVICE_TOKEN'), - 'timeout' => (int) env('VUEXY_KEY_VAULT_SERVICE_TIMEOUT', 5), - ], - ], - ], - - // Cache - 'cache' => [ - 'enabled' => (bool) env('VUEXY_CACHE_ENABLED', true), - 'ttl' => (int) env('VUEXY_CACHE_TTL', 20 * 24 * 60), - ], - - // Avatar - 'avatar' => [ - 'initials' => [ - 'max_length' => (int) env('VUEXY_AVATAR_INITIALS_MAX_LENGTH', 2), - 'disk' => env('VUEXY_AVATAR_INITIALS_DISK', 'public'), - 'directory' => env('VUEXY_AVATAR_INITIALS_DIRECTORY', 'initial-avatars'), - 'size' => (int) env('VUEXY_AVATAR_INITIALS_SIZE', 512), - 'background' => env('VUEXY_AVATAR_INITIALS_BACKGROUND', '#EBF4FF'), - 'colors' => json_decode(env('VUEXY_AVATAR_INITIALS_COLORS', json_encode(['#3b82f6', '#808390', '#28c76f', '#ff4c51', '#ff9f43', '#00bad1', '#4b4b4b'])), true), - 'font_size_ratio' => (float) env('VUEXY_AVATAR_INITIALS_FONT_SIZE_RATIO', 0.4), - 'fallback_text' => env('VUEXY_AVATAR_INITIALS_FALLBACK_TEXT', 'NA'), - 'cache' => [ - 'ttl' => (int) env('VUEXY_AVATAR_INITIALS_CACHE_TTL', 30 * 24 * 60), - ], - ], - 'image' => [ - 'disk' => env('VUEXY_AVATAR_IMAGE_DISK', 'public'), - 'directory' => env('VUEXY_AVATAR_IMAGE_DIRECTORY', 'profile-photos'), - 'width' => (int) env('VUEXY_AVATAR_IMAGE_WIDTH', 512), - 'height' => (int) env('VUEXY_AVATAR_IMAGE_HEIGHT', 512), - 'fit_method' => env('VUEXY_AVATAR_IMAGE_FIT_METHOD', 'cover'), - ], - ], - - // Menú - 'menu' => [ - 'cache' => [ - 'enabled' => (bool) env('VUEXY_MENU_CACHE_ENABLED', true), - 'ttl' => (int) env('VUEXY_MENU_CACHE_TTL', 2 * 24 * 60), - ], - 'debug' => [ - 'show_broken_routers' => (bool) env('VUEXY_MENU_DEBUG_SHOW_BROKEN_ROUTES', false), - 'show_disallowed_links' => (bool) env('VUEXY_MENU_DEBUG_SHOW_DISALLOWED_LINKS', false), - 'show_hidden_items' => (bool) env('VUEXY_MENU_DEBUG_SHOW_HIDDEN_ITEMS', false), - ], - ], -]; diff --git a/config/koneko_key_vault.php b/config/koneko_key_vault.php new file mode 100644 index 0000000..4a2c7ab --- /dev/null +++ b/config/koneko_key_vault.php @@ -0,0 +1,57 @@ + env('KONEKO_KEY_VAULT_MODE', 'client'), // client | server | both + + /* + |-------------------------------------------------------------------------- + | Cliente de Claves - Lectura local o remota + |-------------------------------------------------------------------------- + */ + 'client' => [ + 'driver' => env('KONEKO_KEY_VAULT_DRIVER', 'laravel'), // koneko_api | database | laravel + 'connection' => env('KONEKO_KEY_VAULT_DB_CONNECTION', 'vault'), + 'table' => env('KONEKO_KEY_VAULT_DB_TABLE', 'vault_client_keys'), + + 'project' => env('KONEKO_PROJECT_CODE', 'erp'), + 'namespace' => env('KONEKO_KEY_VAULT_NAMESPACE', 'default'), + 'client_id' => env('KONEKO_CLIENT_ID'), + + // 🔐 Opción para lectura desde archivo plano en sistema + 'key_path' => env('KONEKO_KEY_VAULT_CLIENT_KEY_PATH', '/etc/koneko/vault_value.key'), + ], + + /* + |-------------------------------------------------------------------------- + | Servidor de Claves - Proyectos que gestionan claves de múltiples clientes + |-------------------------------------------------------------------------- + */ + 'server' => [ + 'enabled' => env('KONEKO_KEY_VAULT_SERVER_ENABLED', false), + 'connection' => env('KONEKO_KEY_VAULT_SERVER_CONNECTION', 'vault'), + 'table' => env('KONEKO_KEY_VAULT_SERVER_TABLE', 'vault_client_keys'), + ], + + /* + |-------------------------------------------------------------------------- + | Drivers disponibles (por ejemplo, API externa Koneko) + |-------------------------------------------------------------------------- + */ + 'drivers' => [ + 'koneko_api' => [ + 'base_url' => env('KONEKO_VAULT_API_URL', 'https://vault.koneko.mx/api/v1/keys'), + 'api_token' => env('KONEKO_VAULT_API_TOKEN'), + 'timeout' => (int) env('KONEKO_VAULT_API_TIMEOUT', 3), + ], + ], +]; diff --git a/config/koneko_key_vault_db.php b/config/koneko_key_vault_db.php new file mode 100644 index 0000000..dae4ed4 --- /dev/null +++ b/config/koneko_key_vault_db.php @@ -0,0 +1,16 @@ + 'mysql', + 'host' => env('KEYVAULT_DB_HOST', '127.0.0.1'), + 'database' => env('KEYVAULT_DB_DATABASE', 'key_vault'), + 'username' => env('KEYVAULT_DB_USERNAME', 'vault_user'), + 'password' => env('KEYVAULT_DB_PASSWORD', 'secret'), + 'charset' => 'utf8mb4', + 'collation' => 'utf8mb4_unicode_ci', + 'prefix' => env('KEYVAULT_DB_PREFIX', ''), + 'strict' => true, + 'engine' => null, +]; diff --git a/config/koneko_layout.php b/config/koneko_layout.php new file mode 100644 index 0000000..8b8c394 --- /dev/null +++ b/config/koneko_layout.php @@ -0,0 +1,48 @@ + [ + 'myLayout' => 'horizontal', // Options[String]: vertical(default), horizontal + 'myTheme' => 'theme-semi-dark', // Options[String]: theme-default(default), theme-bordered, theme-semi-dark + 'myStyle' => 'light', // Options[String]: light(default), dark & system mode + 'myRTLSupport' => false, // options[Boolean]: true(default), false // To provide RTLSupport or not + 'myRTLMode' => false, // options[Boolean]: false(default), true // To set layout to RTL layout (myRTLSupport must be true for rtl mode) + 'hasCustomizer' => true, // options[Boolean]: true(default), false // Display customizer or not THIS WILL REMOVE INCLUDED JS FILE. SO LOCAL STORAGE WON'T WORK + 'displayCustomizer' => true, // options[Boolean]: true(default), false // Display customizer UI or not, THIS WON'T REMOVE INCLUDED JS FILE. SO LOCAL STORAGE WILL WORK + 'contentLayout' => 'compact', // options[String]: 'compact', 'wide' (compact=container-xxl, wide=container-fluid) + 'navbarType' => 'static', // options[String]: 'sticky', 'static', 'hidden' (Only for vertical Layout) + 'footerFixed' => false, // options[Boolean]: false(default), true // Footer Fixed + 'menuFixed' => false, // options[Boolean]: true(default), false // Layout(menu) Fixed (Only for vertical Layout) + 'menuCollapsed' => true, // options[Boolean]: false(default), true // Show menu collapsed, (Only for vertical Layout) + 'headerType' => 'static', // options[String]: 'static', 'fixed' (for horizontal layout only) + 'showDropdownOnHover' => false, // true, false (for horizontal layout only) + 'authViewMode' => 'cover', // Options[String]: cover(default), basic + 'maxQuickLinks' => 12, // options[Integer]: 8(default), 8, 10, 12 + 'customizerControls' => [ + 'style', + 'headerType', + 'contentLayout', + 'layoutCollapsed', + 'layoutNavbarOptions', + 'themes', + ], // To show/hide customizer options + ], + // 📋 Menú de Navegación + 'menu' => [ + 'debug' => [ + 'show_broken_routes' => (bool) env('VUEXY_MENU_DEBUG_SHOW_BROKEN_ROUTES', false), + 'show_disallowed_links'=> (bool) env('VUEXY_MENU_DEBUG_SHOW_DISALLOWED_LINKS', false), + 'show_hidden_items' => (bool) env('VUEXY_MENU_DEBUG_SHOW_HIDDEN_ITEMS', false), + ], + 'cache' => [ + 'enabled' => (bool) env('VUEXY_MENU_CACHE_ENABLED', true), + 'ttl' => (int) env('VUEXY_MENU_CACHE_TTL', 2 * 24 * 60), + ], + ], + 'cache' => [ + 'enabled' => (bool) env('VUEXY_CACHE_ENABLED', true), + 'ttl' => (int) env('VUEXY_CACHE_TTL', 2 * 24 * 60), + ], +]; diff --git a/config/logging.php b/config/koneko_logging.php similarity index 100% rename from config/logging.php rename to config/koneko_logging.php diff --git a/config/koneko_security.php b/config/koneko_security.php new file mode 100644 index 0000000..fa5eea4 --- /dev/null +++ b/config/koneko_security.php @@ -0,0 +1,59 @@ + [ + 'force' => (bool) env('FORCE_HTTPS', false), + ], + 'proxies' => [ + 'enabled' => (bool) env('TRUST_PROXY', false), + 'ips' => env('TRUST_PROXY_IPS', '*'), + ], + + // 🗝️ Key Vault & Gestión de Claves + 'key_vault' => [ + // Namespace por defecto y cliente global (si aplica) + 'default_namespace' => env('KONEKO_KEY_VAULT_NAMESPACE', 'default'), + 'default_project' => env('KONEKO_PROJECT_CODE', 'erp'), + 'default_client_id' => env('KONEKO_CLIENT_ID'), + + + // 🔑 Cliente que accede a claves de un servidor remoto o local + 'client' => [ + 'driver' => env('KONEKO_KEY_VAULT_DRIVER', 'database'), // koneko_api, database, laravel + 'connection' => env('KONEKO_KEY_VAULT_DB_CONNECTION', 'vault'), + 'table' => env('KONEKO_KEY_VAULT_DB_TABLE', 'vault_client_keys'), + 'project' => env('KONEKO_PROJECT_CODE', 'erp'), + 'namespace' => env('KONEKO_KEY_VAULT_NAMESPACE', 'default'), + 'client_id' => env('KONEKO_CLIENT_ID'), + ], + + // 🗃️ Conexión y configuración del servidor de claves (solo si actúa como vault) + 'server' => [ + 'connection' => 'vault', // conexión que administra la tabla físicamente + 'table' => 'vault_client_keys', + ], + + + 'drivers' => [ + // Laravel Default Encryption (APP_KEY) + 'laravel' => [ + 'key' => env('APP_KEY'), + 'algorithm' => 'AES-256-CBC', + ], + // Second DB Configuration (Requires separate connection) + 'database' => [ + 'connection' => env('KONEKO_KEY_VAULT_DB_CONNECTION', 'vault'), + 'table' => env('KONEKO_KEY_VAULT_DB_TABLE', 'vault_keys'), + 'algorithm' => env('KONEKO_KEY_VAULT_DB_ALGORITHM', 'AES-256-CBC'), + ], + // External Go Microservice + 'koneko_api' => [ + 'base_url' => env('KONEKO_KEY_VAULT_SERVICE_URL'), + 'api_token' => env('KONEKO_KEY_VAULT_SERVICE_TOKEN'), + 'timeout' => (int) env('KONEKO_KEY_VAULT_SERVICE_TIMEOUT', 5), + ], + ], + ], +]; diff --git a/config/koneko_ui.php b/config/koneko_ui.php new file mode 100644 index 0000000..44e7c75 --- /dev/null +++ b/config/koneko_ui.php @@ -0,0 +1,39 @@ + [ + // 🔠 Avatares por Iniciales + 'initials' => [ + 'max_length' => (int) env('VUEXY_AVATAR_INITIALS_MAX_LENGTH', 2), + 'disk' => env('VUEXY_AVATAR_INITIALS_DISK', 'public'), + 'directory' => env('VUEXY_AVATAR_INITIALS_DIRECTORY', 'initial-avatars'), + 'size' => (int) env('VUEXY_AVATAR_INITIALS_SIZE', 512), + 'background' => env('VUEXY_AVATAR_INITIALS_BACKGROUND', '#EBF4FF'), + 'colors' => json_decode(env('VUEXY_AVATAR_INITIALS_COLORS', json_encode([ + '#3b82f6', '#808390', '#28c76f', '#ff4c51', + '#ff9f43', '#00bad1', '#4b4b4b' + ])), true), + 'font_size_ratio' => (float) env('VUEXY_AVATAR_INITIALS_FONT_SIZE_RATIO', 0.4), + 'fallback_text' => env('VUEXY_AVATAR_INITIALS_FALLBACK_TEXT', 'NA'), + + // 🧹 Mantenimiento y Depuración de Avatares + 'maintenance' => [ + 'enabled' => (bool) env('VUEXY_AVATAR_CLEANUP_ENABLED', true), + 'ttl_days' => (int) env('VUEXY_AVATAR_CLEANUP_TTL_DAYS', 30), // Días antes de considerar obsoletos los avatares + 'cleanup_cron' => env('VUEXY_AVATAR_CLEANUP_CRON', '0 3 * * *'), // Hora de ejecución del Job de limpieza (por defecto a las 3 AM) + 'max_batch_size' => (int) env('VUEXY_AVATAR_CLEANUP_MAX_BATCH', 500), // Máximo de archivos a procesar por ejecución + 'log_deletions' => (bool) env('VUEXY_AVATAR_CLEANUP_LOG', true), // Registrar o no las eliminaciones + ], + ], + + // 📸 Avatares por Imagen + 'image' => [ + 'disk' => env('VUEXY_AVATAR_IMAGE_DISK', 'public'), + 'directory' => env('VUEXY_AVATAR_IMAGE_DIRECTORY', 'profile-photos'), + 'width' => (int) env('VUEXY_AVATAR_IMAGE_WIDTH', 512), + 'height' => (int) env('VUEXY_AVATAR_IMAGE_HEIGHT', 512), + 'fit_method' => env('VUEXY_AVATAR_IMAGE_FIT_METHOD', 'cover'), + ], + ], +]; diff --git a/config/vuexy_menu.php b/config/vuexy_menu.php index 0ff3130..7fcdee3 100644 --- a/config/vuexy_menu.php +++ b/config/vuexy_menu.php @@ -481,15 +481,16 @@ return [ ], ], ], - '_extra_quicklinks' => [ - 'Inicio' => [ - 'icon' => 'ti ti-home', - 'route' => 'admin.core.pages.home.index', - 'can' => 'admin.core.pages.home.view', - ], - 'Mi perfil' => [ - 'icon' => 'ti ti-user-circle', - 'route' => 'admin.users.profile', + '_extra' => [ + '_quicklinks' => [ + 'Inicio' => [ + 'icon' => 'ti ti-home', + 'route' => 'admin.core.pages.home.index', + ], + 'Mi perfil' => [ + 'icon' => 'ti ti-user-circle', + 'route' => 'admin.users.profile', + ], ], ], ]; diff --git a/database/migrations/2024_12_14_082230_create_vault_client_keys_table.php b/database/migrations/2024_12_14_082230_create_vault_client_keys_table.php new file mode 100644 index 0000000..468f3a6 --- /dev/null +++ b/database/migrations/2024_12_14_082230_create_vault_client_keys_table.php @@ -0,0 +1,78 @@ +setGroup('key_vault'); + + $mode = $keyVault->get('mode', 'client'); + $driver = $keyVault->get('client.driver', 'database'); + $table = $keyVault->get('server.table', 'vault_keys'); + $conn = $keyVault->get('server.connection', 'vault'); + + $isServer = in_array($mode, ['server', 'both']); + $isDatabaseDriver = $driver === 'database'; + + if (!$isServer) { + echo "\n ⏩ Skipping: vault_keys not needed for mode '{$mode}'."; + return; + } + + if (!$isDatabaseDriver) { + echo "\n ⏩ Skipping: vault_keys not needed for driver '{$driver}'."; + return; + } + + if (Schema::connection($conn)->hasTable($table)) { + echo "\n ⏩ Table {$table} already exists on connection '{$conn}'."; + return; + } + + // Crear la tabla + Schema::connection($conn)->create($table, function (Blueprint $table) { + $table->bigIncrements('id'); + + $table->string('alias', 64)->unique()->index(); + $table->string('owner_project', 64)->index(); + $table->string('namespace', 32)->default('core')->index(); + + $table->string('algorithm', 32)->default('AES-256-CBC'); + $table->binary('key_material'); + $table->boolean('is_active')->default(true); + $table->boolean('is_sensitive')->default(true); + + $table->timestamp('rotated_at')->nullable(); + $table->unsignedInteger('rotation_count')->default(0); + + $table->unsignedBigInteger('created_by')->nullable()->index(); + $table->unsignedBigInteger('updated_by')->nullable()->index(); + $table->unsignedBigInteger('deleted_by')->nullable()->index(); + + $table->timestamps(); + $table->softDeletes(); + + $table->index(['owner_project', 'namespace', 'is_active'], 'idx_full_context'); + }); + + info("✅ Created table `{$table}` in connection [{$conn}]."); + } + + public function down(): void + { + $keyVault = config_m()->setGroup('key_vault'); + + $driver = $keyVault->get('client.driver', 'database'); + $table = $keyVault->get('server.table', 'vault_keys'); + $conn = $keyVault->get('server.connection', 'vault'); + + if ($driver === 'database' && Schema::connection($conn)->hasTable($table)) { + Schema::connection($conn)->dropIfExists($table); + info("🗑️ Dropped table `{$table}` from connection [{$conn}]."); + } + } +}; diff --git a/database/migrations/2024_12_14_082234_create_settings_table.php b/database/migrations/2024_12_14_082234_create_settings_table.php index cc7a228..59a500f 100644 --- a/database/migrations/2024_12_14_082234_create_settings_table.php +++ b/database/migrations/2024_12_14_082234_create_settings_table.php @@ -1,57 +1,70 @@ mediumIncrements('id'); + $table->integerIncrements('id'); - $table->string('key')->index(); // Clave del setting + // Clave identificadora única para uso directo en Redis u otras estructuras rápidas + $table->string('key')->unique(); - $table->string('namespace', 8)->index(); // Namespace del setting - $table->string('environment', 7)->default('prod')->index(); // Entorno de aplicación (prod, dev, test, staging), permite sobrescribir valores según ambiente. - $table->string('scope', 6)->default('global')->index(); // Define el alcance: global, tenant, branch, user, etc. Útil en arquitecturas multicliente. + // Contexto completo del setting + $table->string('namespace', 8)->index(); // Ej. 'koneko' + $table->string('environment', 7)->default('prod')->index(); // prod, dev, staging, test + $table->string('component', 16)->index(); // Ej. 'vuexy-admin' + $table->string('module')->nullable()->index(); // composerName del módulo - $table->string('component', 16)->index(); // Nombre de Componente o proyecto - $table->string('module')->nullable()->index(); // composerName de módulo Autocalculado - $table->string('group', 16)->index(); // Grupo de configuraciones - $table->string('sub_group', 16)->index(); // Sub grupo de configuraciones - $table->string('key_name', 24)->index(); // Nombre de la clave de configuraciones - $table->unsignedMediumInteger('user_id')->nullable()->index(); // Usuario (null para globales) + $table->string('scope', 16)->nullable()->index(); // user, branch, tenant, etc. + $table->unsignedMediumInteger('scope_id')->nullable()->index(); // ID vinculado al scope (ej. user_id, branch_id) - $table->boolean('is_system')->default(false)->index(); // Indica si es un setting de sistema - $table->boolean('is_encrypted')->default(false)->index(); // Si el valor está cifrado (para secretos, tokens, passwords). - $table->boolean('is_sensitive')->default(false)->index(); // Marca datos sensibles (ej. datos personales, claves API). Puede ocultarse en UI o logs. - $table->boolean('is_editable')->default(true)->index(); // Permite o bloquea edición desde la UI (útil para settings de solo lectura). - $table->boolean('is_active')->default(true)->index(); // Permite activar/desactivar la aplicación de un setting sin eliminarlo. + $table->string('group', 16)->index(); // Grupo funcional (ej. layout, ui, behavior) + $table->string('section', 16)->default('default')->index(); // Bloque intermedio semántico + $table->string('sub_group', 16)->default('default')->index(); // Subgrupo semántico opcional + $table->string('key_name', 24)->index(); // Sub-subgrupo lógico o tipo de configuración - $table->string('encryption_key', 64)->nullable()->index(); // Identificador de la clave usada (ej. 'ssl_cert_2025') - $table->string('encryption_algorithm', 16)->nullable(); // Ej. 'AES-256-CBC' - $table->timestamp('encryption_rotated_at')->nullable(); // Fecha de última rotación de clave + // Flags operativos + $table->boolean('is_system')->default(false)->index(); + $table->boolean('is_sensitive')->default(false)->index(); + $table->boolean('is_file')->default(false)->index(); + $table->boolean('is_encrypted')->default(false)->index(); + $table->boolean('is_config')->default(false)->index(); + $table->boolean('is_editable')->default(true)->index(); + $table->boolean('is_track_usage')->default(false)->index(); + $table->boolean('is_should_cache')->default(true)->index(); + $table->boolean('is_active')->default(true)->index(); + // Metadata para archivos y cifrado + $table->string('mime_type', 50)->nullable(); + $table->string('file_name')->nullable(); + $table->string('encryption_algorithm', 16)->nullable(); + $table->string('encryption_key', 64)->nullable()->index(); + $table->timestamp('encryption_rotated_at')->nullable(); + + // Expiración del setting o su valor cacheado + $table->timestamp('expires_at')->nullable(); + $table->unsignedInteger('usage_count')->nullable(); + $table->timestamp('last_used_at')->nullable(); + $table->unsignedSmallInteger('cache_ttl')->nullable(); + $table->timestamp('cache_expires_at')->nullable(); + + // Descripciones para UI $table->string('description')->nullable(); $table->string('hint')->nullable(); - $table->timestamp('last_used_at')->nullable(); - $table->integer('usage_count')->default(0)->index(); - // Valores segmentados por tipo para mejor rendimiento + // Valores segmentados $table->string('value_string')->nullable(); $table->integer('value_integer')->nullable(); $table->boolean('value_boolean')->nullable(); $table->float('value_float', 16, 8)->nullable(); $table->text('value_text')->nullable(); $table->binary('value_binary')->nullable(); - $table->string('mime_type', 50)->nullable(); - $table->string('file_name')->nullable(); // Auditoría $table->unsignedMediumInteger('created_by')->nullable()->index(); @@ -59,50 +72,43 @@ return new class extends Migration $table->unsignedMediumInteger('deleted_by')->nullable()->index(); $table->timestamps(); - $table->softDeletes(); // THIS ONE + $table->softDeletes(); - // Índice de Unicidad Principal (para consultas y updates rápidos) - $table->unique( - ['namespace', 'environment', 'scope', 'component', 'group', 'sub_group', 'key_name', 'user_id'], - 'uniq_settings_full_context' - ); + // 📌 Clave única por contexto semántico-lógico + $table->unique([ + 'namespace', + 'environment', + 'component', + 'scope', + 'scope_id', + 'group', + 'section', + 'sub_group', + 'key_name' + ], 'uniq_settings_full_context'); - // Búsqueda rápida por componente - $table->index(['namespace', 'component'], 'idx_settings_ns_component'); + // 📈 Índices especializados para consultas + $table->index(['namespace', 'environment', 'component'], 'idx_ns_env_component'); + $table->index(['namespace', 'environment', 'component', 'is_active'], 'idx_ns_is_active'); + $table->index(['namespace', 'environment', 'component', 'is_system'], 'idx_ns_is_system'); + $table->index(['namespace', 'environment', 'component', 'is_config'], 'idx_ns_is_config'); + $table->index(['namespace', 'environment', 'component', 'is_encrypted'], 'idx_ns_is_encrypted'); + $table->index(['namespace', 'environment', 'component', 'is_file'], 'idx_ns_is_file'); + $table->index(['namespace', 'environment', 'component', 'is_editable'], 'idx_ns_is_editable'); + $table->index(['namespace', 'environment', 'component', 'is_track_usage'], 'idx_ns_is_track_usage'); + $table->index(['namespace', 'environment', 'component', 'is_should_cache'], 'idx_ns_is_should_cache'); + $table->index(['namespace', 'environment', 'component', 'group', 'section', 'sub_group'], 'idx_ns_env_comp_group_sect_subg'); + $table->index(['namespace', 'environment', 'component', 'group', 'section', 'sub_group', 'scope', 'scope_id'], 'idx_ns_env_comp_group_sect_subg_scope'); - // Listar grupos de un componente por scope - $table->index(['namespace', 'scope', 'component', 'group'], 'idx_settings_ns_scope_component_group'); - - // Listar subgrupos por grupo y componente en un scope - $table->index(['namespace', 'scope', 'component', 'group', 'sub_group'], 'idx_settings_ns_scope_component_sg'); - - // Consultas por entorno y usuario - $table->index(['namespace', 'environment', 'user_id'], 'idx_settings_ns_env_user'); - - // Consultas por scope y usuario - $table->index(['namespace', 'scope', 'user_id'], 'idx_settings_ns_scope_user'); - - // Consultas por estado de actividad o sistema - $table->index(['namespace', 'is_active'], 'idx_settings_ns_is_active'); - $table->index(['namespace', 'is_system'], 'idx_settings_ns_is_system'); - - // Consultas por estado de cifrado y usuario - $table->index(['namespace', 'is_encrypted', 'user_id'], 'idx_settings_encrypted_user'); - - // Relaciones - $table->foreign('user_id')->references('id')->on('users')->restrictOnDelete(); + // 🔒 Relaciones de auditoría $table->foreign('created_by')->references('id')->on('users')->restrictOnDelete(); $table->foreign('updated_by')->references('id')->on('users')->restrictOnDelete(); $table->foreign('deleted_by')->references('id')->on('users')->restrictOnDelete(); }); } - /** - * Reverse the migrations. - */ public function down(): void { Schema::dropIfExists('settings'); } - }; diff --git a/database/migrations/2024_12_14_082235_create_vault_keys_table.php b/database/migrations/2024_12_14_082235_create_vault_keys_table.php deleted file mode 100644 index cbb6b5f..0000000 --- a/database/migrations/2024_12_14_082235_create_vault_keys_table.php +++ /dev/null @@ -1,56 +0,0 @@ -create('vault_keys', function (Blueprint $table) { - $table->bigIncrements('id'); - - // Contexto de clave - $table->string('alias', 64)->unique()->index(); - $table->string('owner_project', 64)->index(); - $table->string('environment', 10)->default('prod')->index(); // prod, dev, staging - $table->string('namespace', 32)->default('core')->index(); - $table->string('scope', 16)->default('global')->index(); // global, tenant, user - - // Datos de la clave - $table->string('algorithm', 32)->default('AES-256-CBC'); - $table->binary('key_material'); - $table->boolean('is_active')->default(true); - $table->boolean('is_sensitive')->default(true); - - // Control de rotación - $table->timestamp('rotated_at')->nullable(); - $table->unsignedInteger('rotation_count')->default(0); - - // Auditoría - $table->unsignedBigInteger('created_by')->nullable()->index(); - $table->unsignedBigInteger('updated_by')->nullable()->index(); - $table->unsignedBigInteger('deleted_by')->nullable()->index(); - - $table->timestamps(); - $table->softDeletes(); - - // Índices adicionales - $table->index(['owner_project', 'environment', 'namespace', 'scope', 'is_active'], 'idx_full_context'); - }); - } - - /** - * Reverse the migrations. - */ - public function down(): void - { - Schema::connection('vault')->dropIfExists('settings'); - } - -}; diff --git a/docs/.html b/docs/.html deleted file mode 100644 index 52c682c..0000000 --- a/docs/.html +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - - - - - {{ page_title }} | {{ site_name }} - - - - - - - - - - - - - - - - - - - - - - - - - - - - {% for alternate in alternate_langs %} - - {% endfor %} - - - - - - - - - - - - - - - - diff --git a/docs/Helpers/cache-helper-guide.md b/docs/Helpers/cache-helper-guide.md index 995232c..68af459 100644 --- a/docs/Helpers/cache-helper-guide.md +++ b/docs/Helpers/cache-helper-guide.md @@ -1,12 +1,12 @@ # Koneko ERP - Cache Helper Guide -> ✨ Esta guía detalla el uso correcto del sistema de cache en Koneko ERP, basado completamente en el helper `cache_manager()`, sin necesidad de interactuar con las clases internas como `KonekoCacheManager` o `LaravelCacheManager`. +> ✨ Esta guía detalla el uso correcto del sistema de cache en Koneko ERP, basado completamente en el helper `cache_m()`, sin necesidad de interactuar con las clases internas como `KonekoCacheManager` o `LaravelCacheManager`. --- ## 🔎 Filosofía -* Toda interacción de componentes con el sistema de cache debe realizarse exclusivamente mediante el helper `cache_manager()`. +* Toda interacción de componentes con el sistema de cache debe realizarse exclusivamente mediante el helper `cache_m()`. * Las clases internas son consideradas **@internal**, y no deben ser accedidas directamente por desarrolladores de componentes. * El sistema permite configuración jerárquica basada en namespace del componente, grupo lógico de datos y claves individuales. @@ -15,15 +15,15 @@ ## 🔍 Sintaxis del Helper ```php -cache_manager(string $component = 'admin', string $group = 'cache') +cache_m(string $component = 'admin', string $group = 'cache') ``` Retorna una instancia segura del gestor para el componente y grupo indicados. Ejemplos: ```php -cache_manager('admin', 'avatar')->enabled(); -cache_manager('website', 'menu')->ttl(); -cache_manager('website', 'html')->flush(); +cache_m('admin', 'avatar')->enabled(); +cache_m('website', 'menu')->ttl(); +cache_m('website', 'html')->flush(); ``` --- @@ -60,13 +60,13 @@ Esto permite granularidad sin perder coherencia global. ### Validar TTL efectivo ```php -$ttl = cache_manager('website', 'menu')->ttl(); +$ttl = cache_m('website', 'menu')->ttl(); ``` ### Verificar si está habilitado ```php -if (cache_manager('admin', 'avatar')->enabled()) { +if (cache_m('admin', 'avatar')->enabled()) { // Proceder con cache } ``` @@ -74,7 +74,7 @@ if (cache_manager('admin', 'avatar')->enabled()) { ### Limpiar cache con soporte para etiquetas ```php -cache_manager('website', 'html')->flush(); +cache_m('website', 'html')->flush(); ``` --- @@ -112,6 +112,6 @@ El comando mostrará información relevante para depuración sin exponer clases ## 🌟 Conclusión -Este sistema garantiza modularidad, extensibilidad y seguridad. El helper `cache_manager()` es la única puerta de entrada para desarrolladores y debe usarse exclusivamente para mantener la integridad del ecosistema. +Este sistema garantiza modularidad, extensibilidad y seguridad. El helper `cache_m()` es la única puerta de entrada para desarrolladores y debe usarse exclusivamente para mantener la integridad del ecosistema. > ✅ Si necesitas agregar un nuevo grupo de cache, simplemente define su configuración y comienza a usar el helper, sin necesidad de modificar clases o contratos. diff --git a/docs/Helpers/component-access-and-exposure-policy.md b/docs/Helpers/component-access-and-exposure-policy.md index 13ffc77..b82b837 100644 --- a/docs/Helpers/component-access-and-exposure-policy.md +++ b/docs/Helpers/component-access-and-exposure-policy.md @@ -9,7 +9,7 @@ Este documento define las reglas de exposición y acceso para los servicios téc | Clase Técnica | Expuesta al Usuario | Acceso Recomendado | Notas | | --------------------------------- | ------------------- | -------------------------- | ---------------------------------------------------------------- | | `KonekoSettingManager` | ❌ No | `settings()` helper | Configuración modular con soporte de namespaces. | -| `KonekoCacheManager` | ❌ No | `cache_manager()` helper | Acceso al sistema de cache multi-driver y con TTL configurables. | +| `KonekoCacheManager` | ❌ No | `cache_m()` helper | Acceso al sistema de cache multi-driver y con TTL configurables. | | `KonekoSystemLogger` | ❌ No | `log_system()` helper | Logger morfable con niveles y contexto extendido. | | `KonekoSecurityLogger` | ❌ No | `log_security()` helper | Eventos de seguridad con GeoIP y proxy detection. | | `KonekoUserInteractionLogger` | ❌ No | `log_interaction()` helper | Auditoría de componentes y acciones sensibles. | @@ -28,7 +28,7 @@ Este documento define las reglas de exposición y acceso para los servicios téc ## 💡 Buenas prácticas para desarrolladores * Usa `settings()` para acceder o escribir configuraciones modulares. -* Usa `cache_manager()` para obtener TTL, flush o debug por componente. +* Usa `cache_m()` para obtener TTL, flush o debug por componente. * Usa `log_system()` para registrar eventos de sistema de forma morfable. * Usa `log_security()` para eventos como logins fallidos o IP sospechosas. * Usa `log_interaction()` para acciones en Livewire, eventos UI o tracking avanzado. @@ -40,7 +40,7 @@ Este documento define las reglas de exposición y acceso para los servicios téc ```php // Correcto settings()->in('website')->get('general.site_name'); -cache_manager('admin', 'menu')->ttl(); +cache_m('admin', 'menu')->ttl(); log_system('info', 'Menú regenerado'); ``` diff --git a/docs/Helpers/security-logger-helper-guide.md b/docs/Helpers/security-logger-helper-guide.md index be5f1a1..4e6f0ba 100644 --- a/docs/Helpers/security-logger-helper-guide.md +++ b/docs/Helpers/security-logger-helper-guide.md @@ -90,7 +90,7 @@ El evento registrado se almacena en la tabla `security_events`, con campos como: Si tienes habilitado el trait `HasGeolocation`, el sistema hace *GeoIP Lookup* por IP: ```php -use Koneko\VuexyAdmin\Support\Traits\Helpers\HasGeolocation; +use Koneko\VuexyAdmin\Support\Traits\Geolocation\HasGeolocation; ``` --- diff --git a/resources/assets/js/utils/favicon.js b/resources/assets/js/utils/favicon.js new file mode 100644 index 0000000..93c804f --- /dev/null +++ b/resources/assets/js/utils/favicon.js @@ -0,0 +1,18 @@ +window.faviconManager = { + set(src) { + let link = document.querySelector("link[rel~='icon']"); + if (!link) { + link = document.createElement("link"); + link.rel = "icon"; + document.head.appendChild(link); + } + link.href = src; + }, + flash(src, duration = 1500) { + const original = document.querySelector("link[rel~='icon']")?.href; + this.set(src); + if (original) { + setTimeout(() => this.set(original), duration); + } + } +}; diff --git a/resources/scss/app.scss b/resources/scss/app.scss index 07f26d8..872e1fe 100644 --- a/resources/scss/app.scss +++ b/resources/scss/app.scss @@ -1,7 +1,7 @@ @import 'tailwindcss/base'; @import 'tailwindcss/components'; @import 'tailwindcss/utilities'; -$ti-font-path: '/public/build/fonts/tabler'; +$ti-font-path: '/public/build/webfonts/tabler'; @import "@tabler/icons-webfont/dist/tabler-icons.scss"; diff --git a/resources/views/layouts/vuexy/sections/styles.blade.php b/resources/views/layouts/vuexy/sections/styles.blade.php index d0293a9..fe548db 100644 --- a/resources/views/layouts/vuexy/sections/styles.blade.php +++ b/resources/views/layouts/vuexy/sections/styles.blade.php @@ -5,7 +5,7 @@ @vite([ - 'vendor/koneko/laravel-vuexy-admin/resources/assets/vendor/fonts/fontawesome.scss', + //'vendor/koneko/laravel-vuexy-admin/resources/assets/vendor/fonts/fontawesome.scss', 'vendor/koneko/laravel-vuexy-admin/resources/assets/vendor/libs/node-waves/node-waves.scss', ]) diff --git a/resources/views/livewire/navbar/vuexy-quicklinks.blade.php b/resources/views/livewire/navbar/vuexy-quicklinks.blade.php index 1860d08..92ce724 100644 --- a/resources/views/livewire/navbar/vuexy-quicklinks.blade.php +++ b/resources/views/livewire/navbar/vuexy-quicklinks.blade.php @@ -1,3 +1,9 @@ +@php + use Koneko\VuexyAdmin\Models\User; + + $maxQuickLinks = config_m()->get('layout.vuexy.maxQuickLinks', 8); +@endphp +