├── .codeclimate.yml ├── .editorconfig ├── .env.example ├── .env.infrastructure.example ├── .gitattributes ├── .githooks └── pre-commit ├── .github └── workflows │ └── master.yml ├── .gitignore ├── .styleci.yml ├── Makefile ├── Makefile.compose.mk ├── Procfile ├── README.md ├── app ├── Application │ ├── .modulite.yaml │ ├── Classes │ │ ├── Application.php │ │ └── ApplicationState.php │ ├── Console │ │ └── Kernel.php │ ├── Exceptions │ │ └── Handler.php │ ├── Http │ │ ├── Kernel.php │ │ └── Middleware │ │ │ ├── EncryptCookies.php │ │ │ ├── PreventRequestsDuringMaintenance.php │ │ │ ├── RedirectIfAuthenticated.php │ │ │ ├── RedirectUnauthenticated.php │ │ │ ├── TrimStrings.php │ │ │ ├── TrustHosts.php │ │ │ ├── TrustProxies.php │ │ │ └── VerifyCsrfToken.php │ ├── Providers │ │ ├── AppServiceProvider.php │ │ ├── DatabaseServiceProvider.php │ │ ├── FakerServiceProvider.php │ │ ├── HorizonServiceProvider.php │ │ ├── RouteServiceProvider.php │ │ ├── TelescopeServiceProvider.php │ │ └── TotemServiceProvider.php │ └── Tests │ │ └── CreatesApplication.php ├── Components │ ├── .modulite.yaml │ ├── Addressable │ │ ├── .modulite.yaml │ │ ├── Admin │ │ │ └── RelationManagers │ │ │ │ └── AddressesRelationManager.php │ │ ├── Database │ │ │ ├── Builders │ │ │ │ └── AddressBuilder.php │ │ │ ├── Factories │ │ │ │ └── AddressFactory.php │ │ │ └── Migrations │ │ │ │ └── 2021_12_20_104523_create_addresses_table.php │ │ ├── Enums │ │ │ └── Translation │ │ │ │ └── AddressesTranslationKey.php │ │ ├── Models │ │ │ └── Address.php │ │ ├── Providers │ │ │ └── ComponentServiceProvider.php │ │ └── Resources │ │ │ └── Lang │ │ │ └── en │ │ │ ├── admin.php │ │ │ └── enums.php │ ├── Attributable │ │ ├── .modulite.yaml │ │ ├── Admin │ │ │ ├── RelationManagers │ │ │ │ └── AttributeValuesRelationManager.php │ │ │ └── Resources │ │ │ │ ├── AttributeResource.php │ │ │ │ └── AttributeResource │ │ │ │ └── Pages │ │ │ │ ├── CreateAttribute.php │ │ │ │ ├── EditAttribute.php │ │ │ │ ├── ListAttributes.php │ │ │ │ └── ViewAttribute.php │ │ ├── Database │ │ │ ├── Builders │ │ │ │ ├── AttributeBuilder.php │ │ │ │ └── AttributeValueBuilder.php │ │ │ ├── Factories │ │ │ │ ├── AttributeFactory.php │ │ │ │ └── AttributeValueFactory.php │ │ │ ├── Migrations │ │ │ │ ├── 2021_11_14_044836_create_attributes_table.php │ │ │ │ └── 2021_11_14_061413_create_attribute_values_table.php │ │ │ └── Seeders │ │ │ │ ├── AttributeSeeder.php │ │ │ │ └── AttributeValueSeeder.php │ │ ├── Enums │ │ │ ├── AttributeValuesType.php │ │ │ └── Translation │ │ │ │ ├── AttributeTranslationKey.php │ │ │ │ └── AttributeValueTranslationKey.php │ │ ├── Http │ │ │ └── Resources │ │ │ │ ├── AttributeResource.php │ │ │ │ └── AttributeValueResource.php │ │ ├── Models │ │ │ ├── Attribute.php │ │ │ ├── AttributeValue.php │ │ │ └── Virtual │ │ │ │ ├── Attribute.php │ │ │ │ └── AttributeValue.php │ │ ├── Providers │ │ │ └── ComponentServiceProvider.php │ │ ├── Resources │ │ │ └── Lang │ │ │ │ └── en │ │ │ │ ├── admin.php │ │ │ │ └── enums.php │ │ └── Tests │ │ │ └── Feature │ │ │ └── Admin │ │ │ └── Resources │ │ │ └── AttributeResourceTest.php │ ├── LoginHistoryable │ │ ├── .modulite.yaml │ │ ├── Admin │ │ │ └── RelationManagers │ │ │ │ └── LoginHistoryRelationManager.php │ │ ├── DTOs │ │ │ └── LoginDetails │ │ │ │ ├── LoginDetails.php │ │ │ │ ├── LoginDetailsLocation.php │ │ │ │ └── LoginDetailsUserAgent.php │ │ ├── Database │ │ │ ├── Builders │ │ │ │ └── LoginHistoryBuilder.php │ │ │ └── Migrations │ │ │ │ └── 2022_06_22_095306_create_login_history_table.php │ │ ├── Enums │ │ │ └── Translation │ │ │ │ └── LoginHistoryTranslationKey.php │ │ ├── Models │ │ │ └── LoginHistory.php │ │ ├── Providers │ │ │ └── ComponentServiceProvider.php │ │ ├── Resources │ │ │ └── Lang │ │ │ │ └── en │ │ │ │ ├── admin.php │ │ │ │ └── enums.php │ │ └── Services │ │ │ └── LoginDetailsService.php │ ├── Mediable │ │ ├── .modulite.yaml │ │ ├── Admin │ │ │ └── Components │ │ │ │ └── Fields │ │ │ │ └── MediaLibraryFileUpload.php │ │ ├── Classes │ │ │ ├── RegisteredResponsiveImages.php │ │ │ └── ResponsiveImage.php │ │ ├── Database │ │ │ └── Builders │ │ │ │ └── MediaBuilder.php │ │ ├── Enums │ │ │ └── MediaType.php │ │ ├── Http │ │ │ └── Resources │ │ │ │ ├── MediaResource.php │ │ │ │ └── ResponsiveImageResource.php │ │ ├── Models │ │ │ ├── Media.php │ │ │ └── Virtual │ │ │ │ ├── Media.php │ │ │ │ └── ResponsiveImage.php │ │ ├── Providers │ │ │ └── ComponentServiceProvider.php │ │ └── Services │ │ │ └── Media │ │ │ ├── FileAdder.php │ │ │ ├── PathGenerator.php │ │ │ └── UrlGenerator.php │ ├── Purchasable │ │ ├── .modulite.yaml │ │ ├── Abstracts │ │ │ └── Purchasable.php │ │ ├── Admin │ │ │ └── RelationManagers │ │ │ │ └── PricesRelationManager.php │ │ ├── Casts │ │ │ └── MoneyCast.php │ │ ├── Database │ │ │ ├── Builders │ │ │ │ └── PriceBuilder.php │ │ │ ├── Factories │ │ │ │ └── PriceFactory.php │ │ │ ├── Migrations │ │ │ │ └── 2022_01_01_131915_create_prices_table.php │ │ │ └── Seeders │ │ │ │ └── PriceSeeder.php │ │ ├── Enums │ │ │ └── Translation │ │ │ │ └── PriceTranslationKey.php │ │ ├── Exceptions │ │ │ └── IncompatibleCurrenciesException.php │ │ ├── Http │ │ │ └── Resources │ │ │ │ ├── CurrencyResource.php │ │ │ │ └── MoneyResource.php │ │ ├── Models │ │ │ ├── Price.php │ │ │ └── Virtual │ │ │ │ ├── Currency.php │ │ │ │ └── Money.php │ │ ├── Providers │ │ │ └── ComponentServiceProvider.php │ │ └── Resources │ │ │ └── Lang │ │ │ └── en │ │ │ ├── admin.php │ │ │ └── enums.php │ └── Queryable │ │ ├── .modulite.yaml │ │ ├── Abstracts │ │ ├── Filter │ │ │ ├── FilterService.php │ │ │ └── IAllowedFilterEnum.php │ │ ├── FilterBuilder.php │ │ ├── Query.php │ │ └── Sort │ │ │ ├── IAllowedSortEnum.php │ │ │ └── SortService.php │ │ ├── Classes │ │ ├── Filter │ │ │ ├── Filter.php │ │ │ ├── InputFilter.php │ │ │ ├── Multiselect │ │ │ │ ├── NestedMultiselectFilter.php │ │ │ │ ├── PlainMultiselectFilter.php │ │ │ │ └── Resources │ │ │ │ │ ├── NestedMultiselectFilterValues.php │ │ │ │ │ └── NestedMultiselectFilterValuesAttribute.php │ │ │ ├── RangeFilter.php │ │ │ ├── SelectFilter.php │ │ │ └── Virtual │ │ │ │ ├── Filter.php │ │ │ │ ├── InputFilter │ │ │ │ ├── AllowedInputFilter.php │ │ │ │ ├── AppliedInputFilter.php │ │ │ │ └── InputFilter.php │ │ │ │ ├── NestedMultiselectFilter │ │ │ │ ├── AllowedNestedMultiselectFilter.php │ │ │ │ ├── AppliedNestedMultiselectFilter.php │ │ │ │ ├── NestedMultiselectFilter.php │ │ │ │ └── Resources │ │ │ │ │ ├── NestedMultiselectFilterValues.php │ │ │ │ │ └── NestedMultiselectFilterValuesAttribute.php │ │ │ │ ├── PlainMultiselectFilter │ │ │ │ ├── AllowedPlainMultiselectFilter.php │ │ │ │ ├── AppliedPlainMultiselectFilter.php │ │ │ │ └── PlainMultiselectFilter.php │ │ │ │ ├── RangeFilter │ │ │ │ ├── AllowedRangeFilter.php │ │ │ │ ├── AppliedRangeFilter.php │ │ │ │ └── RangeFilter.php │ │ │ │ └── SelectFilter │ │ │ │ ├── AllowedSelectFilter.php │ │ │ │ ├── AppliedSelectFilter.php │ │ │ │ └── SelectFilter.php │ │ └── Sort │ │ │ └── Sort.php │ │ ├── DTOs │ │ ├── Filter │ │ │ └── FilterQuery.php │ │ └── Sort │ │ │ └── SortQuery.php │ │ ├── Enums │ │ ├── QueryFilterType.php │ │ └── QueryKey.php │ │ ├── Http │ │ └── Resources │ │ │ ├── Filter │ │ │ └── FilterQueryResource.php │ │ │ └── Sort │ │ │ └── SortQueryResource.php │ │ ├── Services │ │ ├── Filter │ │ │ ├── FilterApplicator.php │ │ │ └── FilterQueryResourceBuilder.php │ │ └── Sort │ │ │ ├── SortApplicator.php │ │ │ └── SortQueryResourceBuilder.php │ │ └── Traits │ │ └── Sort │ │ └── AllowedSortEnum.php ├── Domains │ ├── .modulite.yaml │ ├── Admin │ │ ├── .modulite.yaml │ │ ├── Admin │ │ │ ├── Abstracts │ │ │ │ ├── Pages │ │ │ │ │ ├── CreateRecord.php │ │ │ │ │ ├── EditRecord.php │ │ │ │ │ ├── ExportableResourcePage.php │ │ │ │ │ ├── ListRecords.php │ │ │ │ │ ├── ResourceRecordPage.php │ │ │ │ │ └── ViewRecord.php │ │ │ │ ├── RelationManager.php │ │ │ │ ├── Resource.php │ │ │ │ ├── SettingsPage.php │ │ │ │ └── SimpleResource.php │ │ │ ├── Components │ │ │ │ ├── Actions │ │ │ │ │ ├── Create │ │ │ │ │ │ ├── HasCreateAction.php │ │ │ │ │ │ ├── Pages │ │ │ │ │ │ │ └── CreateAction.php │ │ │ │ │ │ └── Tables │ │ │ │ │ │ │ └── CreateAction.php │ │ │ │ │ ├── Delete │ │ │ │ │ │ ├── HasDeleteAction.php │ │ │ │ │ │ ├── Pages │ │ │ │ │ │ │ └── DeleteAction.php │ │ │ │ │ │ └── Tables │ │ │ │ │ │ │ └── DeleteAction.php │ │ │ │ │ ├── DeleteBulkAction.php │ │ │ │ │ ├── Edit │ │ │ │ │ │ ├── HasEditAction.php │ │ │ │ │ │ ├── Pages │ │ │ │ │ │ │ └── EditAction.php │ │ │ │ │ │ └── Tables │ │ │ │ │ │ │ └── EditAction.php │ │ │ │ │ ├── Export │ │ │ │ │ │ ├── HasExportAction.php │ │ │ │ │ │ ├── Pages │ │ │ │ │ │ │ └── ExportAction.php │ │ │ │ │ │ └── Tables │ │ │ │ │ │ │ └── ExportBulkAction.php │ │ │ │ │ ├── UpdateBulkAction.php │ │ │ │ │ └── View │ │ │ │ │ │ ├── HasViewAction.php │ │ │ │ │ │ ├── Pages │ │ │ │ │ │ └── ViewAction.php │ │ │ │ │ │ └── Tables │ │ │ │ │ │ └── ViewAction.php │ │ │ │ ├── Cards │ │ │ │ │ └── TimestampsCard.php │ │ │ │ └── Forms │ │ │ │ │ └── RichEditor.php │ │ │ ├── Pages │ │ │ │ └── Login.php │ │ │ ├── Resources │ │ │ │ ├── AdminResource.php │ │ │ │ ├── AdminResource │ │ │ │ │ └── Pages │ │ │ │ │ │ ├── CreateAdmin.php │ │ │ │ │ │ ├── EditAdmin.php │ │ │ │ │ │ ├── ListAdmins.php │ │ │ │ │ │ └── ViewAdmin.php │ │ │ │ └── Development │ │ │ │ │ ├── ClockworkLinkResource.php │ │ │ │ │ ├── ElasticvueLinkResource.php │ │ │ │ │ ├── HorizonLinkResource.php │ │ │ │ │ ├── KibanaLinkResource.php │ │ │ │ │ ├── Pages │ │ │ │ │ ├── ClockworkLink.php │ │ │ │ │ ├── ElasticvueLink.php │ │ │ │ │ ├── HorizonLink.php │ │ │ │ │ ├── KibanaLink.php │ │ │ │ │ ├── PhpCacheAdminLink.php │ │ │ │ │ ├── PrequelLink.php │ │ │ │ │ ├── RabbitMQLink.php │ │ │ │ │ ├── SwaggerLink.php │ │ │ │ │ ├── TelescopeLink.php │ │ │ │ │ └── TotemLink.php │ │ │ │ │ ├── PhpCacheAdminLinkResource.php │ │ │ │ │ ├── PrequelLinkResource.php │ │ │ │ │ ├── RabbitMQLinkResource.php │ │ │ │ │ ├── SwaggerLinkResource.php │ │ │ │ │ ├── TelescopeLinkResource.php │ │ │ │ │ └── TotemLinkResource.php │ │ │ └── Traits │ │ │ │ └── AppliesSearchToTableQuery.php │ │ ├── Database │ │ │ ├── Builders │ │ │ │ └── AdminBuilder.php │ │ │ ├── Factories │ │ │ │ └── AdminFactory.php │ │ │ ├── Migrations │ │ │ │ └── 2021_12_11_034125_create_admins_table.php │ │ │ └── Seeders │ │ │ │ └── AdminSeeder.php │ │ ├── Enums │ │ │ └── Translation │ │ │ │ ├── AdminModalTranslationKey.php │ │ │ │ ├── AdminNavigationGroupTranslationKey.php │ │ │ │ ├── AdminPagePropertyTranslationKey.php │ │ │ │ ├── AdminRelationPropertyTranslationKey.php │ │ │ │ ├── AdminResourcePropertyTranslationKey.php │ │ │ │ ├── AdminWidgetPropertyTranslationKey.php │ │ │ │ ├── Components │ │ │ │ ├── Actions │ │ │ │ │ └── ExportActionTranslationKey.php │ │ │ │ ├── AdminActionTranslationKey.php │ │ │ │ └── Cards │ │ │ │ │ └── AdminTimestampsCardTranslationKey.php │ │ │ │ ├── ExportFormat.php │ │ │ │ └── Resources │ │ │ │ └── AdminTranslationKey.php │ │ ├── Helpers │ │ │ └── AdminNavigationSortHelper.php │ │ ├── Models │ │ │ └── Admin.php │ │ ├── Providers │ │ │ └── DomainServiceProvider.php │ │ ├── Resources │ │ │ └── Lang │ │ │ │ └── en │ │ │ │ ├── admin.php │ │ │ │ └── enums.php │ │ ├── Services │ │ │ └── Translator.php │ │ ├── Tests │ │ │ ├── AdminCrudTestCase.php │ │ │ ├── AdminExportTest.php │ │ │ ├── AdminTestCase.php │ │ │ └── Feature │ │ │ │ └── Admin │ │ │ │ └── AdminPagesTest.php │ │ └── Traits │ │ │ ├── HasNavigationSort.php │ │ │ └── Translation │ │ │ └── TranslatableAdminWidget.php │ ├── Cart │ │ ├── .modulite.yaml │ │ ├── Database │ │ │ ├── Builders │ │ │ │ ├── CartBuilder.php │ │ │ │ └── CartItemBuilder.php │ │ │ └── Migrations │ │ │ │ ├── 2022_01_10_094631_create_carts_table.php │ │ │ │ └── 2022_01_10_100410_create_cart_items_table.php │ │ ├── Http │ │ │ └── Controllers │ │ │ │ └── CartController.php │ │ ├── Models │ │ │ ├── Cart.php │ │ │ └── CartItem.php │ │ ├── Providers │ │ │ ├── DomainServiceProvider.php │ │ │ └── RouteServiceProvider.php │ │ ├── Services │ │ │ └── CartService.php │ │ └── Tests │ │ │ └── Unit │ │ │ └── CartServiceTest.php │ ├── Catalog │ │ ├── .modulite.yaml │ │ ├── Admin │ │ │ ├── Components │ │ │ │ └── Actions │ │ │ │ │ └── HierarchyAction.php │ │ │ ├── Pages │ │ │ │ └── ManageCatalogSettings.php │ │ │ └── Resources │ │ │ │ ├── ProductCategoryResource.php │ │ │ │ ├── ProductCategoryResource │ │ │ │ ├── Pages │ │ │ │ │ ├── CreateProductCategory.php │ │ │ │ │ ├── EditProductCategory.php │ │ │ │ │ ├── HierarchyProductCategory.php │ │ │ │ │ ├── ListProductCategories.php │ │ │ │ │ └── ViewProductCategory.php │ │ │ │ └── RelationManagers │ │ │ │ │ └── ProductCategoryChildrenRelationManager.php │ │ │ │ ├── ProductResource.php │ │ │ │ └── ProductResource │ │ │ │ └── Pages │ │ │ │ ├── CreateProduct.php │ │ │ │ ├── EditProduct.php │ │ │ │ ├── ListProducts.php │ │ │ │ └── ViewProduct.php │ │ ├── Console │ │ │ └── Commands │ │ │ │ ├── UpdateProductCategoriesDisplayability.php │ │ │ │ └── UpdateProductsDisplayability.php │ │ ├── Database │ │ │ ├── Builders │ │ │ │ ├── ProductBuilder.php │ │ │ │ ├── ProductCategoryBuilder.php │ │ │ │ └── ProductProductCategoryBuilder.php │ │ │ ├── Elastic │ │ │ │ ├── 2022_08_05_071516_create_products_index.php │ │ │ │ └── 2022_08_05_071620_create_product_categories_index.php │ │ │ ├── Factories │ │ │ │ ├── ProductCategoryFactory.php │ │ │ │ └── ProductFactory.php │ │ │ ├── Migrations │ │ │ │ ├── 2021_11_10_102711_create_product_categories_table.php │ │ │ │ ├── 2021_11_14_043741_create_products_table.php │ │ │ │ └── 2021_12_18_091715_create_product_categories_products_table.php │ │ │ ├── Seeders │ │ │ │ ├── ProductAttributeValueSeeder.php │ │ │ │ ├── ProductCategorySeeder.php │ │ │ │ ├── ProductPriceSeeder.php │ │ │ │ └── ProductSeeder.php │ │ │ └── Settings │ │ │ │ └── 2022_01_02_055923_create_catalog_settings.php │ │ ├── Enums │ │ │ ├── Media │ │ │ │ ├── ProductCategoryMediaCollectionKey.php │ │ │ │ └── ProductMediaCollectionKey.php │ │ │ ├── Query │ │ │ │ ├── Filter │ │ │ │ │ └── ProductAllowedFilter.php │ │ │ │ └── Sort │ │ │ │ │ └── ProductAllowedSort.php │ │ │ └── Translation │ │ │ │ ├── AdminActionTranslationKey.php │ │ │ │ ├── AdminNavigationGroupTranslationKey.php │ │ │ │ ├── CatalogSettingsTranslationKey.php │ │ │ │ ├── ProductCategoryTranslationKey.php │ │ │ │ └── ProductTranslationKey.php │ │ ├── Http │ │ │ ├── Controllers │ │ │ │ └── Api │ │ │ │ │ ├── ProductCategoryController.php │ │ │ │ │ ├── ProductController.php │ │ │ │ │ └── Virtual │ │ │ │ │ ├── ProductCategoryController.php │ │ │ │ │ └── ProductController.php │ │ │ ├── Middleware │ │ │ │ └── SetDefaultCurrency.php │ │ │ ├── Requests │ │ │ │ ├── ProductIndexRequest.php │ │ │ │ └── ProductShowRequest.php │ │ │ └── Resources │ │ │ │ ├── Product │ │ │ │ ├── HeavyProductResource.php │ │ │ │ ├── LightProductResource.php │ │ │ │ └── ProductResource.php │ │ │ │ └── ProductCategory │ │ │ │ ├── HeavyProductCategoryResource.php │ │ │ │ ├── LightProductCategoryResource.php │ │ │ │ └── MediumProductCategoryResource.php │ │ ├── Jobs │ │ │ └── Export │ │ │ │ ├── ProductCategoriesExportJob.php │ │ │ │ └── ProductsExportJob.php │ │ ├── Models │ │ │ ├── Pivot │ │ │ │ └── ProductProductCategory.php │ │ │ ├── Product.php │ │ │ ├── ProductCategory.php │ │ │ ├── Settings │ │ │ │ └── CatalogSettings.php │ │ │ └── Virtual │ │ │ │ ├── Product │ │ │ │ ├── HeavyProduct.php │ │ │ │ ├── LightProduct.php │ │ │ │ └── Product.php │ │ │ │ └── ProductCategory │ │ │ │ ├── HeavyProductCategory.php │ │ │ │ ├── LightProductCategory.php │ │ │ │ └── MediumProductCategory.php │ │ ├── Observers │ │ │ ├── ProductCategoryObserver.php │ │ │ ├── ProductObserver.php │ │ │ └── ProductProductCategoryObserver.php │ │ ├── Providers │ │ │ ├── DomainServiceProvider.php │ │ │ ├── EventServiceProvider.php │ │ │ └── RouteServiceProvider.php │ │ ├── Resources │ │ │ ├── Lang │ │ │ │ └── en │ │ │ │ │ ├── admin.php │ │ │ │ │ └── enums.php │ │ │ └── Views │ │ │ │ ├── components │ │ │ │ └── hierarchy-item.blade.php │ │ │ │ ├── hierarchy-assets.blade.php │ │ │ │ └── hierarchy.blade.php │ │ ├── Services │ │ │ └── Query │ │ │ │ ├── Filter │ │ │ │ ├── ProductFilterBuilder.php │ │ │ │ ├── ProductFilterBuilderRepository.php │ │ │ │ └── ProductFilterService.php │ │ │ │ └── Sort │ │ │ │ └── ProductSortService.php │ │ └── Tests │ │ │ ├── Feature │ │ │ ├── Admin │ │ │ │ ├── Export │ │ │ │ │ ├── ProductCategoriesAdminExportTest.php │ │ │ │ │ └── ProductsAdminExportTest.php │ │ │ │ └── Resources │ │ │ │ │ ├── ProductCategoryResourceTest.php │ │ │ │ │ └── ProductResourceTest.php │ │ │ ├── Api │ │ │ │ ├── ProductCategoryControllerTest.php │ │ │ │ └── ProductControllerTest.php │ │ │ └── Commands │ │ │ │ └── CatalogDisplayabilityTest.php │ │ │ └── Unit │ │ │ └── ProductCategoryTest.php │ ├── Common │ │ ├── .modulite.yaml │ │ ├── Classes │ │ │ └── Excel │ │ │ │ └── ExportColumn.php │ │ ├── Console │ │ │ └── Commands │ │ │ │ └── RefreshApplicationCommand.php │ │ ├── Database │ │ │ ├── Builders │ │ │ │ └── ConfirmationTokenBuilder.php │ │ │ ├── Elastic │ │ │ │ └── .gitignore │ │ │ ├── Factory.php │ │ │ ├── Migrations │ │ │ │ ├── 2018_08_08_100000_create_telescope_entries_table.php │ │ │ │ ├── 2019_08_19_000000_create_failed_jobs_table.php │ │ │ │ ├── 2021_04_24_044039_enable_postgis.php │ │ │ │ ├── 2022_01_02_050855_create_settings_table.php │ │ │ │ ├── 2022_01_29_152229_create_media_table.php │ │ │ │ ├── 2022_01_29_153554_create_jobs_table.php │ │ │ │ └── 2022_02_13_044156_create_confirmation_tokens_table.php │ │ │ ├── Seeder.php │ │ │ └── Seeders │ │ │ │ └── DatabaseSeeder.php │ │ ├── Enums │ │ │ ├── BooleanString.php │ │ │ ├── ConfirmationTokenType.php │ │ │ ├── Lang │ │ │ │ └── TranslationFilename.php │ │ │ ├── QueueName.php │ │ │ ├── Response │ │ │ │ ├── ResponseKey.php │ │ │ │ └── ResponseValueType.php │ │ │ └── ServiceProviderNamespace.php │ │ ├── Exceptions │ │ │ ├── HttpException.php │ │ │ ├── InvalidConfirmationTokenException.php │ │ │ └── NotSupportedClassException.php │ │ ├── Http │ │ │ ├── Middleware │ │ │ │ ├── AddTimestamp.php │ │ │ │ ├── AddUserToSentryScope.php │ │ │ │ ├── ForceJsonResponse.php │ │ │ │ └── Recaptcha.php │ │ │ └── Requests │ │ │ │ └── IndexRequest.php │ │ ├── Interfaces │ │ │ └── Exportable.php │ │ ├── Jobs │ │ │ └── ExportJob.php │ │ ├── Mixins │ │ │ ├── CacheMixin.php │ │ │ ├── CarbonMixin.php │ │ │ ├── DatabaseMixin.php │ │ │ ├── RelationMixin.php │ │ │ ├── RequestMixin.php │ │ │ └── SessionGuardMixin.php │ │ ├── Models │ │ │ ├── ConfirmationToken.php │ │ │ └── Virtual │ │ │ │ ├── PaginationLinks.php │ │ │ │ └── PaginationMeta.php │ │ ├── Providers │ │ │ ├── DomainServiceProvider.php │ │ │ └── RouteServiceProvider.php │ │ ├── Resources │ │ │ └── Lang │ │ │ │ ├── en.json │ │ │ │ └── en │ │ │ │ ├── auth.php │ │ │ │ ├── pagination.php │ │ │ │ ├── passwords.php │ │ │ │ └── validation.php │ │ ├── Services │ │ │ ├── Elastic │ │ │ │ └── AnonymousMigrationFactory.php │ │ │ └── Repositories │ │ │ │ └── ConfirmationTokenRepository.php │ │ ├── Tests │ │ │ ├── Feature │ │ │ │ └── SwaggerDocsTest.php │ │ │ ├── MocksGeoIPRequests.php │ │ │ ├── TestApplicationState.php │ │ │ └── TestCase.php │ │ ├── Traits │ │ │ └── Models │ │ │ │ ├── HasExtendedFunctionality.php │ │ │ │ └── Searchable.php │ │ └── Utils │ │ │ ├── AppUtils.php │ │ │ ├── ClassUtils.php │ │ │ ├── FileUtils.php │ │ │ ├── LangUtils.php │ │ │ ├── MathUtils.php │ │ │ ├── PathUtils.php │ │ │ └── StringUtils.php │ ├── Feedback │ │ ├── .modulite.yaml │ │ ├── Actions │ │ │ └── StoreFeedbackAction.php │ │ ├── Admin │ │ │ ├── Pages │ │ │ │ └── ManageFeedbackSettings.php │ │ │ └── Resources │ │ │ │ ├── FeedbackResource.php │ │ │ │ └── FeedbackResource │ │ │ │ └── Pages │ │ │ │ ├── EditFeedback.php │ │ │ │ ├── ListFeedback.php │ │ │ │ └── ViewFeedback.php │ │ ├── Database │ │ │ ├── Builders │ │ │ │ └── FeedbackBuilder.php │ │ │ ├── Elastic │ │ │ │ └── 2022_08_05_071315_create_feedback_index.php │ │ │ ├── Factories │ │ │ │ └── FeedbackFactory.php │ │ │ ├── Migrations │ │ │ │ └── 2022_01_22_202953_create_feedback_table.php │ │ │ ├── Seeders │ │ │ │ └── FeedbackSeeder.php │ │ │ └── Settings │ │ │ │ └── 2022_01_23_172325_create_feedback_settings.php │ │ ├── Enums │ │ │ └── Translation │ │ │ │ ├── AdminNavigationGroupTranslationKey.php │ │ │ │ ├── FeedbackSettingsTranslationKey.php │ │ │ │ └── FeedbackTranslationKey.php │ │ ├── Http │ │ │ ├── Controllers │ │ │ │ └── Api │ │ │ │ │ ├── FeedbackController.php │ │ │ │ │ └── Virtual │ │ │ │ │ └── FeedbackController.php │ │ │ └── Requests │ │ │ │ └── FeedbackRequest.php │ │ ├── Jobs │ │ │ └── Export │ │ │ │ └── FeedbackExportJob.php │ │ ├── Models │ │ │ ├── Feedback.php │ │ │ └── Settings │ │ │ │ └── FeedbackSettings.php │ │ ├── Policies │ │ │ └── FeedbackPolicy.php │ │ ├── Providers │ │ │ ├── DomainServiceProvider.php │ │ │ └── RouteServiceProvider.php │ │ ├── Resources │ │ │ └── Lang │ │ │ │ └── en │ │ │ │ ├── admin.php │ │ │ │ └── enums.php │ │ └── Tests │ │ │ └── Feature │ │ │ ├── Admin │ │ │ ├── Export │ │ │ │ └── FeedbackAdminExportTest.php │ │ │ └── Resources │ │ │ │ └── FeedbackResourceTest.php │ │ │ └── Api │ │ │ └── FeedbackControllerTest.php │ ├── News │ │ ├── .modulite.yaml │ │ ├── Admin │ │ │ └── Resources │ │ │ │ ├── ArticleResource.php │ │ │ │ └── ArticleResource │ │ │ │ └── Pages │ │ │ │ ├── CreateArticle.php │ │ │ │ ├── EditArticle.php │ │ │ │ ├── ListNews.php │ │ │ │ └── ViewArticle.php │ │ ├── Database │ │ │ ├── Builders │ │ │ │ └── ArticleBuilder.php │ │ │ ├── Elastic │ │ │ │ └── 2022_08_05_062341_create_news_index.php │ │ │ ├── Factories │ │ │ │ └── ArticleFactory.php │ │ │ ├── Migrations │ │ │ │ └── 2022_07_28_142743_create_news_table.php │ │ │ └── Seeders │ │ │ │ └── ArticleSeeder.php │ │ ├── Enums │ │ │ ├── Media │ │ │ │ └── ArticleMediaCollectionKey.php │ │ │ ├── Query │ │ │ │ ├── Filter │ │ │ │ │ └── ArticleAllowedFilter.php │ │ │ │ └── Sort │ │ │ │ │ └── ArticleAllowedSort.php │ │ │ └── Translation │ │ │ │ ├── AdminNavigationGroupTranslationKey.php │ │ │ │ └── ArticleTranslationKey.php │ │ ├── Http │ │ │ ├── Controllers │ │ │ │ └── Api │ │ │ │ │ ├── ArticleController.php │ │ │ │ │ └── Virtual │ │ │ │ │ └── ArticleController.php │ │ │ ├── Requests │ │ │ │ └── ArticleIndexRequest.php │ │ │ └── Resources │ │ │ │ └── Article │ │ │ │ ├── HeavyArticleResource.php │ │ │ │ └── LightArticleResource.php │ │ ├── Jobs │ │ │ └── Export │ │ │ │ └── NewsExportJob.php │ │ ├── Models │ │ │ ├── Article.php │ │ │ └── Virtual │ │ │ │ └── Article │ │ │ │ ├── HeavyArticle.php │ │ │ │ └── LightArticle.php │ │ ├── Providers │ │ │ ├── DomainServiceProvider.php │ │ │ └── RouteServiceProvider.php │ │ ├── Resources │ │ │ └── Lang │ │ │ │ └── en │ │ │ │ ├── admin.php │ │ │ │ └── enums.php │ │ ├── Services │ │ │ └── Query │ │ │ │ ├── Filter │ │ │ │ ├── ArticleFilterBuilder.php │ │ │ │ ├── ArticleFilterBuilderRepository.php │ │ │ │ └── ArticleFilterService.php │ │ │ │ └── Sort │ │ │ │ └── ArticleSortService.php │ │ └── Tests │ │ │ └── Feature │ │ │ ├── Admin │ │ │ ├── Export │ │ │ │ └── NewsAdminExportTest.php │ │ │ └── Resources │ │ │ │ └── ArticleResourceTest.php │ │ │ └── Api │ │ │ └── ArticleControllerTest.php │ └── Users │ │ ├── .modulite.yaml │ │ ├── Actions │ │ ├── LoginUserAction.php │ │ ├── LogoutUserAction.php │ │ ├── RegisterUserAction.php │ │ └── VerifyEmailUserAction.php │ │ ├── Admin │ │ ├── Components │ │ │ └── Widgets │ │ │ │ └── CustomersChartWidget.php │ │ └── Resources │ │ │ ├── UserResource.php │ │ │ └── UserResource │ │ │ └── Pages │ │ │ ├── EditUser.php │ │ │ ├── ListUsers.php │ │ │ └── ViewUser.php │ │ ├── Database │ │ ├── Builders │ │ │ └── UserBuilder.php │ │ ├── Elastic │ │ │ └── 2022_08_05_071120_create_users_index.php │ │ ├── Factories │ │ │ └── UserFactory.php │ │ ├── Migrations │ │ │ ├── 2014_10_12_000000_create_users_table.php │ │ │ ├── 2014_10_12_100000_create_password_resets_table.php │ │ │ └── 2019_12_14_000001_create_personal_access_tokens_table.php │ │ └── Seeders │ │ │ └── UserSeeder.php │ │ ├── Enums │ │ └── Translation │ │ │ ├── UserDatasetTranslationKey.php │ │ │ └── UserTranslationKey.php │ │ ├── Events │ │ ├── EmailVerificationFailed.php │ │ ├── EmailVerificationSucceeded.php │ │ ├── Login.php │ │ ├── Logout.php │ │ └── Registered.php │ │ ├── Http │ │ ├── Controllers │ │ │ └── Api │ │ │ │ └── Auth │ │ │ │ ├── EmailVerificationController.php │ │ │ │ ├── LoginController.php │ │ │ │ ├── LogoutController.php │ │ │ │ ├── RegisterController.php │ │ │ │ └── Virtual │ │ │ │ ├── EmailVerificationController.php │ │ │ │ ├── LoginController.php │ │ │ │ ├── LogoutController.php │ │ │ │ └── RegisterController.php │ │ ├── Requests │ │ │ ├── EmailVerificationRequest.php │ │ │ ├── LoginRequest.php │ │ │ └── RegisterRequest.php │ │ └── Resources │ │ │ └── UserResource.php │ │ ├── Jobs │ │ └── Export │ │ │ └── UsersExportJob.php │ │ ├── Listeners │ │ └── SendEmailVerificationNotification.php │ │ ├── Models │ │ ├── User.php │ │ └── Virtual │ │ │ └── User.php │ │ ├── Notifications │ │ └── EmailVerificationNotification.php │ │ ├── Observers │ │ └── UserObserver.php │ │ ├── Providers │ │ ├── DomainServiceProvider.php │ │ ├── EventServiceProvider.php │ │ └── RouteServiceProvider.php │ │ ├── Resources │ │ └── Lang │ │ │ └── en │ │ │ ├── admin.php │ │ │ └── enums.php │ │ └── Tests │ │ └── Feature │ │ ├── Admin │ │ ├── Export │ │ │ └── UsersAdminExportTest.php │ │ └── Resources │ │ │ └── UserResourceTest.php │ │ └── Api │ │ ├── EmailVerificationControllerTest.php │ │ ├── LoginControllerTest.php │ │ ├── LogoutControllerTest.php │ │ └── RegisterControllerTest.php ├── Infrastructure │ ├── .modulite.yaml │ ├── Abstracts │ │ ├── Events │ │ │ └── Event.php │ │ ├── Http │ │ │ └── FormRequest.php │ │ ├── Notifications │ │ │ ├── EmailNotification.php │ │ │ └── Notification.php │ │ └── Providers │ │ │ ├── RouteServiceProvider.php │ │ │ └── ServiceProvider.php │ └── Database │ │ ├── Builder.php │ │ └── Connections │ │ └── PostgresConnection.php └── Interfaces │ ├── .modulite.yaml │ └── Http │ └── Controllers │ ├── Controller.php │ └── ResponseTrait.php ├── artisan ├── bootstrap ├── app.php └── cache │ └── .gitignore ├── composer.json ├── composer.lock ├── config ├── app.php ├── auth.php ├── broadcasting.php ├── cache.php ├── captcha.php ├── clockwork.php ├── cors.php ├── database.php ├── elastic.client.php ├── elastic.migrations.php ├── elastic.scout_driver.php ├── excel.php ├── filament.php ├── filesystems.php ├── geoip.php ├── hashing.php ├── horizon.php ├── ide-helper.php ├── insights.php ├── l5-swagger.php ├── livewire.php ├── logging.php ├── mail.php ├── media-library.php ├── octane.php ├── postgis.php ├── prequel.php ├── purify.php ├── query-builder.php ├── queue.php ├── sanctum.php ├── scout.php ├── sentry.php ├── services.php ├── session.php ├── settings.php ├── telescope.php ├── totem.php └── view.php ├── crontab ├── deptrac.yaml ├── docker-compose.ci.yml ├── docker-compose.override.yml ├── docker-compose.test.yml ├── docker-compose.yml ├── docker └── php │ ├── Dockerfile │ ├── php.ini │ ├── start-container │ ├── supervisord.conf │ └── supervisord.empty.conf ├── infection.json5 ├── package-lock.json ├── package.json ├── phpcs.xml ├── phpstan.neon ├── phpunit.xml ├── pint.json ├── public ├── .htaccess ├── favicon.ico ├── index.php ├── robots.txt ├── vendor │ ├── catalog │ │ ├── jquery.nestable.min.css │ │ └── jquery.nestable.min.js │ ├── horizon │ │ ├── app-dark.css │ │ ├── app.css │ │ ├── app.js │ │ ├── img │ │ │ ├── favicon.png │ │ │ ├── horizon.svg │ │ │ └── sprite.svg │ │ └── mix-manifest.json │ ├── livewire │ │ ├── livewire.js │ │ ├── livewire.js.map │ │ └── manifest.json │ ├── prequel │ │ ├── app.css │ │ ├── app.js │ │ ├── favicon.png │ │ ├── loader.gif │ │ └── prequel.png │ ├── telescope │ │ ├── app-dark.css │ │ ├── app.css │ │ ├── app.js │ │ ├── favicon.ico │ │ └── mix-manifest.json │ └── totem │ │ ├── css │ │ ├── app.css │ │ └── app.css.map │ │ ├── img │ │ ├── button-text-arrow.svg │ │ ├── divider-icon.svg │ │ ├── form-select.svg │ │ ├── funnel.svg │ │ ├── icons │ │ │ ├── clock.svg │ │ │ ├── close.svg │ │ │ ├── cog.svg │ │ │ ├── mask.svg │ │ │ ├── more.svg │ │ │ ├── play-circle.svg │ │ │ ├── play.svg │ │ │ ├── search.svg │ │ │ ├── spinner.svg │ │ │ └── test.svg │ │ ├── list-bullet.svg │ │ ├── mask.svg │ │ ├── totem.png │ │ └── totem.svg │ │ └── js │ │ └── app.js └── web.config ├── rector.php ├── release.sh ├── storage ├── app │ ├── .gitignore │ ├── public │ │ └── .gitignore │ └── purify │ │ └── .gitignore ├── clockwork │ └── .gitignore ├── framework │ ├── .gitignore │ ├── cache │ │ ├── .gitignore │ │ └── data │ │ │ └── .gitignore │ ├── sessions │ │ └── .gitignore │ ├── testing │ │ └── .gitignore │ └── views │ │ └── .gitignore ├── infection │ └── .gitignore ├── logs │ └── .gitignore ├── phpinsights │ └── .gitignore ├── phpstan │ └── .gitignore ├── pint │ └── .gitignore └── rector │ └── .gitignore └── tools └── sail ├── composer.json └── composer.lock /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | end_of_line = lf 6 | insert_final_newline = true 7 | indent_style = space 8 | indent_size = 4 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | trim_trailing_whitespace = false 13 | 14 | [*.{yml,yaml}] 15 | indent_size = 4 16 | 17 | [docker-compose.yml] 18 | indent_size = 4 19 | -------------------------------------------------------------------------------- /.env.infrastructure.example: -------------------------------------------------------------------------------- 1 | # Infrastucture 2 | SAIL_COMPOSER_IMAGE=laravelsail/php82-composer:latest 3 | POSTGRES_VERSION=15-3.3 4 | REDIS_VERSION=7.0 5 | ELK_STACK_VERSION=8.8.1 6 | RABBITMQ_VERSION=3.12 7 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | *.css linguist-vendored 3 | *.scss linguist-vendored 4 | *.js linguist-vendored 5 | CHANGELOG.md export-ignore 6 | /tools/**/composer.lock binary 7 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules 2 | /public/hot 3 | /public/storage 4 | /storage/*.key 5 | /storage/api-docs 6 | /storage/phpcs 7 | /vendor 8 | /.idea 9 | .env 10 | .env.backup 11 | .phpunit.result.cache 12 | docker-compose.*.stack.yml 13 | Homestead.json 14 | Homestead.yaml 15 | npm-debug.log 16 | yarn-error.log 17 | .phpstorm.meta.php 18 | _ide_helper.php 19 | _ide_helper_models.php 20 | /tools/**/vendor/ 21 | infection.html 22 | infection.log 23 | .deptrac.cache 24 | *.cache 25 | -------------------------------------------------------------------------------- /.styleci.yml: -------------------------------------------------------------------------------- 1 | php: 2 | preset: laravel 3 | version: 8 4 | disabled: 5 | - no_unused_imports 6 | finder: 7 | not-name: 8 | - index.php 9 | - server.php 10 | js: 11 | finder: 12 | not-name: 13 | - webpack.mix.js 14 | css: true 15 | -------------------------------------------------------------------------------- /Procfile: -------------------------------------------------------------------------------- 1 | web: php artisan octane:start --server=swoole --host=0.0.0.0 --port=$PORT --watch 2 | release: ./release.sh 3 | 4 | horizon: php artisan horizon 5 | 6 | schedule: php artisan schedule:work 7 | -------------------------------------------------------------------------------- /app/Application/Classes/ApplicationState.php: -------------------------------------------------------------------------------- 1 | command(RefreshApplicationCommand::class)->cron('0 0 * * *')->runInBackground()->environments(['staging']); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /app/Application/Http/Middleware/EncryptCookies.php: -------------------------------------------------------------------------------- 1 | 13 | * 14 | * @phpcsSuppress SlevomatCodingStandard.TypeHints.PropertyTypeHint 15 | */ 16 | protected $except = [ 17 | // 18 | ]; 19 | } 20 | -------------------------------------------------------------------------------- /app/Application/Http/Middleware/PreventRequestsDuringMaintenance.php: -------------------------------------------------------------------------------- 1 | 13 | * 14 | * @phpcsSuppress SlevomatCodingStandard.TypeHints.PropertyTypeHint 15 | */ 16 | protected $except = [ 17 | // 18 | ]; 19 | } 20 | -------------------------------------------------------------------------------- /app/Application/Http/Middleware/RedirectIfAuthenticated.php: -------------------------------------------------------------------------------- 1 | check()) { 18 | return redirect(RouteServiceProvider::HOME); 19 | } 20 | } 21 | 22 | return $next($request); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /app/Application/Http/Middleware/RedirectUnauthenticated.php: -------------------------------------------------------------------------------- 1 | expectsJson() ? null : route('login'); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /app/Application/Http/Middleware/TrimStrings.php: -------------------------------------------------------------------------------- 1 | 13 | * 14 | * @phpcsSuppress SlevomatCodingStandard.TypeHints.PropertyTypeHint 15 | */ 16 | protected $except = [ 17 | 'current_password', 18 | 'password', 19 | 'password_confirmation', 20 | ]; 21 | } 22 | -------------------------------------------------------------------------------- /app/Application/Http/Middleware/TrustHosts.php: -------------------------------------------------------------------------------- 1 | allSubdomainsOfApplicationUrl(), 16 | ]; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /app/Application/Http/Middleware/VerifyCsrfToken.php: -------------------------------------------------------------------------------- 1 | 13 | * 14 | * @phpcsSuppress SlevomatCodingStandard.TypeHints.PropertyTypeHint 15 | */ 16 | protected $except = [ 17 | // 18 | ]; 19 | } 20 | -------------------------------------------------------------------------------- /app/Application/Providers/DatabaseServiceProvider.php: -------------------------------------------------------------------------------- 1 | new PostgresConnection($pdo, $database, $prefix, $config)); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /app/Application/Providers/FakerServiceProvider.php: -------------------------------------------------------------------------------- 1 | app->extend(Generator::class, function (Generator $faker): Generator { 15 | $faker->addProvider(new Commerce($faker)); 16 | $faker->addProvider(new Fakenews($faker)); 17 | 18 | return $faker; 19 | }); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /app/Application/Providers/HorizonServiceProvider.php: -------------------------------------------------------------------------------- 1 | Auth::guard('admin')->check()); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /app/Application/Providers/TotemServiceProvider.php: -------------------------------------------------------------------------------- 1 | Auth::guard('admin')->check()); 17 | } 18 | 19 | public function preventLazyLoading(): void 20 | { 21 | TotemModel::preventLazyLoading(false); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /app/Application/Tests/CreatesApplication.php: -------------------------------------------------------------------------------- 1 | make(Kernel::class)->bootstrap(); 21 | 22 | return $app; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /app/Components/.modulite.yaml: -------------------------------------------------------------------------------- 1 | name: "@components" 2 | description: "Components" 3 | namespace: "App\\Components\\" 4 | 5 | # "Public API" of the modulite: classes, functions, constants, etc. 6 | # Symbols not listed here will be internal. 7 | export: 8 | - "@components/addressable" 9 | - "@components/attributable" 10 | - "@components/login-historyable" 11 | - "@components/mediable" 12 | - "@components/purchasable" 13 | - "@components/queryable" 14 | 15 | require: 16 | -------------------------------------------------------------------------------- /app/Components/Addressable/.modulite.yaml: -------------------------------------------------------------------------------- 1 | name: "@components/addressable" 2 | description: "Addresses-related Stuff" 3 | namespace: "App\\Components\\Addressable\\" 4 | 5 | # "Public API" of the modulite: classes, functions, constants, etc. 6 | # Symbols not listed here will be internal. 7 | export: 8 | - "Admin\\RelationManagers\\AddressesRelationManager" 9 | - "Models\\Address" 10 | 11 | # Dependencies: other modulites, global classes, defines, etc. 12 | require: 13 | - "@domains/admin" 14 | - "@domains/common" 15 | - "@infrastructure" 16 | - "#filament/filament" 17 | - "#filament/forms" 18 | - "#filament/tables" 19 | - "#illuminate/database" 20 | - "#illuminate/support" 21 | - "#squirephp/countries" 22 | - "#squirephp/regions" 23 | -------------------------------------------------------------------------------- /app/Components/Addressable/Database/Builders/AddressBuilder.php: -------------------------------------------------------------------------------- 1 | 17 | * */ 18 | final class AddressBuilder extends Builder 19 | { 20 | } 21 | -------------------------------------------------------------------------------- /app/Components/Addressable/Database/Factories/AddressFactory.php: -------------------------------------------------------------------------------- 1 | inRandomOrder()->first(['id']); 16 | $region = $country?->regions->first(); 17 | 18 | return self::addTimestamps([ 19 | 'zip' => $this->faker->postcode(), 20 | 'country' => $country?->id, 21 | 'region' => $region?->id, 22 | 'city' => $this->faker->city(), 23 | 'street' => $this->faker->streetAddress(), 24 | ]); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/Components/Addressable/Enums/Translation/AddressesTranslationKey.php: -------------------------------------------------------------------------------- 1 | [ 10 | AdminRelationPropertyTranslationKey::TITLE->name => 'Addresses', 11 | AdminRelationPropertyTranslationKey::LABEL->name => 'address', 12 | AdminRelationPropertyTranslationKey::PLURAL_LABEL->name => 'addresses', 13 | ], 14 | ]; 15 | -------------------------------------------------------------------------------- /app/Components/Addressable/Resources/Lang/en/enums.php: -------------------------------------------------------------------------------- 1 | [ 9 | AddressesTranslationKey::ZIP->name => 'Zip / Postal Code', 10 | AddressesTranslationKey::REGION->name => 'Region', 11 | AddressesTranslationKey::COUNTRY->name => 'Country', 12 | AddressesTranslationKey::CITY->name => 'City', 13 | AddressesTranslationKey::STREET->name => 'Street Address', 14 | ], 15 | ]; 16 | -------------------------------------------------------------------------------- /app/Components/Attributable/Admin/Resources/AttributeResource/Pages/CreateAttribute.php: -------------------------------------------------------------------------------- 1 | 17 | * */ 18 | final class AttributeBuilder extends Builder 19 | { 20 | } 21 | -------------------------------------------------------------------------------- /app/Components/Attributable/Database/Builders/AttributeValueBuilder.php: -------------------------------------------------------------------------------- 1 | 17 | * */ 18 | final class AttributeValueBuilder extends Builder 19 | { 20 | } 21 | -------------------------------------------------------------------------------- /app/Components/Attributable/Database/Factories/AttributeFactory.php: -------------------------------------------------------------------------------- 1 | $this->faker->words(3, true), 17 | 'values_type' => $this->faker->randomElement(AttributeValuesType::cases()), 18 | ]); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /app/Components/Attributable/Enums/AttributeValuesType.php: -------------------------------------------------------------------------------- 1 | ResponseValueType::INTEGER, 18 | self::FLOAT => ResponseValueType::FLOAT, 19 | self::STRING => ResponseValueType::STRING, 20 | self::BOOLEAN => ResponseValueType::BOOLEAN, 21 | }; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /app/Components/Attributable/Enums/Translation/AttributeTranslationKey.php: -------------------------------------------------------------------------------- 1 | 'string', 'title' => 'string', 'values_type' => 'string'])] 12 | public function toArray($request): array 13 | { 14 | /** @var Attribute $attribute */ 15 | $attribute = $this->resource; 16 | 17 | return [ 18 | 'slug' => $attribute->slug, 19 | 'title' => $attribute->title, 20 | 'values_type' => $attribute->values_type->responseValueType()->name, 21 | ]; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /app/Components/Attributable/Http/Resources/AttributeValueResource.php: -------------------------------------------------------------------------------- 1 | 'string|int|bool|float', 'attribute' => AttributeResource::class])] 12 | public function toArray($request): array 13 | { 14 | /** @var AttributeValue $value */ 15 | $value = $this->resource; 16 | 17 | return [ 18 | 'value' => $value->value, 19 | 'attribute' => AttributeResource::make($value->attribute), 20 | ]; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /app/Components/Attributable/Models/Virtual/Attribute.php: -------------------------------------------------------------------------------- 1 | 18 | * */ 19 | final class LoginHistoryBuilder extends Builder 20 | { 21 | } 22 | -------------------------------------------------------------------------------- /app/Components/LoginHistoryable/Enums/Translation/LoginHistoryTranslationKey.php: -------------------------------------------------------------------------------- 1 | [ 10 | AdminRelationPropertyTranslationKey::TITLE->name => 'Login History', 11 | AdminRelationPropertyTranslationKey::LABEL->name => 'login history', 12 | AdminRelationPropertyTranslationKey::PLURAL_LABEL->name => 'login history', 13 | ], 14 | ]; 15 | -------------------------------------------------------------------------------- /app/Components/Mediable/.modulite.yaml: -------------------------------------------------------------------------------- 1 | name: "@components/mediable" 2 | description: "Media-related Stuff" 3 | namespace: "App\\Components\\Mediable\\" 4 | 5 | # "Public API" of the modulite: classes, functions, constants, etc. 6 | # Symbols not listed here will be internal. 7 | export: 8 | - "Admin\\Components\\Fields\\MediaLibraryFileUpload" 9 | - "Http\\Resources\\MediaResource" 10 | - "Models\\Media" 11 | - "Models\\Virtual\\Media" 12 | 13 | # Dependencies: other modulites, global classes, defines, etc. 14 | require: 15 | - "@domains/common" 16 | - "@infrastructure" 17 | - "#filament/spatie-laravel-media-library-plugin" 18 | - "#illuminate/database" 19 | - "#illuminate/http" 20 | - "#illuminate/support" 21 | - "#laravel/framework" 22 | - "#nesbot/carbon" 23 | - "#spatie/laravel-medialibrary" 24 | -------------------------------------------------------------------------------- /app/Components/Mediable/Admin/Components/Fields/MediaLibraryFileUpload.php: -------------------------------------------------------------------------------- 1 | disk(config('filesystems.default')) 15 | ->visibility('private'); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /app/Components/Mediable/Database/Builders/MediaBuilder.php: -------------------------------------------------------------------------------- 1 | 17 | * */ 18 | final class MediaBuilder extends Builder 19 | { 20 | } 21 | -------------------------------------------------------------------------------- /app/Components/Mediable/Enums/MediaType.php: -------------------------------------------------------------------------------- 1 | 'int', 'height' => 'int', 'url' => 'string'])] 13 | public function toArray($request): array 14 | { 15 | /** @var ResponsiveImage $image */ 16 | $image = $this->resource; 17 | 18 | return [ 19 | 'width' => $image->width(), 20 | 'height' => $image->height(), 21 | 'url' => $image->temporaryUrl(Carbon::now()->addMinutes(10)), 22 | ]; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /app/Components/Mediable/Providers/ComponentServiceProvider.php: -------------------------------------------------------------------------------- 1 | app->bind(BaseFileAdder::class, FileAdder::class); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /app/Components/Mediable/Services/Media/FileAdder.php: -------------------------------------------------------------------------------- 1 | withResponsiveImages(); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /app/Components/Mediable/Services/Media/UrlGenerator.php: -------------------------------------------------------------------------------- 1 | getDisk()->temporaryUrl($path, $expiration, $options); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /app/Components/Purchasable/Abstracts/Purchasable.php: -------------------------------------------------------------------------------- 1 | 17 | * */ 18 | final class PriceBuilder extends Builder 19 | { 20 | } 21 | -------------------------------------------------------------------------------- /app/Components/Purchasable/Database/Factories/PriceFactory.php: -------------------------------------------------------------------------------- 1 | fn (array $attributes): int => $this->faker->numberBetween(100, 10000), 16 | 'price_discounted' => fn (array $attributes): ?int => $this->faker->boolean(70) ? null : $this->faker->numberBetween((int) ($attributes['price'] / 2), $attributes['price']), 17 | ]); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /app/Components/Purchasable/Enums/Translation/PriceTranslationKey.php: -------------------------------------------------------------------------------- 1 | 'string', 'abbreviation' => 'string', 'symbol' => 'string'])] 12 | public function toArray($request): array 13 | { 14 | /** @var Currency $currency */ 15 | $currency = $this->resource; 16 | 17 | return [ 18 | 'name' => $currency->getName(), 19 | 'abbreviation' => $currency->getCurrency(), 20 | 'symbol' => $currency->getSymbol(), 21 | ]; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /app/Components/Purchasable/Http/Resources/MoneyResource.php: -------------------------------------------------------------------------------- 1 | 'float', 'amount' => 'float|int', 'render' => 'string'])] 12 | public function toArray($request): array 13 | { 14 | /** @var Money $money */ 15 | $money = $this->resource; 16 | 17 | return [ 18 | 'value' => $money->getValue(), 19 | 'amount' => $money->getAmount(), 20 | 'render' => $money->render(), 21 | ]; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /app/Components/Purchasable/Models/Virtual/Currency.php: -------------------------------------------------------------------------------- 1 | [ 10 | AdminRelationPropertyTranslationKey::TITLE->name => 'Prices', 11 | AdminRelationPropertyTranslationKey::LABEL->name => 'price', 12 | AdminRelationPropertyTranslationKey::PLURAL_LABEL->name => 'prices', 13 | ], 14 | ]; 15 | -------------------------------------------------------------------------------- /app/Components/Purchasable/Resources/Lang/en/enums.php: -------------------------------------------------------------------------------- 1 | [ 9 | PriceTranslationKey::CURRENCY->name => 'Currency', 10 | PriceTranslationKey::PRICE->name => 'Price', 11 | PriceTranslationKey::PRICE_DISCOUNTED->name => 'Price Discounted', 12 | ], 13 | ]; 14 | -------------------------------------------------------------------------------- /app/Components/Queryable/Abstracts/Filter/IAllowedFilterEnum.php: -------------------------------------------------------------------------------- 1 | $this->query, 15 | 'title' => $this->title, 16 | ]; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /app/Components/Queryable/Abstracts/Sort/IAllowedSortEnum.php: -------------------------------------------------------------------------------- 1 | 'string', 'title' => 'string', 'values_type' => 'string'])] 15 | public function toArray(): array 16 | { 17 | return [ 18 | 'query' => $this->query, 19 | 'title' => $this->title, 20 | 'values_type' => $this->valuesType->name, 21 | ]; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /app/Components/Queryable/Classes/Filter/Virtual/Filter.php: -------------------------------------------------------------------------------- 1 | name, $translation); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /app/Components/Queryable/DTOs/Filter/FilterQuery.php: -------------------------------------------------------------------------------- 1 | $allowedFilters 12 | * @param Collection $appliedFilters 13 | */ 14 | public function __construct(public Collection $allowedFilters, public Collection $appliedFilters) 15 | { 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /app/Components/Queryable/DTOs/Sort/SortQuery.php: -------------------------------------------------------------------------------- 1 | $allowedSorts 12 | */ 13 | public function __construct(public Collection $allowedSorts, public Sort $appliedSort) 14 | { 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /app/Components/Queryable/Enums/QueryFilterType.php: -------------------------------------------------------------------------------- 1 | 'array', 'allowed' => 'array'])] 13 | public function toArray($request): array 14 | { 15 | /** @var SortQuery $sortQuery */ 16 | $sortQuery = $this->resource; 17 | 18 | return [ 19 | 'applied' => $sortQuery->appliedSort->toArray(), 20 | 'allowed' => $sortQuery->allowedSorts->map(fn (Sort $sort): array => $sort->toArray())->toArray(), 21 | ]; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /app/Components/Queryable/Services/Sort/SortApplicator.php: -------------------------------------------------------------------------------- 1 | service->allowed()->filter(static fn (Sort $sort): bool => ($sort->query === $sortQuery))->first() : null; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /app/Components/Queryable/Traits/Sort/AllowedSortEnum.php: -------------------------------------------------------------------------------- 1 | name)->replaceLast(static::getSortDirectionPostfix(), '')->lower()->value(); 10 | } 11 | 12 | public function isDescending(): bool 13 | { 14 | return str_ends_with($this->name, static::getSortDirectionPostfix()); 15 | } 16 | 17 | protected static function getSortDirectionPostfix(): string 18 | { 19 | return '_DESC'; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /app/Domains/.modulite.yaml: -------------------------------------------------------------------------------- 1 | name: "@domains" 2 | description: "Domains" 3 | namespace: "App\\Domains\\" 4 | 5 | # "Public API" of the modulite: classes, functions, constants, etc. 6 | # Symbols not listed here will be internal. 7 | export: 8 | - "@domains/admin" 9 | - "@domains/cart" 10 | - "@domains/catalog" 11 | - "@domains/common" 12 | - "@domains/feedback" 13 | - "@domains/news" 14 | - "@domains/users" 15 | 16 | require: 17 | -------------------------------------------------------------------------------- /app/Domains/Admin/Admin/Abstracts/Pages/CreateRecord.php: -------------------------------------------------------------------------------- 1 | getBaseResourceForm($columns, $isDisabled)); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /app/Domains/Admin/Admin/Abstracts/Pages/EditRecord.php: -------------------------------------------------------------------------------- 1 | getBaseResourceForm($columns, $isDisabled)); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /app/Domains/Admin/Admin/Abstracts/Pages/ExportableResourcePage.php: -------------------------------------------------------------------------------- 1 | getBaseResourceForm($columns, $isDisabled)); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /app/Domains/Admin/Admin/Components/Actions/Create/HasCreateAction.php: -------------------------------------------------------------------------------- 1 | icon('heroicon-o-plus') 13 | ->color('primary'); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /app/Domains/Admin/Admin/Components/Actions/Create/Pages/CreateAction.php: -------------------------------------------------------------------------------- 1 | visible(fn (Page $livewire): bool => $livewire::getResource()::canCreate()); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /app/Domains/Admin/Admin/Components/Actions/Create/Tables/CreateAction.php: -------------------------------------------------------------------------------- 1 | visible(fn (Page|RelationManager $livewire): bool => $livewire instanceof Page ? $livewire::getResource()::canCreate() : $livewire->canCreate()); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /app/Domains/Admin/Admin/Components/Actions/Delete/HasDeleteAction.php: -------------------------------------------------------------------------------- 1 | requiresConfirmation() 13 | ->icon('heroicon-o-trash') 14 | ->color('danger'); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /app/Domains/Admin/Admin/Components/Actions/Delete/Pages/DeleteAction.php: -------------------------------------------------------------------------------- 1 | visible(fn (Page $livewire): bool => $livewire instanceof EditRecord && $livewire::getResource()::canDelete($livewire->getRecord())); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /app/Domains/Admin/Admin/Components/Actions/DeleteBulkAction.php: -------------------------------------------------------------------------------- 1 | requiresConfirmation()->icon('heroicon-o-trash'); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /app/Domains/Admin/Admin/Components/Actions/Edit/HasEditAction.php: -------------------------------------------------------------------------------- 1 | icon('heroicon-o-pencil') 13 | ->color('primary'); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /app/Domains/Admin/Admin/Components/Actions/Edit/Pages/EditAction.php: -------------------------------------------------------------------------------- 1 | visible(fn (Page $livewire): bool => $livewire instanceof ViewRecord && $livewire::getResource()::canEdit($livewire->getRecord())); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /app/Domains/Admin/Admin/Components/Actions/Edit/Tables/EditAction.php: -------------------------------------------------------------------------------- 1 | visible(fn (Model $record, Page|RelationManager $livewire): bool => $livewire instanceof Page ? $livewire::getResource()::canEdit($record) : $livewire->canEdit($record)); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /app/Domains/Admin/Admin/Components/Actions/Export/Pages/ExportAction.php: -------------------------------------------------------------------------------- 1 | requiresConfirmation()->icon('heroicon-o-pencil'); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /app/Domains/Admin/Admin/Components/Actions/View/HasViewAction.php: -------------------------------------------------------------------------------- 1 | icon('heroicon-o-eye') 13 | ->color('success'); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /app/Domains/Admin/Admin/Components/Actions/View/Pages/ViewAction.php: -------------------------------------------------------------------------------- 1 | visible(fn (Page $livewire): bool => $livewire instanceof EditRecord && $livewire::getResource()::canView($livewire->getRecord()))->color('secondary'); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /app/Domains/Admin/Admin/Components/Actions/View/Tables/ViewAction.php: -------------------------------------------------------------------------------- 1 | visible(fn (Model $record, Page|RelationManager $livewire): bool => $livewire instanceof Page ? $livewire::getResource()::canView($record) : $livewire::canViewForRecord($livewire->getOwnerRecord())); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /app/Domains/Admin/Admin/Components/Forms/RichEditor.php: -------------------------------------------------------------------------------- 1 | disableToolbarButtons([ 13 | 'attachFiles', 14 | ]); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /app/Domains/Admin/Admin/Resources/AdminResource/Pages/CreateAdmin.php: -------------------------------------------------------------------------------- 1 | ClockworkLink::route('/'), 18 | ]; 19 | } 20 | 21 | protected static function shouldRegisterNavigation(): bool 22 | { 23 | return config('clockwork.enable') === true; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /app/Domains/Admin/Admin/Resources/Development/ElasticvueLinkResource.php: -------------------------------------------------------------------------------- 1 | ElasticvueLink::route('/'), 18 | ]; 19 | } 20 | 21 | protected static function shouldRegisterNavigation(): bool 22 | { 23 | return app()->isLocal(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /app/Domains/Admin/Admin/Resources/Development/HorizonLinkResource.php: -------------------------------------------------------------------------------- 1 | HorizonLink::route('/'), 18 | ]; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /app/Domains/Admin/Admin/Resources/Development/KibanaLinkResource.php: -------------------------------------------------------------------------------- 1 | KibanaLink::route('/'), 18 | ]; 19 | } 20 | 21 | protected static function shouldRegisterNavigation(): bool 22 | { 23 | return app()->isLocal(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /app/Domains/Admin/Admin/Resources/Development/Pages/ClockworkLink.php: -------------------------------------------------------------------------------- 1 | action([ClockworkController::class, 'webIndex']); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /app/Domains/Admin/Admin/Resources/Development/Pages/ElasticvueLink.php: -------------------------------------------------------------------------------- 1 | to("http://0.0.0.0:{$port}"); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /app/Domains/Admin/Admin/Resources/Development/Pages/HorizonLink.php: -------------------------------------------------------------------------------- 1 | route('horizon.index'); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /app/Domains/Admin/Admin/Resources/Development/Pages/KibanaLink.php: -------------------------------------------------------------------------------- 1 | to("http://0.0.0.0:{$port}"); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /app/Domains/Admin/Admin/Resources/Development/Pages/PhpCacheAdminLink.php: -------------------------------------------------------------------------------- 1 | to("http://0.0.0.0:{$port}"); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /app/Domains/Admin/Admin/Resources/Development/Pages/PrequelLink.php: -------------------------------------------------------------------------------- 1 | route('prequel.index'); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /app/Domains/Admin/Admin/Resources/Development/Pages/RabbitMQLink.php: -------------------------------------------------------------------------------- 1 | to("http://0.0.0.0:{$port}"); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /app/Domains/Admin/Admin/Resources/Development/Pages/SwaggerLink.php: -------------------------------------------------------------------------------- 1 | route('l5-swagger.default.api'); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /app/Domains/Admin/Admin/Resources/Development/Pages/TelescopeLink.php: -------------------------------------------------------------------------------- 1 | route('telescope'); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /app/Domains/Admin/Admin/Resources/Development/Pages/TotemLink.php: -------------------------------------------------------------------------------- 1 | route('totem.dashboard'); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /app/Domains/Admin/Admin/Resources/Development/PhpCacheAdminLinkResource.php: -------------------------------------------------------------------------------- 1 | PhpCacheAdminLink::route('/'), 18 | ]; 19 | } 20 | 21 | protected static function shouldRegisterNavigation(): bool 22 | { 23 | return app()->isLocal(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /app/Domains/Admin/Admin/Resources/Development/PrequelLinkResource.php: -------------------------------------------------------------------------------- 1 | PrequelLink::route('/'), 18 | ]; 19 | } 20 | 21 | protected static function shouldRegisterNavigation(): bool 22 | { 23 | if (app()->isProduction()) { 24 | return false; 25 | } 26 | 27 | return config('prequel.enabled') === true; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /app/Domains/Admin/Admin/Resources/Development/RabbitMQLinkResource.php: -------------------------------------------------------------------------------- 1 | RabbitMQLink::route('/'), 18 | ]; 19 | } 20 | 21 | protected static function shouldRegisterNavigation(): bool 22 | { 23 | return app()->isLocal(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /app/Domains/Admin/Admin/Resources/Development/SwaggerLinkResource.php: -------------------------------------------------------------------------------- 1 | SwaggerLink::route('/'), 18 | ]; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /app/Domains/Admin/Admin/Resources/Development/TelescopeLinkResource.php: -------------------------------------------------------------------------------- 1 | TelescopeLink::route('/'), 18 | ]; 19 | } 20 | 21 | protected static function shouldRegisterNavigation(): bool 22 | { 23 | return config('telescope.enabled') === true; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /app/Domains/Admin/Admin/Resources/Development/TotemLinkResource.php: -------------------------------------------------------------------------------- 1 | TotemLink::route('/'), 18 | ]; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /app/Domains/Admin/Admin/Traits/AppliesSearchToTableQuery.php: -------------------------------------------------------------------------------- 1 | getModel(); 15 | $traits = class_uses($model); 16 | $searchQuery = $this->getTableSearchQuery(); 17 | 18 | if (is_array($traits) && isset($traits[Searchable::class]) && strlen($searchQuery) > 2) { 19 | /** @phpstan-ignore-next-line */ 20 | return $query->search($searchQuery, orderByScore: false); 21 | } 22 | 23 | return parent::applySearchToTableQuery($query); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /app/Domains/Admin/Database/Builders/AdminBuilder.php: -------------------------------------------------------------------------------- 1 | 17 | * */ 18 | final class AdminBuilder extends Builder 19 | { 20 | } 21 | -------------------------------------------------------------------------------- /app/Domains/Admin/Database/Factories/AdminFactory.php: -------------------------------------------------------------------------------- 1 | $this->faker->name(), 17 | 'email' => $this->faker->unique()->safeEmail(), 18 | 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password 19 | 'remember_token' => Str::random(10), 20 | ]); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /app/Domains/Admin/Database/Seeders/AdminSeeder.php: -------------------------------------------------------------------------------- 1 | where('email', $email)->doesntExist()) { 17 | Admin::factory()->create(['email' => $email, 'password' => bcrypt(config('app.admin.password'))]); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /app/Domains/Admin/Enums/Translation/AdminModalTranslationKey.php: -------------------------------------------------------------------------------- 1 | value); 16 | } 17 | 18 | public function contentType(): string 19 | { 20 | return match ($this) { 21 | self::HTML => 'text/html', 22 | self::CSV => 'text/csv', 23 | self::XLSX => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 24 | }; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/Domains/Admin/Enums/Translation/Resources/AdminTranslationKey.php: -------------------------------------------------------------------------------- 1 | getResourceActionUrl($page)->assertOk(); 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /app/Domains/Admin/Traits/HasNavigationSort.php: -------------------------------------------------------------------------------- 1 | 17 | * */ 18 | final class CartBuilder extends Builder 19 | { 20 | } 21 | -------------------------------------------------------------------------------- /app/Domains/Cart/Database/Builders/CartItemBuilder.php: -------------------------------------------------------------------------------- 1 | 17 | * */ 18 | final class CartItemBuilder extends Builder 19 | { 20 | } 21 | -------------------------------------------------------------------------------- /app/Domains/Cart/Http/Controllers/CartController.php: -------------------------------------------------------------------------------- 1 | url(ProductCategoryResource::getUrl('hierarchy')) 15 | ->icon('heroicon-o-collection'); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /app/Domains/Catalog/Admin/Resources/ProductCategoryResource/Pages/CreateProductCategory.php: -------------------------------------------------------------------------------- 1 | 17 | * */ 18 | final class ProductCategoryBuilder extends Builder 19 | { 20 | public function hasLimitedDepth(): self 21 | { 22 | $this->limitDepth(ProductCategory::MAX_DEPTH); 23 | 24 | return $this; 25 | } 26 | 27 | public function displayable(): self 28 | { 29 | $this->where('product_categories.is_displayable', true); 30 | 31 | return $this; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /app/Domains/Catalog/Database/Builders/ProductProductCategoryBuilder.php: -------------------------------------------------------------------------------- 1 | 17 | * */ 18 | final class ProductProductCategoryBuilder extends Builder 19 | { 20 | } 21 | -------------------------------------------------------------------------------- /app/Domains/Catalog/Database/Elastic/2022_08_05_071516_create_products_index.php: -------------------------------------------------------------------------------- 1 | text('title'); 18 | $mapping->keyword('slug'); 19 | $mapping->text('description'); 20 | }); 21 | } 22 | 23 | /** 24 | * Reverse the migration. 25 | */ 26 | public function down(): void 27 | { 28 | Index::dropIfExists('products'); 29 | } 30 | }; 31 | -------------------------------------------------------------------------------- /app/Domains/Catalog/Database/Elastic/2022_08_05_071620_create_product_categories_index.php: -------------------------------------------------------------------------------- 1 | text('title'); 18 | $mapping->keyword('slug'); 19 | }); 20 | } 21 | 22 | /** 23 | * Reverse the migration. 24 | */ 25 | public function down(): void 26 | { 27 | Index::dropIfExists('product_categories'); 28 | } 29 | }; 30 | -------------------------------------------------------------------------------- /app/Domains/Catalog/Database/Seeders/ProductAttributeValueSeeder.php: -------------------------------------------------------------------------------- 1 | call(AttributeValueSeeder::class, false, ['attributableModels' => [Product::class]]); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /app/Domains/Catalog/Database/Seeders/ProductPriceSeeder.php: -------------------------------------------------------------------------------- 1 | call(PriceSeeder::class, false, ['purchasableModels' => [Product::class], 'afterInsertHook' => fn () => Artisan::call(UpdateProductsDisplayability::class)]); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /app/Domains/Catalog/Enums/Media/ProductCategoryMediaCollectionKey.php: -------------------------------------------------------------------------------- 1 | respondWithCollection(HeavyProductCategoryResource::class, ProductCategory::getVisibleHierarchy()); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /app/Domains/Catalog/Http/Middleware/SetDefaultCurrency.php: -------------------------------------------------------------------------------- 1 | offsetGet(QueryKey::FILTER->value) ?? []; 19 | 20 | $request->offsetSet(QueryKey::FILTER->value, array_merge([ 21 | ProductAllowedFilter::CURRENCY->name => app(CatalogSettings::class)->default_currency, 22 | ], $filters)); 23 | 24 | return $next($request); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/Domains/Catalog/Http/Requests/ProductShowRequest.php: -------------------------------------------------------------------------------- 1 | value, ProductAllowedFilter::CURRENCY->name) => ['nullable', 'string', Rule::in(app(CatalogSettings::class)->available_currencies)], 17 | ]; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /app/Domains/Catalog/Models/Settings/CatalogSettings.php: -------------------------------------------------------------------------------- 1 | value; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /app/Domains/Catalog/Models/Virtual/Product/LightProduct.php: -------------------------------------------------------------------------------- 1 | isRunningSeeders()) { 13 | return; 14 | } 15 | 16 | ProductCategory::loadHierarchy(); 17 | } 18 | 19 | public function updated(Product $product): void 20 | { 21 | if (app()->isRunningSeeders()) { 22 | return; 23 | } 24 | 25 | ProductCategory::loadHierarchy(); 26 | } 27 | 28 | public function deleted(Product $product): void 29 | { 30 | ProductCategory::loadHierarchy(); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /app/Domains/Catalog/Observers/ProductProductCategoryObserver.php: -------------------------------------------------------------------------------- 1 | isRunningSeeders()) { 13 | return; 14 | } 15 | 16 | ProductCategory::loadHierarchy(); 17 | } 18 | 19 | public function deleted(ProductProductCategory $model): void 20 | { 21 | ProductCategory::loadHierarchy(); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /app/Domains/Catalog/Providers/RouteServiceProvider.php: -------------------------------------------------------------------------------- 1 | apiResource('categories', ProductCategoryController::class)->only(['index']); 16 | $router->middleware([SetDefaultCurrency::class])->apiResource('products', ProductController::class)->only(['index', 'show'])->parameters(['products' => 'product:slug']); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /app/Domains/Catalog/Resources/Views/hierarchy-assets.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /app/Domains/Catalog/Tests/Feature/Admin/Export/ProductCategoriesAdminExportTest.php: -------------------------------------------------------------------------------- 1 | get(route('categories.index'))->assertOk(); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /app/Domains/Common/Database/Elastic/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /app/Domains/Common/Database/Migrations/2021_04_24_044039_enable_postgis.php: -------------------------------------------------------------------------------- 1 | id(); 13 | 14 | $table->string('group'); 15 | $table->string('name'); 16 | $table->boolean('locked')->default(false); 17 | $table->json('payload'); 18 | 19 | $table->timestamps(); 20 | 21 | $table->unique(['group', 'name']); 22 | }); 23 | } 24 | 25 | public function down(): void 26 | { 27 | Schema::dropIfExists('settings'); 28 | } 29 | }; 30 | -------------------------------------------------------------------------------- /app/Domains/Common/Enums/BooleanString.php: -------------------------------------------------------------------------------- 1 | setData(array_merge_recursive($response->getData(assoc: true), ['meta' => ['timestamp' => intdiv((int) Carbon::now()->format('Uu'), 1000)]])); 18 | } 19 | 20 | return $response; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /app/Domains/Common/Http/Middleware/ForceJsonResponse.php: -------------------------------------------------------------------------------- 1 | headers->set('Accept', 'application/json'); 16 | 17 | return $next($request); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /app/Domains/Common/Http/Middleware/Recaptcha.php: -------------------------------------------------------------------------------- 1 | input(), [ 15 | 'g-recaptcha-response' => 'required|captcha', 16 | ]); 17 | 18 | if ($validator->passes()) { 19 | return $next($request); 20 | } 21 | 22 | return response($validator->messages(), Response::HTTP_UNPROCESSABLE_ENTITY); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /app/Domains/Common/Interfaces/Exportable.php: -------------------------------------------------------------------------------- 1 | 11 | */ 12 | public static function getExportJob(): string; 13 | } 14 | -------------------------------------------------------------------------------- /app/Domains/Common/Mixins/CacheMixin.php: -------------------------------------------------------------------------------- 1 | Cache::store('array'); 14 | } 15 | 16 | public function rememberInArray(): Closure 17 | { 18 | /** @phpstan-ignore-next-line */ 19 | return fn (string $key, Closure $callback): mixed => Cache::simple()->remember($key, app()->runningInConsole() ? null : config('octane.max_execution_time'), $callback); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /app/Domains/Common/Mixins/CarbonMixin.php: -------------------------------------------------------------------------------- 1 | self::createFromFormat(config('app.date_format'), $datetime); 18 | } 19 | 20 | public function defaultFormat(): Closure 21 | { 22 | return fn (): string => $this->format(config('app.date_format')); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /app/Domains/Common/Mixins/RelationMixin.php: -------------------------------------------------------------------------------- 1 | $this->getProvider()->retrieveByCredentials($credentials); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /app/Domains/Common/Models/Virtual/PaginationLinks.php: -------------------------------------------------------------------------------- 1 | fallback(static fn (): RedirectResponse => redirect()->route('l5-swagger.default.api')); 16 | } 17 | 18 | protected function mapApiRoutes(Router $router): void 19 | { 20 | // 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /app/Domains/Common/Resources/Lang/en.json: -------------------------------------------------------------------------------- 1 | { 2 | "The :attribute must contain at least one letter.": "The :attribute must contain at least one letter.", 3 | "The :attribute must contain at least one number.": "The :attribute must contain at least one number.", 4 | "The :attribute must contain at least one symbol.": "The :attribute must contain at least one symbol.", 5 | "The :attribute must contain at least one uppercase and one lowercase letter.": "The :attribute must contain at least one uppercase and one lowercase letter.", 6 | "The given :attribute has appeared in a data leak. Please choose a different :attribute.": "The given :attribute has appeared in a data leak. Please choose a different :attribute." 7 | } 8 | -------------------------------------------------------------------------------- /app/Domains/Common/Resources/Lang/en/auth.php: -------------------------------------------------------------------------------- 1 | 'These credentials do not match our records.', 19 | 'password' => 'The provided password is incorrect.', 20 | 'throttle' => 'Too many login attempts. Please try again in :seconds seconds.', 21 | 22 | ]; 23 | -------------------------------------------------------------------------------- /app/Domains/Common/Resources/Lang/en/pagination.php: -------------------------------------------------------------------------------- 1 | '« Previous', 19 | 'next' => 'Next »', 20 | 21 | ]; 22 | -------------------------------------------------------------------------------- /app/Domains/Common/Services/Elastic/AnonymousMigrationFactory.php: -------------------------------------------------------------------------------- 1 | files->getRequire($file->path()); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /app/Domains/Common/Tests/Feature/SwaggerDocsTest.php: -------------------------------------------------------------------------------- 1 | markTestSkipped('For some reason this test breaks other tests in parallel run.'); // TODO: Fix 15 | } 16 | 17 | $this->artisan('l5-swagger:generate'); 18 | 19 | $this->assertFileExists(PathUtils::join([config('l5-swagger.defaults.paths.docs'), config('l5-swagger.documentations.default.paths.docs_json')])); 20 | 21 | $this->get(config('l5-swagger.documentations.default.routes.api'))->assertOk(); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /app/Domains/Common/Tests/TestApplicationState.php: -------------------------------------------------------------------------------- 1 | $parents */ 18 | $parents = class_parents($class); 19 | 20 | if (array_intersect([$class, ...array_values($parents)], $supportedClasses) === []) { 21 | throw NotSupportedClassException::because($class, $supportedClasses); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /app/Domains/Common/Utils/FileUtils.php: -------------------------------------------------------------------------------- 1 | filter(fn (string $filename): bool => collect(['.', '..'])->doesntContain($filename))->values()->toArray(); 14 | } 15 | } 16 | 17 | return []; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /app/Domains/Common/Utils/MathUtils.php: -------------------------------------------------------------------------------- 1 | $max) { 13 | $value = $max; 14 | } 15 | 16 | if (isset($min) && $value < $min) { 17 | $value = $min; 18 | } 19 | 20 | return $value; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /app/Domains/Common/Utils/PathUtils.php: -------------------------------------------------------------------------------- 1 | value : BooleanString::_FALSE->value; 13 | } 14 | 15 | public static function pluralBasename(string $class): string 16 | { 17 | /** @var string $basename */ 18 | $basename = Str::of($class)->explode('\\')->last(); 19 | 20 | return (string) Str::of($basename)->snake()->plural()->lower(); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /app/Domains/Feedback/Admin/Resources/FeedbackResource/Pages/EditFeedback.php: -------------------------------------------------------------------------------- 1 | text('text'); 18 | $mapping->text('username'); 19 | $mapping->text('email'); 20 | $mapping->text('phone'); 21 | }); 22 | } 23 | 24 | /** 25 | * Reverse the migration. 26 | */ 27 | public function down(): void 28 | { 29 | Index::dropIfExists('feedback'); 30 | } 31 | }; 32 | -------------------------------------------------------------------------------- /app/Domains/Feedback/Database/Seeders/FeedbackSeeder.php: -------------------------------------------------------------------------------- 1 | seedModelByChunks(Feedback::class, app()->runningUnitTests() ? 20 : 200, 25, 5); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /app/Domains/Feedback/Database/Settings/2022_01_23_172325_create_feedback_settings.php: -------------------------------------------------------------------------------- 1 | sprintf('%s.%s', FeedbackSettings::group(), $property); 13 | 14 | $this->migrator->add($getPropertyName('feedback_limit_per_hour'), 1); 15 | } 16 | }; 17 | -------------------------------------------------------------------------------- /app/Domains/Feedback/Enums/Translation/AdminNavigationGroupTranslationKey.php: -------------------------------------------------------------------------------- 1 | [Rule::requiredIf(fn (): bool => ($this->user() === null)), 'string', 'max:255', 'min:3'], 14 | 'email' => [Rule::requiredIf(fn (): bool => ($this->user() === null)), 'email', 'max:255'], 15 | 'phone' => ['nullable', 'string', 'min:12', 'max:12', 'regex:/^\+[\d]{11}$/'], 16 | 'text' => ['required', 'string'], 17 | ]; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /app/Domains/Feedback/Models/Settings/FeedbackSettings.php: -------------------------------------------------------------------------------- 1 | value; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /app/Domains/Feedback/Policies/FeedbackPolicy.php: -------------------------------------------------------------------------------- 1 | ip(), $user)) { 18 | return Response::allow(); 19 | } 20 | 21 | $denyMessage = sprintf('You have posted too much feedback. Please, try again in %s!', Feedback::getTimeStringDecayBeforeNextFeedback($request->ip(), $user)); 22 | 23 | return Response::deny($denyMessage); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /app/Domains/Feedback/Providers/DomainServiceProvider.php: -------------------------------------------------------------------------------- 1 | FeedbackPolicy::class, 16 | ]; 17 | 18 | protected array $providers = [ 19 | RouteServiceProvider::class, 20 | ]; 21 | } 22 | -------------------------------------------------------------------------------- /app/Domains/Feedback/Providers/RouteServiceProvider.php: -------------------------------------------------------------------------------- 1 | middleware(['recaptcha'])->group(function () use ($router): void { 14 | $router->apiResource('feedback', FeedbackController::class)->only(['store']); 15 | }); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /app/Domains/Feedback/Tests/Feature/Admin/Export/FeedbackAdminExportTest.php: -------------------------------------------------------------------------------- 1 | isLocal()) { 18 | $count = 100; 19 | } 20 | 21 | if (app()->runningUnitTests()) { 22 | $count = 10; 23 | } 24 | 25 | $this->seedModelByChunks(Article::class, $count); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /app/Domains/News/Enums/Media/ArticleMediaCollectionKey.php: -------------------------------------------------------------------------------- 1 | Article::class, 19 | ]; 20 | } 21 | -------------------------------------------------------------------------------- /app/Domains/News/Providers/RouteServiceProvider.php: -------------------------------------------------------------------------------- 1 | apiResource('news', ArticleController::class)->only(['index', 'show'])->parameters(['news' => 'article:slug']); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /app/Domains/News/Resources/Lang/en/admin.php: -------------------------------------------------------------------------------- 1 | [ 12 | AdminResourcePropertyTranslationKey::LABEL->name => 'Article', 13 | AdminResourcePropertyTranslationKey::PLURAL_LABEL->name => 'Articles', 14 | AdminResourcePropertyTranslationKey::NAVIGATION_LABEL->name => 'News', 15 | AdminResourcePropertyTranslationKey::NAVIGATION_GROUP->name => LangUtils::translateEnum(AdminNavigationGroupTranslationKey::NEWS), 16 | ], 17 | ]; 18 | -------------------------------------------------------------------------------- /app/Domains/News/Services/Query/Sort/ArticleSortService.php: -------------------------------------------------------------------------------- 1 | addDefaultSort(ArticleAllowedSort::PUBLISHED_AT_DESC) 15 | ->addSort(ArticleAllowedSort::PUBLISHED_AT) 16 | ->addSort(ArticleAllowedSort::TITLE_DESC) 17 | ->addSort(ArticleAllowedSort::TITLE) 18 | ->addDefaultSearchSort(ArticleAllowedSort::DEFAULT, static fn (ArticleBuilder $query) => $query); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /app/Domains/News/Tests/Feature/Admin/Export/NewsAdminExportTest.php: -------------------------------------------------------------------------------- 1 | user(); 15 | 16 | $user->tokens()->delete(); 17 | 18 | Logout::dispatch($user); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /app/Domains/Users/Actions/RegisterUserAction.php: -------------------------------------------------------------------------------- 1 | safe(); 16 | /** @var string $password */ 17 | $password = $request->getPassword(); 18 | $user = User::query()->create($input->merge(['password' => bcrypt($password)])->toArray()); 19 | 20 | Registered::dispatch($user); 21 | 22 | return $user; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /app/Domains/Users/Admin/Resources/UserResource/Pages/EditUser.php: -------------------------------------------------------------------------------- 1 | 17 | * */ 18 | final class UserBuilder extends Builder 19 | { 20 | } 21 | -------------------------------------------------------------------------------- /app/Domains/Users/Database/Elastic/2022_08_05_071120_create_users_index.php: -------------------------------------------------------------------------------- 1 | text('name'); 18 | $mapping->text('email'); 19 | $mapping->text('phone'); 20 | }); 21 | } 22 | 23 | /** 24 | * Reverse the migration. 25 | */ 26 | public function down(): void 27 | { 28 | Index::dropIfExists('users'); 29 | } 30 | }; 31 | -------------------------------------------------------------------------------- /app/Domains/Users/Database/Migrations/2014_10_12_100000_create_password_resets_table.php: -------------------------------------------------------------------------------- 1 | string('email')->index(); 18 | $table->string('token'); 19 | $table->timestamp('created_at')->nullable(); 20 | }); 21 | } 22 | 23 | /** 24 | * Reverse the migrations. 25 | */ 26 | public function down(): void 27 | { 28 | Schema::dropIfExists('password_resets'); 29 | } 30 | }; 31 | -------------------------------------------------------------------------------- /app/Domains/Users/Database/Seeders/UserSeeder.php: -------------------------------------------------------------------------------- 1 | seedModelByChunks(User::class, app()->runningUnitTests() ? 10 : 100); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /app/Domains/Users/Enums/Translation/UserDatasetTranslationKey.php: -------------------------------------------------------------------------------- 1 | execute($request); 15 | 16 | return $this->respondSuccess(); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /app/Domains/Users/Http/Controllers/Api/Auth/LoginController.php: -------------------------------------------------------------------------------- 1 | execute($request); 15 | 16 | return $this->respondWithCustomData([ 17 | 'access_token' => $accessToken->plainTextToken, 18 | ]); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /app/Domains/Users/Http/Controllers/Api/Auth/LogoutController.php: -------------------------------------------------------------------------------- 1 | execute($request); 15 | 16 | return $this->respondSuccess(); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /app/Domains/Users/Http/Controllers/Api/Auth/RegisterController.php: -------------------------------------------------------------------------------- 1 | execute($request); 16 | 17 | return $this->respondWithMessage("We sent a confirmation email to {$user->email}. Please, follow the instructions to complete your registration.", Response::HTTP_CREATED); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /app/Domains/Users/Http/Controllers/Api/Auth/Virtual/LogoutController.php: -------------------------------------------------------------------------------- 1 | ['required', 'email'], 13 | 'token' => ['required', 'string'], 14 | ]; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /app/Domains/Users/Http/Requests/LoginRequest.php: -------------------------------------------------------------------------------- 1 | ['required', 'email'], 13 | 'password' => ['required', 'string'], 14 | ]; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /app/Domains/Users/Http/Requests/RegisterRequest.php: -------------------------------------------------------------------------------- 1 | ['required', 'string', 'max:255', 'min:3'], 13 | 'email' => ['required', 'email', 'max:255', 'unique:users,email'], 14 | 'password' => ['required', 'string', 'min:8', 'confirmed'], 15 | ]; 16 | } 17 | 18 | public function messages(): array 19 | { 20 | return [ 21 | 'email.unique' => 'This email address is already taken', 22 | ]; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /app/Domains/Users/Http/Resources/UserResource.php: -------------------------------------------------------------------------------- 1 | 'string', 'email' => 'string', 'phone' => 'string|null', 'created_at' => 'string|null'])] 12 | public function toArray($request): array 13 | { 14 | /** @var User $user */ 15 | $user = $this->resource; 16 | 17 | return [ 18 | 'name' => $user->name, 19 | 'email' => $user->email, 20 | 'phone' => $user->phone, 21 | 'created_at' => $user->created_at?->defaultFormat(), 22 | ]; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /app/Domains/Users/Models/Virtual/User.php: -------------------------------------------------------------------------------- 1 | addresses()->delete(); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /app/Domains/Users/Tests/Feature/Admin/Export/UsersAdminExportTest.php: -------------------------------------------------------------------------------- 1 | rules()), array_keys($this->rules())); 17 | } 18 | 19 | abstract public function rules(): array; 20 | } 21 | -------------------------------------------------------------------------------- /app/Infrastructure/Abstracts/Notifications/EmailNotification.php: -------------------------------------------------------------------------------- 1 | onQueue(QueueName::NOTIFICATIONS->value); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /app/Infrastructure/Database/Connections/PostgresConnection.php: -------------------------------------------------------------------------------- 1 | getQueryGrammar(), $this->getPostProcessor()); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /app/Interfaces/.modulite.yaml: -------------------------------------------------------------------------------- 1 | name: "@interfaces" 2 | description: "Interfaces are responsible of displaying information to the user and accept new data" 3 | namespace: "App\\Interfaces\\Http\\Controllers\\" 4 | 5 | # "Public API" of the modulite: classes, functions, constants, etc. 6 | # Symbols not listed here will be internal. 7 | export: 8 | - "Controller" 9 | - "ResponseTrait" 10 | 11 | # Dependencies: other modulites, global classes, defines, etc. 12 | require: 13 | - "@components/queryable" 14 | - "@domains/common" 15 | - "#illuminate/collections" 16 | - "#illuminate/contracts" 17 | - "#illuminate/database" 18 | - "#illuminate/http" 19 | - "#illuminate/routing" 20 | - "#illuminate/support" 21 | - "#laravel/framework" 22 | - "#spatie/laravel-query-builder" 23 | - "#symfony/http-foundation" 24 | -------------------------------------------------------------------------------- /bootstrap/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /config/captcha.php: -------------------------------------------------------------------------------- 1 | env('NOCAPTCHA_SECRET'), 5 | 'sitekey' => env('NOCAPTCHA_SITEKEY'), 6 | 'options' => [ 7 | 'timeout' => 30, 8 | ], 9 | ]; 10 | -------------------------------------------------------------------------------- /config/elastic.client.php: -------------------------------------------------------------------------------- 1 | env('ELASTIC_CONNECTION', 'default'), 7 | 'connections' => [ 8 | 'default' => [ 9 | 'hosts' => [ 10 | $elasticUrl, 11 | ], 12 | ], 13 | ], 14 | ]; 15 | 16 | $parsedElasticUrl = parse_url($elasticUrl); 17 | $elasticUsername = $parsedElasticUrl['user'] ?? null; 18 | $elasticPassword = $parsedElasticUrl['pass'] ?? null; 19 | 20 | if (isset($elasticUsername, $elasticPassword)) { 21 | $config['connections']['default']['basicAuthentication'] = [$elasticUsername, $elasticPassword]; 22 | } 23 | 24 | return $config; 25 | -------------------------------------------------------------------------------- /config/elastic.migrations.php: -------------------------------------------------------------------------------- 1 | [ 7 | 'default_path' => env('ELASTIC_MIGRATIONS_DEFAULT_PATH', app_path(PathUtils::join(['Domains', 'Common', 'Database', 'Elastic']))), 8 | ], 9 | 'database' => [ 10 | 'table' => env('ELASTIC_MIGRATIONS_TABLE', 'elastic_migrations'), 11 | 'connection' => env('ELASTIC_MIGRATIONS_CONNECTION', env('DB_CONNECTION')), 12 | ], 13 | 'prefixes' => [ 14 | 'index' => env('ELASTIC_MIGRATIONS_INDEX_PREFIX', env('SCOUT_PREFIX', '')), 15 | 'alias' => env('ELASTIC_MIGRATIONS_ALIAS_PREFIX', env('SCOUT_PREFIX', '')), 16 | ], 17 | ]; 18 | -------------------------------------------------------------------------------- /config/elastic.scout_driver.php: -------------------------------------------------------------------------------- 1 | env('ELASTIC_SCOUT_DRIVER_REFRESH_DOCUMENTS', false), 5 | ]; 6 | -------------------------------------------------------------------------------- /config/postgis.php: -------------------------------------------------------------------------------- 1 | 'public', // Schema for the Postgis extension 5 | ]; 6 | -------------------------------------------------------------------------------- /crontab: -------------------------------------------------------------------------------- 1 | * * * * * php /var/www/html/artisan schedule:run >> /dev/null 2>&1 2 | -------------------------------------------------------------------------------- /docker/php/php.ini: -------------------------------------------------------------------------------- 1 | [PHP] 2 | post_max_size = 100M 3 | upload_max_filesize = 100M 4 | variables_order = EGPCS 5 | 6 | [opcache] 7 | opcache.enable_cli = 1 8 | -------------------------------------------------------------------------------- /docker/php/start-container: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | if [ ! -z "$WWWUSER" ]; then 4 | usermod -u $WWWUSER sail 5 | fi 6 | 7 | if [ ! -d /.composer ]; then 8 | mkdir /.composer 9 | fi 10 | 11 | chmod -R ugo+rw /.composer 12 | 13 | if [ ! -d /home/sail/.config ]; then 14 | mkdir -p /home/sail/.config 15 | fi 16 | 17 | chmod -R ugo+rw /home/sail/.config 18 | 19 | chmod 0644 /etc/cron.d/crontab && crontab /etc/cron.d/crontab 20 | 21 | if [ $# -gt 0 ]; then 22 | if [ "$1" == "--no-supervisor" ]; then 23 | /usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.empty.conf 24 | else 25 | exec gosu $WWWUSER "$@" 26 | fi 27 | else 28 | /usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.conf 29 | fi 30 | -------------------------------------------------------------------------------- /docker/php/supervisord.empty.conf: -------------------------------------------------------------------------------- 1 | [supervisord] 2 | nodaemon=true 3 | user=root 4 | logfile=/var/log/supervisor/supervisord.log 5 | pidfile=/var/run/supervisord.pid 6 | -------------------------------------------------------------------------------- /infection.json5: -------------------------------------------------------------------------------- 1 | { 2 | "source": { 3 | "directories": [ 4 | "app" 5 | ], 6 | "excludes": [ 7 | "/Test\\.php/", 8 | ] 9 | }, 10 | "timeout": 60, 11 | "logs": { 12 | "html": "infection.html", 13 | "summary": "infection.log", 14 | "stryker": { 15 | "report": "master" 16 | } 17 | }, 18 | "tmpDir": "storage", 19 | "mutators": { 20 | "@default": true, 21 | }, 22 | } 23 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "devDependencies": { 3 | "chokidar": "^3.5.3" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /public/.htaccess: -------------------------------------------------------------------------------- 1 | 2 | 3 | Options -MultiViews -Indexes 4 | 5 | 6 | RewriteEngine On 7 | 8 | # Handle Authorization Header 9 | RewriteCond %{HTTP:Authorization} . 10 | RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] 11 | 12 | # Redirect Trailing Slashes If Not A Folder... 13 | RewriteCond %{REQUEST_FILENAME} !-d 14 | RewriteCond %{REQUEST_URI} (.+)/$ 15 | RewriteRule ^ %1 [L,R=301] 16 | 17 | # Send Requests To Front Controller... 18 | RewriteCond %{REQUEST_FILENAME} !-d 19 | RewriteCond %{REQUEST_FILENAME} !-f 20 | RewriteRule ^ index.php [L] 21 | 22 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/InfluxOW/laravel_ddd_ecommerce/aa38fa315fe8bc7baa3d0949061d33b80c5ac067/public/favicon.ico -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: 3 | -------------------------------------------------------------------------------- /public/vendor/horizon/img/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/InfluxOW/laravel_ddd_ecommerce/aa38fa315fe8bc7baa3d0949061d33b80c5ac067/public/vendor/horizon/img/favicon.png -------------------------------------------------------------------------------- /public/vendor/horizon/mix-manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "/app.js": "/app.js?id=7e1968acfd75b8dc843675097962e3ce", 3 | "/app-dark.css": "/app-dark.css?id=15c72df05e2b1147fa3e4b0670cfb435", 4 | "/app.css": "/app.css?id=4d6a1a7fe095eedc2cb2a4ce822ea8a5", 5 | "/img/favicon.png": "/img/favicon.png?id=1542bfe8a0010dcbee710da13cce367f", 6 | "/img/horizon.svg": "/img/horizon.svg?id=904d5b5185fefb09035384e15bfca765", 7 | "/img/sprite.svg": "/img/sprite.svg?id=afc4952b74895bdef3ab4ebe9adb746f" 8 | } 9 | -------------------------------------------------------------------------------- /public/vendor/livewire/manifest.json: -------------------------------------------------------------------------------- 1 | {"/livewire.js":"/livewire.js?id=f092ba91a90e56843ffc"} -------------------------------------------------------------------------------- /public/vendor/prequel/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/InfluxOW/laravel_ddd_ecommerce/aa38fa315fe8bc7baa3d0949061d33b80c5ac067/public/vendor/prequel/favicon.png -------------------------------------------------------------------------------- /public/vendor/prequel/loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/InfluxOW/laravel_ddd_ecommerce/aa38fa315fe8bc7baa3d0949061d33b80c5ac067/public/vendor/prequel/loader.gif -------------------------------------------------------------------------------- /public/vendor/prequel/prequel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/InfluxOW/laravel_ddd_ecommerce/aa38fa315fe8bc7baa3d0949061d33b80c5ac067/public/vendor/prequel/prequel.png -------------------------------------------------------------------------------- /public/vendor/telescope/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/InfluxOW/laravel_ddd_ecommerce/aa38fa315fe8bc7baa3d0949061d33b80c5ac067/public/vendor/telescope/favicon.ico -------------------------------------------------------------------------------- /public/vendor/telescope/mix-manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "/app.js": "/app.js?id=743dfad5fd68f166e4d683df8449c953", 3 | "/app-dark.css": "/app-dark.css?id=a9022d8e130bf3ec3a93350be9bf858e", 4 | "/app.css": "/app.css?id=b89676ee10846bfd767c6836074db724" 5 | } 6 | -------------------------------------------------------------------------------- /public/vendor/totem/img/button-text-arrow.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /public/vendor/totem/img/divider-icon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /public/vendor/totem/img/form-select.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /public/vendor/totem/img/icons/clock.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /public/vendor/totem/img/icons/close.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /public/vendor/totem/img/icons/cog.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /public/vendor/totem/img/icons/more.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /public/vendor/totem/img/icons/play-circle.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /public/vendor/totem/img/icons/play.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /public/vendor/totem/img/icons/search.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /public/vendor/totem/img/icons/spinner.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /public/vendor/totem/img/icons/test.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /public/vendor/totem/img/list-bullet.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /public/vendor/totem/img/totem.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/InfluxOW/laravel_ddd_ecommerce/aa38fa315fe8bc7baa3d0949061d33b80c5ac067/public/vendor/totem/img/totem.png -------------------------------------------------------------------------------- /release.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | php artisan migrate --force 4 | php artisan l5-swagger:generate 5 | -------------------------------------------------------------------------------- /storage/app/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !public/ 3 | !purify/ 4 | !.gitignore 5 | -------------------------------------------------------------------------------- /storage/app/public/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/app/purify/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/clockwork/.gitignore: -------------------------------------------------------------------------------- 1 | *.json 2 | *.json.gz 3 | index 4 | -------------------------------------------------------------------------------- /storage/framework/.gitignore: -------------------------------------------------------------------------------- 1 | compiled.php 2 | config.php 3 | down 4 | events.scanned.php 5 | maintenance.php 6 | routes.php 7 | routes.scanned.php 8 | schedule-* 9 | services.json 10 | -------------------------------------------------------------------------------- /storage/framework/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !data/ 3 | !.gitignore 4 | -------------------------------------------------------------------------------- /storage/framework/cache/data/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/sessions/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/testing/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/views/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/infection/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/logs/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/phpinsights/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/phpstan/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/pint/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/rector/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /tools/sail/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "require-dev": { 3 | "laravel/sail": "^1.18" 4 | } 5 | } 6 | --------------------------------------------------------------------------------