├── .editorconfig ├── .gitattributes ├── .gitignore ├── .vscode └── launch.json ├── Admin.loja ├── .eslintrc.cjs ├── .gitignore ├── .vscode │ └── extensions.json ├── Admin.loja.esproj ├── README.md ├── env.d.ts ├── index.html ├── nuget.config ├── package-lock.json ├── package.json ├── public │ └── favicon.ico ├── src │ ├── App.vue │ ├── assets │ │ └── logo.png │ ├── components │ │ ├── Layout │ │ │ ├── Header │ │ │ │ ├── Header.vue │ │ │ │ └── style.scss │ │ │ └── NavBar │ │ │ │ ├── NavBar.vue │ │ │ │ └── style.scss │ │ ├── Toast │ │ │ ├── ToastUnauthorized.vue │ │ │ └── style.scss │ │ └── Utility │ │ │ ├── FileUpload │ │ │ ├── UploadComposite.vue │ │ │ └── script.ts │ │ │ └── Modals │ │ │ └── UploadPicture.vue │ ├── globals │ │ └── utility.scss │ ├── main.ts │ ├── pinia │ │ ├── Controllers │ │ │ ├── LogController.ts │ │ │ ├── dependencyInjectionController.ts │ │ │ ├── gReCaptcha_v2.ts │ │ │ ├── requestController.ts │ │ │ ├── routeController.ts │ │ │ └── sessionController.ts │ │ ├── Interfaces │ │ │ ├── IConfigureToast.ts │ │ │ └── IDependencyInjection.ts │ │ ├── Types │ │ │ ├── Log.ts │ │ │ ├── mainStore.ts │ │ │ ├── requestModel.ts │ │ │ ├── routerInfo.ts │ │ │ └── session.ts │ │ └── mainStore.ts │ ├── router │ │ └── index.ts │ ├── style.scss │ ├── tests │ │ ├── unit │ │ │ └── pinia │ │ │ │ ├── controllers │ │ │ │ ├── logController.spec.ts │ │ │ │ ├── requestController.spec.ts │ │ │ │ ├── routeController.spec.ts │ │ │ │ └── sessionController.spec.ts │ │ │ │ ├── dependencyInjection.spec.ts │ │ │ │ └── mainStore.spec.ts │ │ └── views │ │ │ └── components │ │ │ └── Layout │ │ │ ├── Header.spec.ts │ │ │ └── NavBar.spec.ts │ ├── theme.scss │ └── views │ │ ├── Home │ │ └── HomeView.vue │ │ ├── Login │ │ ├── LoginView.vue │ │ ├── script.ts │ │ └── style.scss │ │ └── Store │ │ ├── Categories │ │ ├── CategoriesView.vue │ │ ├── script.ts │ │ └── style.scss │ │ └── Users │ │ └── UsersView.vue ├── tsconfig.app.json ├── tsconfig.json ├── tsconfig.node.json ├── vite.config.ts └── vitest.config.ts ├── Api.loja ├── Api.loja.csproj ├── Contracts │ ├── AuthenticationContract.cs │ ├── PraedicamentaContract.cs │ ├── ProductManagerContract.cs │ ├── UploadContract.cs │ └── UsersContract.cs ├── Controllers │ ├── Admin │ │ ├── AuthenticationController.cs │ │ └── CategoriesController.cs │ ├── BaseController.cs │ └── Utility │ │ └── UploadController.cs ├── Middleware │ └── AuthenticationMiddleware.cs ├── Program.cs ├── Properties │ └── launchSettings.json ├── Service │ ├── AuthenticationApplicationService.cs │ ├── PraedicamentaApplicationService.cs │ ├── ProductManagerApplicationService.cs │ ├── UploadApplicationService.cs │ └── UsersApplicationServices.cs ├── Startup.cs ├── VueApp1.Server.http ├── appsettings.Development.json └── appsettings.json ├── Dominio.loja ├── Attributes │ ├── ExcelValidationAttributes.cs │ └── ValidatePermissionAttribute.cs ├── Dominio.loja.csproj ├── Dto │ ├── Models │ │ ├── ExcelImportProducts.cs │ │ ├── ExcelValidatedCell.cs │ │ ├── ExcelValidatedRow.cs │ │ └── ResponseModel.cs │ └── RabbitMQ │ │ └── UploadQueueRequest.cs ├── Entity │ ├── Authentications.cs │ ├── Categories.cs │ ├── CategoriesPromotion.cs │ ├── Clients.cs │ ├── ClientsProductsCart.cs │ ├── IPScore.cs │ ├── Integrations │ │ └── WFileManager │ │ │ ├── FileDirectory.cs │ │ │ ├── FileRelation.cs │ │ │ ├── FileStorage.cs │ │ │ └── Relation │ │ │ └── FileCategories.cs │ ├── Permissions.cs │ ├── PermissionsGroup.cs │ ├── PermissionsRelation.cs │ ├── Prices.cs │ ├── Products.cs │ ├── ProductsCategories.cs │ ├── ProductsPrices.cs │ ├── ProductsStorage.cs │ ├── ProductsSubCategories.cs │ ├── ProductsSubSubCategories.cs │ ├── RequestOrders.cs │ ├── RequestOrdersProducts.cs │ ├── SubCategories.cs │ ├── SubCategoriesProducts.cs │ └── SubSubCategories.cs ├── Enums │ ├── DateTimeFormatValidation.cs │ ├── DirectoryType.cs │ ├── ExcelValidation.cs │ └── FilterOrder.cs ├── Events │ ├── Authentication │ │ ├── Authentication.cs │ │ ├── AuthenticationEvents.cs │ │ └── LoginAdmin.cs │ ├── Clients │ │ ├── ClientPermission.cs │ │ └── ClientsEvents.cs │ ├── FileUpload │ │ ├── All.cs │ │ ├── DirectoryRestriction.cs │ │ ├── Doc.cs │ │ ├── Excel.cs │ │ ├── FileManager.cs │ │ ├── FileManagerEvents.cs │ │ ├── FileType.cs │ │ ├── Image.cs │ │ ├── Pdf.cs │ │ ├── ValidExtensions.cs │ │ └── Video.cs │ ├── Praedicamenta │ │ ├── Praedicamenta.cs │ │ └── PraedicamentaEvents.cs │ └── ProductManager │ │ └── ProductManager.cs └── Interfaces │ ├── Context │ ├── IAdminControllerContext.cs │ ├── IAdminStoreCategoriesControllerContext.cs │ ├── IDbContext.cs │ ├── IInternalEventHandler.cs │ ├── IStoreClientsControllerContext.cs │ ├── IStoreControllerContext.cs │ └── IStoreProductsControllerContext.cs │ ├── Files │ ├── IFileType.cs │ ├── IFileTypeProperty.cs │ └── IFileTypeRestriction.cs │ └── IAuthentication.cs ├── Framework.loja ├── AggregateRoot.cs ├── ControllerResponse.cs ├── CustomAttributes │ └── FirstLetterUpperCaseAttribute.cs ├── Entity.cs ├── ExtensionMethods │ └── ExtensionMethods.cs ├── Framework.loja.csproj ├── Interfaces │ ├── IApplicationService.cs │ ├── IInternalEventHandler.cs │ ├── IStringValidationAttribute.cs │ └── IUnitOfWork.cs ├── InvalidValueException.cs └── Utility │ └── Files │ └── ReadableFileLength.cs ├── FrontEnd.loja_ ├── .vscode │ └── settings.json ├── FrontEnd.loja.njsproj ├── README.md ├── appsettings.json ├── babel.config.js ├── dist │ ├── css │ │ ├── app.3f34febc.css │ │ └── chunk-vendors.08b593cf.css │ ├── favicon.ico │ ├── fonts │ │ ├── Inter-italic.var.958a0b97.woff2 │ │ ├── Inter-roman.var.b2129c00.woff2 │ │ ├── Montserrat-ExtraLight.c82a42c9.ttf │ │ ├── Montserrat-Light.ac0230b4.ttf │ │ ├── Montserrat-Medium.62e48611.ttf │ │ ├── Montserrat-SemiBold.941396b7.ttf │ │ ├── Montserrat-Thin.434cb22f.ttf │ │ ├── Montserrat-VariableFont_wght.f595c38f.ttf │ │ └── Montserrat │ │ │ ├── Montserrat-Italic-VariableFont_wght.ttf │ │ │ ├── Montserrat-VariableFont_wght.ttf │ │ │ ├── OFL.txt │ │ │ ├── README.txt │ │ │ └── static │ │ │ ├── Montserrat-Black.ttf │ │ │ ├── Montserrat-BlackItalic.ttf │ │ │ ├── Montserrat-Bold.ttf │ │ │ ├── Montserrat-BoldItalic.ttf │ │ │ ├── Montserrat-ExtraBold.ttf │ │ │ ├── Montserrat-ExtraBoldItalic.ttf │ │ │ ├── Montserrat-ExtraLight.ttf │ │ │ ├── Montserrat-ExtraLightItalic.ttf │ │ │ ├── Montserrat-Italic.ttf │ │ │ ├── Montserrat-Light.ttf │ │ │ ├── Montserrat-LightItalic.ttf │ │ │ ├── Montserrat-Medium.ttf │ │ │ ├── Montserrat-MediumItalic.ttf │ │ │ ├── Montserrat-Regular.ttf │ │ │ ├── Montserrat-SemiBold.ttf │ │ │ ├── Montserrat-SemiBoldItalic.ttf │ │ │ ├── Montserrat-Thin.ttf │ │ │ └── Montserrat-ThinItalic.ttf │ ├── img │ │ ├── CreditCard │ │ │ ├── cielo-1.svg │ │ │ ├── elo-1.svg │ │ │ ├── mastercard-6.svg │ │ │ └── visa-2.svg │ │ ├── Logo │ │ │ └── logo.png │ │ └── icons │ │ │ └── AppHeader │ │ │ ├── cart.svg │ │ │ ├── clock.svg │ │ │ ├── list.svg │ │ │ ├── menu.svg │ │ │ └── user.svg │ ├── index.html │ ├── js │ │ ├── app.dacfab88.js │ │ ├── app.dacfab88.js.map │ │ ├── chunk-vendors.08a1fff2.js │ │ └── chunk-vendors.08a1fff2.js.map │ ├── manifest.json │ ├── robots.txt │ ├── service-worker.js │ ├── service-worker.js.map │ ├── workbox-6567b62a.js │ └── workbox-6567b62a.js.map ├── package-lock.json ├── package.json ├── postcss.config.js ├── public │ ├── favicon.ico │ ├── fonts │ │ └── Montserrat │ │ │ ├── Montserrat-Italic-VariableFont_wght.ttf │ │ │ ├── Montserrat-VariableFont_wght.ttf │ │ │ ├── OFL.txt │ │ │ ├── README.txt │ │ │ └── static │ │ │ ├── Montserrat-Black.ttf │ │ │ ├── Montserrat-BlackItalic.ttf │ │ │ ├── Montserrat-Bold.ttf │ │ │ ├── Montserrat-BoldItalic.ttf │ │ │ ├── Montserrat-ExtraBold.ttf │ │ │ ├── Montserrat-ExtraBoldItalic.ttf │ │ │ ├── Montserrat-ExtraLight.ttf │ │ │ ├── Montserrat-ExtraLightItalic.ttf │ │ │ ├── Montserrat-Italic.ttf │ │ │ ├── Montserrat-Light.ttf │ │ │ ├── Montserrat-LightItalic.ttf │ │ │ ├── Montserrat-Medium.ttf │ │ │ ├── Montserrat-MediumItalic.ttf │ │ │ ├── Montserrat-Regular.ttf │ │ │ ├── Montserrat-SemiBold.ttf │ │ │ ├── Montserrat-SemiBoldItalic.ttf │ │ │ ├── Montserrat-Thin.ttf │ │ │ └── Montserrat-ThinItalic.ttf │ ├── img │ │ ├── CreditCard │ │ │ ├── cielo-1.svg │ │ │ ├── elo-1.svg │ │ │ ├── mastercard-6.svg │ │ │ └── visa-2.svg │ │ ├── Logo │ │ │ └── logo.png │ │ └── icons │ │ │ └── AppHeader │ │ │ ├── cart.svg │ │ │ ├── clock.svg │ │ │ ├── list.svg │ │ │ ├── menu.svg │ │ │ └── user.svg │ ├── index.html │ └── robots.txt ├── src │ ├── App.vue │ ├── Utils │ │ └── Utility.ts │ ├── assets │ │ └── logo.png │ ├── components │ │ ├── App │ │ │ ├── AppFooter │ │ │ │ ├── AppFooter.vue │ │ │ │ ├── AppFooterBottom.vue │ │ │ │ └── style.scss │ │ │ └── AppHeader │ │ │ │ ├── AppHeader.vue │ │ │ │ ├── Buy │ │ │ │ ├── BuyHeader.vue │ │ │ │ └── style.scss │ │ │ │ ├── Category │ │ │ │ ├── CategoryHeader.vue │ │ │ │ └── style.scss │ │ │ │ ├── CategoryBar │ │ │ │ ├── CategoryBar.vue │ │ │ │ └── styles.scss │ │ │ │ ├── Logo │ │ │ │ └── LogoHeader.vue │ │ │ │ ├── Search │ │ │ │ └── SearchHeader.vue │ │ │ │ └── style.scss │ │ └── ProductCategory │ │ │ ├── ProductCategory.vue │ │ │ ├── ProductComponent │ │ │ ├── ProductComponent.vue │ │ │ └── style.scss │ │ │ └── style.scss │ ├── index.scss │ ├── main.ts │ ├── registerServiceWorker.ts │ ├── router │ │ └── index.ts │ ├── shims-vue.d.ts │ ├── store │ │ ├── Controllers │ │ │ ├── buyStoreController.ts │ │ │ ├── categoryStoreController.ts │ │ │ ├── promotionStoreController.ts │ │ │ ├── requestController.ts │ │ │ └── storeController.ts │ │ ├── Entity │ │ │ ├── requestModel.ts │ │ │ ├── store.ts │ │ │ └── toastMessage.ts │ │ ├── buyStore.ts │ │ ├── categoryStore.ts │ │ ├── promotionStore.ts │ │ └── store.ts │ ├── variables.scss │ └── views │ │ ├── AppBody │ │ ├── AppBody.vue │ │ └── style.scss │ │ ├── BuyList │ │ ├── BuyList.vue │ │ └── style.scss │ │ ├── Login │ │ ├── LoginView.vue │ │ └── style.scss │ │ └── Register │ │ ├── RegisterView.vue │ │ └── style.scss ├── tailwind.config.js ├── tests │ ├── json │ │ ├── categoryHeader.json │ │ └── productCategory.json │ └── unit │ │ └── Controllers │ │ ├── categoryStoreController.spec.ts │ │ ├── compraStoreController.spec.ts │ │ ├── destaqueStoreController.spec.ts │ │ └── storeController.spec.ts ├── tsconfig.json ├── vue.config.js └── yarn.lock ├── Infra.loja ├── Data │ └── StoreContext.cs ├── Infra.loja.csproj ├── Migrations │ ├── 20241222233734_initial.Designer.cs │ ├── 20241222233734_initial.cs │ └── StoreContextModelSnapshot.cs └── WConnectionKeyVault.dll ├── Loja.loja ├── .eslintrc.cjs ├── .gitignore ├── .vscode │ └── extensions.json ├── Loja.loja.esproj ├── README.md ├── env.d.ts ├── index.html ├── nuget.config ├── package-lock.json ├── package.json ├── public │ └── favicon.ico ├── src │ ├── App.vue │ ├── assets │ │ ├── base.css │ │ ├── logo.svg │ │ └── main.css │ ├── components │ │ ├── HelloWorld.vue │ │ ├── TheWelcome.vue │ │ ├── WelcomeItem.vue │ │ └── icons │ │ │ ├── IconCommunity.vue │ │ │ ├── IconDocumentation.vue │ │ │ ├── IconEcosystem.vue │ │ │ ├── IconSupport.vue │ │ │ └── IconTooling.vue │ ├── main.ts │ └── shims-vue.d.ts ├── tsconfig.app.json ├── tsconfig.json ├── tsconfig.node.json └── vite.config.ts ├── Loja.sln ├── MicroServices ├── Api.ServicesManager │ ├── Api.ServicesManager.csproj │ ├── Api.ServicesManager.http │ ├── Contracts │ │ ├── QuartzApplicationServicesContract.cs │ │ └── SMApplicationServicesContract.cs │ ├── Controllers │ │ ├── BaseController.cs │ │ ├── QuartzController.cs │ │ └── ServicesManagerController.cs │ ├── Interfaces │ │ └── IHostedServices.cs │ ├── Log4net.config │ ├── MicroService │ │ ├── HostedServices.cs │ │ ├── Quartz │ │ │ └── QuartzMS.cs │ │ └── WFileManager │ │ │ └── WFileManagerMS.cs │ ├── Program.cs │ ├── Properties │ │ └── launchSettings.json │ ├── Services │ │ ├── QuartzApplicationServices.cs │ │ └── SMApplicationServices.cs │ ├── Startup.cs │ ├── appsettings.Development.json │ └── appsettings.json └── Integrations │ ├── QuartzScheduler │ ├── ConsoleLogProvider.cs │ ├── Contracts │ │ └── QuartzSchedullerContracts.cs │ ├── Interfaces │ │ └── IQuartzScheduler.cs │ ├── Jobs │ │ └── HelloWorldJob.cs │ ├── QuartzScheduler.cs │ ├── QuartzScheduler.csproj │ ├── ScheduleOnStart.cs │ └── appsettings.json │ ├── RabbitMQ.loja │ ├── Configuration │ │ └── Configurations.cs │ ├── FileUploadClient.cs │ ├── FileUploadServer.cs │ ├── Interfaces │ │ └── IFileUploadClient.cs │ ├── RabbitMQ.loja.csproj │ ├── appsettings.Development.json │ └── appsettings.json │ ├── TopShelf │ ├── Program.cs │ └── TopShelf.csproj │ └── WFileUploader │ ├── Contracts │ ├── FileManagerLog.cs │ ├── Image.cs │ ├── ReadContracts.cs │ └── UploadContracts.cs │ ├── Enum │ └── UploadOptions.cs │ ├── FileManager.cs │ ├── Interfaces │ ├── IFileObserver.cs │ └── IFileStrategy.cs │ ├── ReadStrategy │ └── ReadFile.cs │ ├── Utility │ └── FileManagerUtility.cs │ ├── WFileManager.csproj │ └── WriteStrategy │ └── UploadFile.cs ├── README.md ├── Tests.Loja ├── Api │ ├── ApplicationService │ │ ├── AuthenticationApplicationServiceTest.cs │ │ └── UsersApplicationServiceTest.cs │ └── PraedicamentaService │ │ └── PraedicamentaApplicationServiceTest.cs ├── Configuration.cs ├── FrameworkTest │ ├── CustomAttributesTest │ │ └── FirstLetterUppercaseAttributeTeste.cs │ ├── ExtensionMethodsTest │ │ └── EntensionMethodsTest.cs │ └── UtilityTest │ │ └── ReadableFileLengthTest.cs ├── Infra │ └── StoreContextTest.cs ├── MicroService │ ├── IntegrationsTest │ │ ├── QuartzScheduler │ │ │ └── QuartzSchedulerTest.cs │ │ └── WFileManagerTest │ │ │ ├── DirectoryRestrictionTest.cs │ │ │ ├── FileManagerLogTest.cs │ │ │ ├── FileManagerTest.cs │ │ │ └── FileManagerUtility.cs │ └── MicroServicesManager │ │ └── HostedServicesTest.cs ├── TestAttributes │ ├── ExcelValidationAttributesTest.cs │ └── TestClassAttributes.cs ├── TestFiles │ └── TestImages │ │ └── testfile.png ├── TestFilesReader.cs ├── Tests.Loja.csproj └── Utils │ ├── ERPlusTest.cs │ └── NPOITest.cs ├── Utils.loja ├── Enums │ └── NPOISheetStyles.cs ├── Excel │ └── NPOIExcel.cs ├── Queue │ └── Queue.cs └── Utils.loja.csproj └── yarn.lock /.editorconfig: -------------------------------------------------------------------------------- 1 | [*.cs] 2 | 3 | # IDE0055: Corrigir a formatação 4 | dotnet_diagnostic.IDE0055.severity = none 5 | -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | { 8 | "type": "chrome", 9 | "request": "launch", 10 | "name": "Launch Chrome against localhost", 11 | "url": "http://localhost:8080", 12 | "webRoot": "${workspaceFolder}" 13 | } 14 | ] 15 | } -------------------------------------------------------------------------------- /Admin.loja/.eslintrc.cjs: -------------------------------------------------------------------------------- 1 | /* eslint-env node */ 2 | require('@rushstack/eslint-patch/modern-module-resolution') 3 | 4 | module.exports = { 5 | root: true, 6 | 'extends': [ 7 | 'plugin:vue/vue3-essential', 8 | 'eslint:recommended', 9 | '@vue/eslint-config-typescript' 10 | ], 11 | parserOptions: { 12 | ecmaVersion: 'latest' 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Admin.loja/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | .DS_Store 12 | dist 13 | dist-ssr 14 | coverage 15 | *.local 16 | 17 | /cypress/videos/ 18 | /cypress/screenshots/ 19 | 20 | # Editor directories and files 21 | .vscode/* 22 | !.vscode/extensions.json 23 | .idea 24 | *.suo 25 | *.ntvs* 26 | *.njsproj 27 | *.sln 28 | *.sw? 29 | 30 | *.tsbuildinfo 31 | -------------------------------------------------------------------------------- /Admin.loja/.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": [ 3 | "Vue.volar", 4 | "dbaeumer.vscode-eslint" 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /Admin.loja/Admin.loja.esproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | npm run dev 4 | .\ 5 | 6 | Jest 7 | 8 | false 9 | 10 | $(MSBuildProjectDirectory)\dist 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /Admin.loja/README.md: -------------------------------------------------------------------------------- 1 | # vueapp1.client 2 | 3 | This template should help get you started developing with Vue 3 in Vite. 4 | 5 | ## Recommended IDE Setup 6 | 7 | [VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur). 8 | 9 | ## Type Support for `.vue` Imports in TS 10 | 11 | TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) to make the TypeScript language service aware of `.vue` types. 12 | 13 | ## Customize configuration 14 | 15 | See [Vite Configuration Reference](https://vitejs.dev/config/). 16 | 17 | ## Project Setup 18 | 19 | ```sh 20 | npm install 21 | ``` 22 | 23 | ### Compile and Hot-Reload for Development 24 | 25 | ```sh 26 | npm run dev 27 | ``` 28 | 29 | ### Type-Check, Compile and Minify for Production 30 | 31 | ```sh 32 | npm run build 33 | ``` 34 | 35 | ### Lint with [ESLint](https://eslint.org/) 36 | 37 | ```sh 38 | npm run lint 39 | ``` 40 | -------------------------------------------------------------------------------- /Admin.loja/env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | 3 | -------------------------------------------------------------------------------- /Admin.loja/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite App 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /Admin.loja/nuget.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Admin.loja/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/waltereidi/Loja/feba7bc63a0f5eb874a1e15b64c26e9e95bbe3e3/Admin.loja/public/favicon.ico -------------------------------------------------------------------------------- /Admin.loja/src/App.vue: -------------------------------------------------------------------------------- 1 | 2 | 7 | 21 | 22 | 26 | -------------------------------------------------------------------------------- /Admin.loja/src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/waltereidi/Loja/feba7bc63a0f5eb874a1e15b64c26e9e95bbe3e3/Admin.loja/src/assets/logo.png -------------------------------------------------------------------------------- /Admin.loja/src/components/Layout/Header/Header.vue: -------------------------------------------------------------------------------- 1 | 14 | 15 | 26 | 27 | -------------------------------------------------------------------------------- /Admin.loja/src/components/Layout/Header/style.scss: -------------------------------------------------------------------------------- 1 | @import '@/globals/utility.scss'; 2 | 3 | 4 | .toolbar{ 5 | flex: 1 1 auto; 6 | justify-content: space-between; 7 | } 8 | .toolbar-start{ 9 | display: flex; 10 | flex-flow:row wrap; 11 | justify-content: end; 12 | } 13 | 14 | 15 | -------------------------------------------------------------------------------- /Admin.loja/src/components/Layout/NavBar/style.scss: -------------------------------------------------------------------------------- 1 | @import '@/globals/utility.scss'; 2 | //normal display 3 | @media (min-width:$md) { 4 | .mobileOpenNavBar{ 5 | display: none; 6 | } 7 | .navBar-container { 8 | display: block; 9 | } 10 | .navBar-close > i { 11 | display: none; 12 | } 13 | } 14 | //mobile display 15 | @media(max-width:$md){ 16 | .hidden{ 17 | display:none; 18 | } 19 | .visible{ 20 | display:block; 21 | } 22 | .navBar-container{ 23 | position:fixed; 24 | } 25 | .navBar-close > i { 26 | display: block; 27 | } 28 | .mobileOpenNavBar{ 29 | display: block; 30 | } 31 | .card{ 32 | min-width: calc(100vw - 48px) ; 33 | } 34 | } -------------------------------------------------------------------------------- /Admin.loja/src/components/Toast/style.scss: -------------------------------------------------------------------------------- 1 | .toast-content { 2 | display: flex; 3 | flex-flow: column; 4 | gap: 20px; 5 | } 6 | .hide { 7 | display: none; 8 | } 9 | -------------------------------------------------------------------------------- /Admin.loja/src/components/Utility/Modals/UploadPicture.vue: -------------------------------------------------------------------------------- 1 | 21 | 22 | 29 | 30 | -------------------------------------------------------------------------------- /Admin.loja/src/globals/utility.scss: -------------------------------------------------------------------------------- 1 | 2 | $sm:640px; 3 | $md:768px; 4 | $lg:1024px; 5 | $xl:1280px; 6 | $xxl:1536px; 7 | -------------------------------------------------------------------------------- /Admin.loja/src/pinia/Controllers/LogController.ts: -------------------------------------------------------------------------------- 1 | import {Log , LogSeverity} from '@/pinia/Types/Log' 2 | export class LogController{ 3 | 4 | constructor(serviceDescription:String){ 5 | this.log.push({ 6 | Severity : LogSeverity.Initialization, 7 | Description: `${serviceDescription}`, 8 | Created_At: new Date() 9 | }) 10 | } 11 | 12 | log:Log[] = [] 13 | /** 14 | * a single log with success = false tell the operation has failed 15 | * log with type should be used to improved legibility 16 | * @param { bool } success 17 | * @param { string } description 18 | * @param { int } severity 19 | */ 20 | addLog(description:String , severity:LogSeverity ):Number 21 | { 22 | if(import.meta.env.mode && severity == LogSeverity.Error) 23 | console.log(this.getLog()) 24 | 25 | return this.log.push({ 26 | Description : description , 27 | Severity : severity , 28 | Created_At : new Date() 29 | }) 30 | } 31 | 32 | /** 33 | * Find if theres an error logged 34 | */ 35 | hasError = ():Boolean => this.log 36 | .some(x=>x.Severity === LogSeverity.Error ) 37 | 38 | /** 39 | * get entireLog sorted by Id 40 | * @returns []object 41 | */ 42 | //@ts-ignore 43 | getLog =():Log[]=> this.log.sort((prev , next) => prev.Created_At - next.Created_At ) 44 | 45 | 46 | } -------------------------------------------------------------------------------- /Admin.loja/src/pinia/Controllers/dependencyInjectionController.ts: -------------------------------------------------------------------------------- 1 | import { LogSeverity } from "../Types/Log"; 2 | import { IDependencyInjection } from "../Interfaces/IDependencyInjection"; 3 | import { LogController } from "./LogController"; 4 | import { RequestController } from "./requestController"; 5 | 6 | //** OCP must be used only once per dependency request */ 7 | export class DepencyInjectionController implements IDependencyInjection 8 | { 9 | public log:LogController = new LogController("DepencyInjectionController") 10 | private serviceName:string; 11 | private params:any; 12 | 13 | constructor( serviceName:string , params?:any ){ 14 | this.serviceName = serviceName; 15 | this.params = params; 16 | 17 | this.log.addLog( `constructor ${serviceName} , ${Object.keys(params??{}).join(',') }` , LogSeverity.Initialization); 18 | } 19 | 20 | //** IOC the entire operation must be handled here*/ 21 | public getService() : any 22 | { 23 | this.log.addLog( `get Service` , LogSeverity.Event); 24 | switch(this.serviceName.toLocaleLowerCase() ){ 25 | case 'request' : return this.getRequest(); 26 | default : throw new Error(`Invalid operation exception ${this.serviceName}`); 27 | } 28 | } 29 | private getRequest() : RequestController 30 | { 31 | this.log.addLog( `getRequest` , LogSeverity.Event); 32 | return new RequestController(); 33 | } 34 | 35 | 36 | } 37 | -------------------------------------------------------------------------------- /Admin.loja/src/pinia/Controllers/gReCaptcha_v2.ts: -------------------------------------------------------------------------------- 1 | export class GReCaptcha_v2{ 2 | 3 | 4 | 5 | } -------------------------------------------------------------------------------- /Admin.loja/src/pinia/Interfaces/IConfigureToast.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * documentation 3 | * @link https://primevue.org/toast/ 4 | */ 5 | export interface IConfigureToast{ 6 | /** refers to toast color */ 7 | severity:ToastSeverity; 8 | /** refers to title */ 9 | summary:string; 10 | /** refers to message content */ 11 | detail:string; 12 | /** refers to duration in miliseconds */ 13 | life: number; 14 | } 15 | 16 | export enum ToastSeverity { 17 | success , //green 18 | info , //light blue 19 | warn, //orange 20 | danger , //red 21 | secondary , //light gray 22 | contrast , //black 23 | } -------------------------------------------------------------------------------- /Admin.loja/src/pinia/Interfaces/IDependencyInjection.ts: -------------------------------------------------------------------------------- 1 | 2 | import { LogController } from "../Controllers/LogController" 3 | export interface IDependencyInjection{ 4 | log:LogController 5 | } -------------------------------------------------------------------------------- /Admin.loja/src/pinia/Types/Log.ts: -------------------------------------------------------------------------------- 1 | 2 | export interface Log{ 3 | Description:String , 4 | Severity:LogSeverity, 5 | Created_At:Date 6 | } 7 | /** 8 | * This interface is sensitive to order 9 | * starts in lower severity and end in highest severity 10 | */ 11 | export enum LogSeverity{ 12 | Event , 13 | Initialization , 14 | Parameter, 15 | Error, 16 | } -------------------------------------------------------------------------------- /Admin.loja/src/pinia/Types/mainStore.ts: -------------------------------------------------------------------------------- 1 | 2 | export type MainStoreServices ={ 3 | /** refer to toast service instanced in app.vue */ 4 | useToast:any, 5 | } 6 | 7 | -------------------------------------------------------------------------------- /Admin.loja/src/pinia/Types/requestModel.ts: -------------------------------------------------------------------------------- 1 | export type RequestModel = { 2 | method: string 3 | url: string 4 | body?: any 5 | } -------------------------------------------------------------------------------- /Admin.loja/src/pinia/Types/routerInfo.ts: -------------------------------------------------------------------------------- 1 | 2 | export type RouterInfo = { 3 | to:any , 4 | from:any , 5 | } 6 | export enum RouteCondition 7 | { 8 | HiddenNavBar , 9 | ShowNavBar , 10 | RedirectToHome , 11 | RedirectToLogin , 12 | Contiue, 13 | } 14 | export type RouteConditionResponse = { 15 | route:RouteCondition , 16 | ui:RouteCondition , 17 | user:RouteCondition, 18 | } 19 | -------------------------------------------------------------------------------- /Admin.loja/src/pinia/Types/session.ts: -------------------------------------------------------------------------------- 1 | export type UserInfo = { 2 | nameInitials:string, 3 | firstName:string, 4 | lastName:string, 5 | jwtToken:JwtToken 6 | } 7 | 8 | export type JwtToken = { 9 | createdAt:Date, 10 | expiresAt:Date, 11 | } 12 | -------------------------------------------------------------------------------- /Admin.loja/src/pinia/mainStore.ts: -------------------------------------------------------------------------------- 1 | import { defineStore } from 'pinia'; 2 | import { MainStoreServices} from '@/pinia/Types/mainStore' 3 | import { ToastSeverity ,IConfigureToast } from './Interfaces/IConfigureToast'; 4 | import { useToast } from "primevue/usetoast"; 5 | export const useMainStore = defineStore('mainStore', { 6 | 7 | state: () => { 8 | return ({ 9 | useToast: useToast(), 10 | } as MainStoreServices ) 11 | }, 12 | actions: { 13 | async toast(message:string , severity:ToastSeverity , useToast:any = null): Promise 14 | { 15 | this.useToast = this.useToast ?? useToast; 16 | this.useToast.add({ 17 | severity: ToastSeverity[severity], 18 | summary: severity.toString() , 19 | detail: message, 20 | life: 3000 21 | }) 22 | 23 | }, 24 | async toastMessage(toast:IConfigureToast ) : Promise 25 | { 26 | this.useToast.add({ 27 | severity: ToastSeverity[toast.severity], 28 | summary: toast.summary , 29 | detail: toast.detail, 30 | life: toast.life 31 | }) 32 | 33 | }, 34 | 35 | }, 36 | 37 | 38 | 39 | 40 | }); -------------------------------------------------------------------------------- /Admin.loja/src/router/index.ts: -------------------------------------------------------------------------------- 1 | import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router' 2 | const routes = [ 3 | { 4 | path: '/', 5 | name: 'Login', 6 | component: () => import('../views/Login/LoginView.vue') 7 | }, 8 | { 9 | path: '/store/categories', 10 | name: 'store/categories', 11 | component: () => import('../views/Store/Categories/CategoriesView.vue') 12 | }, 13 | 14 | ]; 15 | 16 | const router = createRouter({ 17 | history: createWebHistory(), 18 | routes: routes, 19 | scrollBehavior(to, from, savedPosition) { 20 | return { top: 0 } 21 | }, 22 | 23 | }) 24 | 25 | export { routes }; 26 | export default router -------------------------------------------------------------------------------- /Admin.loja/src/style.scss: -------------------------------------------------------------------------------- 1 | .navBar { 2 | flex:0 0 auto; 3 | } 4 | .header{ 5 | width: 100%; 6 | } 7 | .view-container{ 8 | 9 | } 10 | 11 | .app-container { 12 | 13 | display: flex ; 14 | flex-flow: row; 15 | 16 | } 17 | .routerView { 18 | display: flex; 19 | flex:1 1 auto; 20 | justify-content: center; 21 | } 22 | -------------------------------------------------------------------------------- /Admin.loja/src/tests/unit/pinia/controllers/logController.spec.ts: -------------------------------------------------------------------------------- 1 | import { expect, test } from 'vitest' 2 | import { LogController } from '@/pinia/Controllers/LogController' 3 | import { LogSeverity } from '@/pinia/Types/Log'; 4 | 5 | test('add log returns has error when add success false log', () => { 6 | const logger = new LogController("TestCase Log"); 7 | 8 | logger.addLog('TestPurposes log' ,0 ) 9 | logger.addLog('TestPurposes Log' , LogSeverity.Error ) 10 | logger.addLog('TestPurposes Log' ,0) 11 | 12 | expect( logger.hasError() ).toBe(true) 13 | //An aditional log is inserted from logger contructor 14 | expect( logger.getLog().length ).toBe(4) 15 | }) 16 | -------------------------------------------------------------------------------- /Admin.loja/src/tests/unit/pinia/controllers/requestController.spec.ts: -------------------------------------------------------------------------------- 1 | import { expect, test } from 'vitest' 2 | import { RequestController } from '@/pinia/Controllers/requestController' 3 | 4 | const request = new RequestController(); 5 | test('request post returns a result',async () => { 6 | 7 | const res =await request.post('https://testCase.com' , null ) 8 | //console.log(res) 9 | expect(res.status).to.not.toBeNull() 10 | }) 11 | test('request get returns a result',async () => { 12 | 13 | const res =await request.get('https://testCase.com' ) 14 | //console.log(res) 15 | expect(res.status).to.not.toBeNull() 16 | }) 17 | test('request get returns a result',async () => { 18 | 19 | const res =await request.put('https://testCase.com' ,null) 20 | //console.log(res) 21 | expect(res.status).to.not.toBeNull() 22 | }) 23 | test('request get returns a result',async () => { 24 | 25 | const res =await request.delete('https://testCase.com' ) 26 | //console.log(res) 27 | expect(res.status).to.not.toBeNull() 28 | }) -------------------------------------------------------------------------------- /Admin.loja/src/tests/unit/pinia/controllers/sessionController.spec.ts: -------------------------------------------------------------------------------- 1 | import { describe, it, expect, vi ,beforeEach , afterEach} from 'vitest'; 2 | import { SessionController } from '@/pinia/Controllers/sessionController'; 3 | 4 | describe('sessionStorage mock', () => { 5 | //SessionStorage mock 6 | beforeEach(() => { 7 | 8 | const mockStorage = {}; 9 | vi.stubGlobal('sessionStorage', { 10 | getItem: vi.fn((key) => mockStorage[key] || null), 11 | setItem: vi.fn((key, value) => { 12 | mockStorage[key] = value; 13 | }), 14 | removeItem: vi.fn((key) => { 15 | delete mockStorage[key]; 16 | }), 17 | clear: vi.fn(() => { 18 | for (const key in mockStorage) { 19 | delete mockStorage[key]; 20 | } 21 | }), 22 | }); 23 | }); 24 | 25 | afterEach(() => { 26 | vi.restoreAllMocks(); 27 | }); 28 | 29 | it('set session and get Session',async ()=>{ 30 | // sessionStorage is mocked by 'vitest-localstorage-mock' 31 | 32 | 33 | const session = new SessionController() 34 | const userInfo:UserInfo = { 35 | firstName:"testCase", 36 | lastName:"caseTest", 37 | nameInitials:"TC", 38 | jwtToken:{ 39 | createdAt: new Date(), 40 | expiresAt: new Date() 41 | } 42 | }; 43 | session.setUserInfoSession(userInfo); 44 | const result = session.getUserInfoSession() 45 | 46 | expect(sessionStorage.getItem).toBeCalledTimes(5); 47 | 48 | expect(userInfo).toMatchObject(result); 49 | }) 50 | }); 51 | -------------------------------------------------------------------------------- /Admin.loja/src/tests/unit/pinia/dependencyInjection.spec.ts: -------------------------------------------------------------------------------- 1 | import { expect, test , describe , beforeEach , it } from 'vitest'; 2 | import { DepencyInjectionController } from '@/pinia/Controllers/dependencyInjectionController' 3 | import { RequestController } from '@/pinia/Controllers/requestController'; 4 | 5 | it( 'di returns request controller' , ()=>{ 6 | 7 | const di = new DepencyInjectionController('request') 8 | const request = di.getService(); 9 | 10 | expect(request).toBeInstanceOf(RequestController) 11 | 12 | }) -------------------------------------------------------------------------------- /Admin.loja/src/tests/unit/pinia/mainStore.spec.ts: -------------------------------------------------------------------------------- 1 | import { expect, test , describe , beforeEach } from 'vitest'; 2 | import { mount ,shallowMount} from '@vue/test-utils' 3 | import { setActivePinia, createPinia } from 'pinia' 4 | import { useMainStore } from '@/pinia/mainStore'; 5 | import Toast from 'primevue/toast'; 6 | import App from '@/App.vue' 7 | import PrimeVue from 'primevue/config'; 8 | describe('Dependency injection store', () => { 9 | beforeEach(() => { 10 | // creates a fresh pinia and makes it active 11 | // so it's automatically picked up by any useStore() call 12 | // without having to pass it to it: `useStore(pinia)` 13 | setActivePinia(createPinia()) 14 | 15 | 16 | }) 17 | 18 | test('test' ,async () => { 19 | const store = useMainStore() 20 | type toastComponent = Record; 21 | const com:toastComponent = { 22 | "Toast": Toast 23 | } 24 | 25 | const wrapper = mount(App, { 26 | global: { 27 | plugins: [PrimeVue], 28 | 29 | components: { com }, 30 | 31 | }, 32 | 33 | 34 | }) 35 | wrapper. 36 | 37 | expect(wrapper.find('.messagecontent').exists()).toBe(true) 38 | 39 | 40 | }) 41 | 42 | 43 | 44 | }) -------------------------------------------------------------------------------- /Admin.loja/src/tests/views/components/Layout/Header.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/waltereidi/Loja/feba7bc63a0f5eb874a1e15b64c26e9e95bbe3e3/Admin.loja/src/tests/views/components/Layout/Header.spec.ts -------------------------------------------------------------------------------- /Admin.loja/src/tests/views/components/Layout/NavBar.spec.ts: -------------------------------------------------------------------------------- 1 | import { expect, test , describe , beforeEach } from 'vitest'; 2 | import { mount} from '@vue/test-utils' 3 | import NavBar from '@/components/Layout/NavBar/NavBar.vue' 4 | import PrimeVue from 'primevue/config'; 5 | import { createRouter, createWebHistory } from 'vue-router' 6 | import { routes } from "@/router/index.ts" 7 | 8 | 9 | describe('navBar test', () => { 10 | 11 | const router = createRouter({ 12 | history: createWebHistory(), 13 | routes: routes, 14 | }) 15 | 16 | test('navBar is visible when route is different than /' ,async () => { 17 | const wrapper = mount(NavBar, { 18 | global: { 19 | plugins: [PrimeVue, router], 20 | } 21 | }) 22 | router.push('/sdsd') 23 | await router.isReady() 24 | 25 | expect(wrapper.find('.navBar-container').exists()).toBe(true) 26 | }) 27 | 28 | }) -------------------------------------------------------------------------------- /Admin.loja/src/theme.scss: -------------------------------------------------------------------------------- 1 | .theme-primary{ 2 | background-color:blue; 3 | border-color: teal; 4 | } -------------------------------------------------------------------------------- /Admin.loja/src/views/Home/HomeView.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | -------------------------------------------------------------------------------- /Admin.loja/src/views/Login/script.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/waltereidi/Loja/feba7bc63a0f5eb874a1e15b64c26e9e95bbe3e3/Admin.loja/src/views/Login/script.ts -------------------------------------------------------------------------------- /Admin.loja/src/views/Login/style.scss: -------------------------------------------------------------------------------- 1 | .center { 2 | display: flex; 3 | align-items: center; 4 | justify-content: center; 5 | } 6 | 7 | .container { 8 | display: flex; 9 | flex-flow: column; 10 | justify-content: space-around; 11 | justify-items: center; 12 | align-content: space-around; 13 | align-items: center; 14 | gap: 20px; 15 | 16 | &--title { 17 | flex: 0 0 auto; 18 | } 19 | 20 | &--content { 21 | flex: 1 1 auto; 22 | max-width: 100%; 23 | } 24 | 25 | @media (max-width: 480px) { 26 | &--actions { 27 | flex: 0 0 100%; 28 | } 29 | } 30 | @media (min-width: 481px) { 31 | &--actions { 32 | flex: 0 0 auto; 33 | } 34 | } 35 | } 36 | .login-img { 37 | max-width: 200px; 38 | } 39 | -------------------------------------------------------------------------------- /Admin.loja/src/views/Store/Categories/script.ts: -------------------------------------------------------------------------------- 1 | 2 | 49 | 50 | -------------------------------------------------------------------------------- /Admin.loja/src/views/Store/Categories/style.scss: -------------------------------------------------------------------------------- 1 | .center { 2 | display: flex; 3 | align-items: center; 4 | justify-content: center; 5 | width: 100vw; 6 | height: 100vh; 7 | } 8 | 9 | .container { 10 | display: flex; 11 | flex-flow: column; 12 | justify-content: space-around; 13 | justify-items: center; 14 | align-content: space-around; 15 | align-items: center; 16 | gap: 20px; 17 | 18 | &--title { 19 | flex: 0 0 auto; 20 | } 21 | 22 | &--content { 23 | flex: 1 1 auto; 24 | max-width: 100%; 25 | } 26 | 27 | @media (max-width: 480px) { 28 | &--actions { 29 | flex: 0 0 100%; 30 | } 31 | } 32 | @media (min-width: 481px) { 33 | &--actions { 34 | flex: 0 0 auto; 35 | } 36 | } 37 | } 38 | .login-img { 39 | max-width: 200px; 40 | } 41 | -------------------------------------------------------------------------------- /Admin.loja/src/views/Store/Users/UsersView.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | -------------------------------------------------------------------------------- /Admin.loja/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@vue/tsconfig/tsconfig.dom.json", 3 | "include": ["env.d.ts", "src/**/*", "src/**/*.vue"], 4 | "exclude": ["src/**/__tests__/*"], 5 | "compilerOptions": { 6 | "composite": true, 7 | "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo", 8 | 9 | "baseUrl": ".", 10 | "paths": { 11 | "@/*": ["./src/*"] 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Admin.loja/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", 4 | "module": "esnext", 5 | "strict": true, 6 | "jsx": "preserve", 7 | "importHelpers": true, 8 | "moduleResolution": "node", 9 | "skipLibCheck": true, 10 | "esModuleInterop": true, 11 | "allowSyntheticDefaultImports": true, 12 | "forceConsistentCasingInFileNames": true, 13 | "useDefineForClassFields": true, 14 | "sourceMap": true, 15 | "resolveJsonModule":true, 16 | "baseUrl": ".", 17 | "types": [ 18 | "webpack-env" 19 | ], 20 | "paths": { 21 | "@/*": [ 22 | "src/*" 23 | ] 24 | }, 25 | "lib": [ 26 | "esnext", 27 | "dom", 28 | "dom.iterable", 29 | "scripthost" 30 | ] 31 | }, 32 | "include": [ 33 | "src/**/*.ts", 34 | "src/**/*.tsx", 35 | "src/**/*.vue", 36 | "tests/**/*.ts", 37 | "tests/**/*.tsx" 38 | , "src/tests/views/App.spec.js" ], 39 | "exclude": [ 40 | "node_modules" 41 | ] 42 | } 43 | -------------------------------------------------------------------------------- /Admin.loja/tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@tsconfig/node20/tsconfig.json", 3 | "include": [ 4 | "vite.config.*", 5 | "vitest.config.*", 6 | "cypress.config.*", 7 | "nightwatch.conf.*", 8 | "playwright.config.*" 9 | ], 10 | "compilerOptions": { 11 | "composite": true, 12 | "noEmit": true, 13 | "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo", 14 | 15 | "module": "ESNext", 16 | "moduleResolution": "Bundler", 17 | "types": ["node"] 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Admin.loja/vitest.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vitest/config' 2 | import vue from '@vitejs/plugin-vue' 3 | 4 | export default defineConfig({ 5 | plugins: [ 6 | 7 | vue({ 8 | // Try adding these options if you're having compilation issues 9 | template: { 10 | compilerOptions: { 11 | 12 | // Add any specific compiler options 13 | } 14 | } 15 | }) 16 | ], 17 | test: { 18 | alias: { 19 | '@': new URL('./src/', import.meta.url).pathname, 20 | 21 | }, 22 | globals: true, 23 | environment: 'jsdom', // Ensure this is set 24 | deps: { 25 | inline: ['vue'] // Sometimes helps with compilation 26 | }, 27 | include: ['src/tests/**/*.spec.ts'], 28 | setupFiles: './src/main.ts' 29 | }, 30 | }) -------------------------------------------------------------------------------- /Api.loja/Contracts/ProductManagerContract.cs: -------------------------------------------------------------------------------- 1 | namespace Api.loja.Contracts 2 | { 3 | public static class ProductManagerContract 4 | { 5 | public class V1 6 | { 7 | 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Api.loja/Contracts/UploadContract.cs: -------------------------------------------------------------------------------- 1 | namespace Api.loja.Contracts 2 | { 3 | public class UploadContract 4 | { 5 | public class V1 6 | { 7 | public record class UploadFile(IFormFile file, HttpRequest request); 8 | public record class UploadMultipleFiles(IFormFileCollection files, HttpRequest request); 9 | public record class UploadFileResponse(); 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Api.loja/Contracts/UsersContract.cs: -------------------------------------------------------------------------------- 1 |  2 | namespace Api.loja.Contracts 3 | { 4 | public class UsersContract 5 | { 6 | public class V1 7 | { 8 | public class Requests 9 | { 10 | public record GetUsuariosById(int id); 11 | 12 | public record GetUsuarios(int pagination , int amount); 13 | public record AddUsuario(int? id); 14 | public record DeleteUsuario(int id, string reason); 15 | public record UpdateUsuario(int id 16 | , string email 17 | , string password 18 | , string firstName 19 | , string lastName 20 | , string address 21 | , string phoneNumber 22 | ); 23 | public record UpdateUserPermission( 24 | int userId 25 | 26 | ); 27 | } 28 | public class Responses 29 | { 30 | public record Clients(int? id 31 | , string firstName 32 | , string lastName 33 | , string email 34 | , string address 35 | , DateTime? updated_at 36 | , DateTime created_at); 37 | 38 | } 39 | 40 | 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /Api.loja/Controllers/Admin/AuthenticationController.cs: -------------------------------------------------------------------------------- 1 | using Api.loja.Contracts; 2 | using Api.loja.Service; 3 | using Microsoft.AspNetCore.Authorization; 4 | using Microsoft.AspNetCore.Mvc; 5 | using static Api.loja.Contracts.AuthenticationContract; 6 | namespace Api.loja.Controllers.Admin 7 | { 8 | [Route("api/Admin/Authentication/[action]")] 9 | [ApiController] 10 | public class AuthenticationController : BaseController 11 | { 12 | private readonly AuthenticationApplicationService _service; 13 | public AuthenticationController(ILogger logger , AuthenticationApplicationService service ) : base(logger) 14 | { 15 | _service = service; 16 | } 17 | [HttpPost] 18 | [ProducesResponseType(StatusCodes.Status200OK)] 19 | [ProducesResponseType(StatusCodes.Status400BadRequest)] 20 | [ProducesResponseType(StatusCodes.Status500InternalServerError)] 21 | public async Task Login(V1.Request.LoginRequest login) 22 | => await HandleRequest(new V1.Request.LoginRequestContext(login, HttpContext.Request.HttpContext.Connection.RemoteIpAddress , HttpContext ), _service.Handle); 23 | 24 | [HttpGet] 25 | [Authorize] 26 | [ProducesResponseType(StatusCodes.Status200OK)] 27 | public async Task GetUserInfo() 28 | => await HandleRequest(new V1.Request.GetUserInfo(HttpContext), _service.Handle); 29 | 30 | } 31 | } -------------------------------------------------------------------------------- /Api.loja/Controllers/Utility/UploadController.cs: -------------------------------------------------------------------------------- 1 |  2 | using Api.loja.Service; 3 | using Microsoft.AspNetCore.Authorization; 4 | using Microsoft.AspNetCore.Mvc; 5 | using static Api.loja.Contracts.UploadContract.V1; 6 | namespace Api.loja.Controllers.Utility 7 | { 8 | [Route("api/Utility/[action]")] 9 | [ApiController] 10 | [Authorize] 11 | public class UploadController : BaseController 12 | { 13 | private readonly UploadApplicationService _service; 14 | public UploadController(ILogger logger ,UploadApplicationService service) : base(logger) 15 | { 16 | _service = service; 17 | } 18 | [HttpPost] 19 | public Task UploadFile(IFormFile file ) => HandleRequest(new UploadFile(file , HttpContext.Request), _service.Handle); 20 | [HttpPost] 21 | public Task UploadMultipleFiles(IFormFileCollection files) => HandleRequest(new UploadMultipleFiles(HttpContext.Request.Form.Files, HttpContext.Request), _service.Handle); 22 | 23 | } 24 | 25 | 26 | } 27 | -------------------------------------------------------------------------------- /Api.loja/Middleware/AuthenticationMiddleware.cs: -------------------------------------------------------------------------------- 1 | namespace Api.loja.Middleware 2 | { 3 | public class AuthenticationMiddleware 4 | { 5 | 6 | private readonly RequestDelegate _next; 7 | public AuthenticationMiddleware(RequestDelegate next) 8 | { 9 | _next = next; 10 | } 11 | public async Task InvokeAsync(HttpContext context) 12 | { 13 | // Custom logic to be executed before the next middleware 14 | // … 15 | await _next(context); 16 | // Custom logic to be executed after the next middleware 17 | // … 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Api.loja/Program.cs: -------------------------------------------------------------------------------- 1 | using System.Security.Authentication; 2 | 3 | namespace Api.loja 4 | { 5 | public class Program 6 | { 7 | public static void Main(string[] args) 8 | { 9 | CreateHostBuilder(args).Build().Run(); 10 | } 11 | public static IHostBuilder CreateHostBuilder(string[] args) => 12 | Host.CreateDefaultBuilder(args) 13 | .ConfigureWebHostDefaults(webBuilder => 14 | { 15 | webBuilder 16 | .UseStartup(); 17 | }); 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /Api.loja/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "profiles": { 3 | "http": { 4 | "commandName": "Project", 5 | "launchBrowser": true, 6 | "launchUrl": "swagger", 7 | "environmentVariables": { 8 | "ASPNETCORE_ENVIRONMENT": "Development", 9 | "ASPNETCORE_HOSTINGSTARTUPASSEMBLIES": "Microsoft.AspNetCore.SpaProxy" 10 | }, 11 | "dotnetRunMessages": true, 12 | "applicationUrl": "http://localhost:5556" 13 | }, 14 | "https": { 15 | "commandName": "Project", 16 | "launchBrowser": true, 17 | "launchUrl": "swagger", 18 | "environmentVariables": { 19 | "ASPNETCORE_ENVIRONMENT": "Development", 20 | "ASPNETCORE_HOSTINGSTARTUPASSEMBLIES": "Microsoft.AspNetCore.SpaProxy" 21 | }, 22 | "dotnetRunMessages": true, 23 | "applicationUrl": "https://localhost:7179;http://localhost:5232" 24 | }, 25 | "IIS Express": { 26 | "commandName": "IISExpress", 27 | "launchBrowser": true, 28 | "launchUrl": "swagger", 29 | "environmentVariables": { 30 | "ASPNETCORE_ENVIRONMENT": "Development", 31 | "ASPNETCORE_HOSTINGSTARTUPASSEMBLIES": "Microsoft.AspNetCore.SpaProxy" 32 | } 33 | } 34 | }, 35 | "$schema": "http://json.schemastore.org/launchsettings.json", 36 | "iisSettings": { 37 | "windowsAuthentication": true, 38 | "anonymousAuthentication": true, 39 | "iisExpress": { 40 | "applicationUrl": "http://localhost:34373", 41 | "sslPort": 0 42 | } 43 | } 44 | } -------------------------------------------------------------------------------- /Api.loja/Service/ProductManagerApplicationService.cs: -------------------------------------------------------------------------------- 1 | using Api.loja.Data; 2 | using Dominio.loja.Events.Authentication; 3 | using Framework.loja.Interfaces; 4 | 5 | namespace Api.loja.Service 6 | { 7 | public class ProductManagerApplicationService : IApplicationService 8 | { 9 | private readonly StoreContext _context; 10 | public ProductManagerApplicationService(StoreContext context) 11 | { 12 | _context = context; 13 | } 14 | 15 | public async Task Handle(object command) 16 | { 17 | throw new NotImplementedException(); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Api.loja/Service/UsersApplicationServices.cs: -------------------------------------------------------------------------------- 1 | using Api.loja.Data; 2 | using Framework.loja.Interfaces; 3 | using static Api.loja.Contracts.UsersContract; 4 | 5 | 6 | namespace Api.loja.Service 7 | { 8 | public class UsersApplicationServices : IApplicationService 9 | { 10 | private readonly StoreContext _context; 11 | private readonly IConfiguration _configuration; 12 | public UsersApplicationServices(IConfiguration configuration, StoreContext context) 13 | { 14 | _configuration = configuration; 15 | _context = context; 16 | } 17 | 18 | public async Task Handle(object command) => command switch 19 | { 20 | V1.Requests.GetUsuariosById cmd => GetUsers(cmd), 21 | _ => throw new InvalidOperationException("") 22 | }; 23 | 24 | private V1.Responses.Clients GetUsers(V1.Requests.GetUsuariosById cmd) 25 | { 26 | if (!_context.clients.Any()) 27 | throw new Exception(); 28 | 29 | var client = _context.clients.First(x => x.Id == cmd.id); 30 | V1.Responses.Clients result = new(client.Id 31 | , client.FirstName 32 | , client.LastName 33 | , client.Email 34 | , client.Address 35 | , client.Updated_at 36 | , client.Created_at ); 37 | return result; 38 | } 39 | 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /Api.loja/VueApp1.Server.http: -------------------------------------------------------------------------------- 1 | @Loja.Api.Server_HostAddress = http://localhost:5556/Api 2 | 3 | GET {{Loja.Api.Server_HostAddress}}/Admin/Store/Categories/GetCategories/ 4 | Accept: application/json 5 | 6 | ### 7 | -------------------------------------------------------------------------------- /Api.loja/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | }, 8 | "AllowedHosts": "*", 9 | "ConnectionString": "Server=MWALTR;Database=loja;Trusted_Connection=True;TrustServerCertificate=True;User Id=sa;Password=123", 10 | "TokenConfigurations": { 11 | "Audience": "ExemploAudience", 12 | "Issuer": "ExemploIssuer", 13 | "Seconds": 60 14 | }, 15 | "Jwt": { 16 | "Key": "YourSecretKeyForAuthenticationOfApplication", 17 | "Issuer": "youtCompanyIssuer.com" 18 | }, 19 | "GoogleReCaptcha": { 20 | "SiteKey_v2": "6Lf2cGApAAAAAJecxprIb3ptQtOm6w14xRTucgyO", 21 | "Secret_v2": "6Lf2cGApAAAAACPbapgqg6_tz3afb1uic-wKRbe4", 22 | "SiteKey_v3": "6LfwaHcqAAAAAFg3D1hd3rjmxzEphJcW7voZO6fO", 23 | "Secret_v3": "6LfwaHcqAAAAAMDOo1APWHbRNfPy3Vfhzj3pe4GX" 24 | }, 25 | "Authentication": { 26 | "Google": { 27 | "ClientId": "1091504502849-ls52u56dilc2860uihi7s316uqsr4evf.apps.googleusercontent.com", 28 | "ClientSecret": "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" 29 | }, 30 | "Facebook": { 31 | "AppId": "291069490645869", 32 | "AppSecret": "c58cebceefc04689374f482280850fb9" 33 | }, 34 | "Twitter": { 35 | "ConsumerKey": "NDZQRThrTnR4S0MzWVpmSVJuQkU6MTpjaQ", 36 | "ConsumerSecret": "O-KycvUfO3I5sC4KBOzq_W_PZRYCg6YbNCbUCZPNRmQE3JYpdZ" 37 | } 38 | 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /Api.loja/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | }, 8 | "AllowedHosts": "*", 9 | "ConnectionString": "Server=MWALTR;Database=loja;Trusted_Connection=True;TrustServerCertificate=True;User Id=sa;Password=123", 10 | "TokenConfigurations": { 11 | "Audience": "ExemploAudience", 12 | "Issuer": "ExemploIssuer", 13 | "Seconds": 60 14 | }, 15 | "Jwt": { 16 | "Key": "YourSecretKeyForAuthenticationOfApplication", 17 | "Issuer": "youtCompanyIssuer.com" 18 | }, 19 | "GoogleReCaptcha": { 20 | "SiteKey_v2": "6Lf2cGApAAAAAJecxprIb3ptQtOm6w14xRTucgyO", 21 | "Secret_v2": "6Lf2cGApAAAAACPbapgqg6_tz3afb1uic-wKRbe4", 22 | "SiteKey_v3": "6Lf9cGApAAAAANTZFOZgMamei1LobSMF85aKfMih", 23 | "Secret_v3": "6Lf9cGApAAAAAApcaOFDTqq_Y7YBAToW-YxcBRF_" 24 | }, 25 | "Authentication": { 26 | "Google": { 27 | "ClientId": "1091504502849-ls52u56dilc2860uihi7s316uqsr4evf.apps.googleusercontent.com", 28 | "ClientSecret": "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" 29 | }, 30 | "Facebook": { 31 | "AppId": "291069490645869", 32 | "AppSecret": "c58cebceefc04689374f482280850fb9" 33 | }, 34 | "Twitter": { 35 | "ConsumerKey": "NDZQRThrTnR4S0MzWVpmSVJuQkU6MTpjaQ", 36 | "ConsumerSecret": "O-KycvUfO3I5sC4KBOzq_W_PZRYCg6YbNCbUCZPNRmQE3JYpdZ" 37 | } 38 | 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /Dominio.loja/Attributes/ValidatePermissionAttribute.cs: -------------------------------------------------------------------------------- 1 |  2 | namespace Dominio.loja.Attributes 3 | { 4 | [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = false)] 5 | public sealed class ValidatePermissionAttribute : Attribute 6 | { 7 | 8 | public ValidatePermissionAttribute(string permission) 9 | { 10 | 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Dominio.loja/Dominio.loja.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net8.0 5 | enable 6 | enable 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Dominio.loja/Dto/Models/ExcelImportProducts.cs: -------------------------------------------------------------------------------- 1 | using Dominio.loja.Enums; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.ComponentModel.DataAnnotations; 5 | using System.Linq; 6 | using System.Text; 7 | using System.Threading.Tasks; 8 | using Dominio.loja.Attributes; 9 | namespace Dominio.loja.Dto.Models 10 | { 11 | public class ExcelImportProducts 12 | { 13 | [ExcelValidationAttributes(ExcelValidation.IsNumber , null)] 14 | public string ID_Products { get; set; } 15 | 16 | 17 | [ExcelValidationAttributes(ExcelValidation.StringLength, 1 ,2 )] 18 | public string Name { get; set; } 19 | 20 | 21 | [ExcelValidationAttributes(ExcelValidation.Required)] 22 | [ExcelValidationAttributes(ExcelValidation.StringLength, 1 , 60)] 23 | [ExcelValidationAttributes(ExcelValidation.CustomSheetField , "Description of product")] 24 | public string Description { get; set; } 25 | 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Dominio.loja/Dto/Models/ExcelValidatedCell.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Dominio.loja.Dto.Models 8 | { 9 | public class ExcelValidatedCell 10 | { 11 | public Tuple Validation { get; set; } 12 | public string? Value { get; set; } 13 | public string? ErrorMessage { get { return !Validation.Item1 ? Validation.Item2 : null; } } 14 | public bool isValid { get { return Validation.Item1; } } 15 | public ExcelValidatedCell(string value ) 16 | { 17 | Validation = new Tuple(true, ""); 18 | Value = value; 19 | } 20 | 21 | public ExcelValidatedCell( string value , Tuple validation ) 22 | { 23 | Validation = validation; 24 | Value = value; 25 | } 26 | public void AddValidation(Tuple validation ) 27 | { 28 | Validation = new Tuple (Validation.Item1 == validation.Item1 , String.Concat(Validation.Item2 , validation.Item2) ); 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /Dominio.loja/Dto/Models/ExcelValidatedRow.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Reflection.Metadata.Ecma335; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace Dominio.loja.Dto.Models 9 | { 10 | public class ExcelValidatedRow 11 | { 12 | List excelValidatedList { get; set; } 13 | public bool isValid { get { return excelValidatedList.Where(x => x.isValid == false).Count() == 0; } } 14 | 15 | public ExcelValidatedRow(List list ) 16 | { 17 | excelValidatedList = list; 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Dominio.loja/Dto/Models/ResponseModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Dominio.loja.Dto.Models 8 | { 9 | public class ResponseModel 10 | { 11 | private dynamic Data { get; set; } 12 | private string Message { get; set; } 13 | private int RowCount { get; set; } = 0; 14 | private bool Success { get; set; } 15 | public ResponseModel(int save) 16 | { 17 | Success = save>0 ? true : false; 18 | RowCount = save; 19 | Message = $"Total de registros modificados{save}"; 20 | } 21 | public ResponseModel( bool sucesso , dynamic data, string message) 22 | { 23 | Data = data; 24 | Message = message; 25 | Success = sucesso; 26 | } 27 | public ResponseModel(bool sucesso, dynamic data) 28 | { 29 | Data = data; 30 | Success = sucesso; 31 | } 32 | public ResponseModel(bool sucesso, string message) 33 | { 34 | Message = message; 35 | Success = sucesso; 36 | } 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /Dominio.loja/Dto/RabbitMQ/UploadQueueRequest.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Http; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace Dominio.loja.Dto.RabbitMQ 9 | { 10 | public class UploadQueueRequest 11 | { 12 | public string FileName { get; set; } 13 | public string FilePath { get; set; } 14 | public long Length { get; set; } 15 | public DateTime CreateAt { get; set; } 16 | public DateTime UpadtedAt { get; set; } 17 | public UploadQueueRequest(IFormFile formFile, FileInfo fileInfo) 18 | { 19 | FileName = formFile.FileName; 20 | FilePath = fileInfo.FullName; 21 | Length = formFile.Length; 22 | CreateAt = fileInfo.CreationTimeUtc; 23 | UpadtedAt = fileInfo.LastWriteTimeUtc; 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Dominio.loja/Entity/Categories.cs: -------------------------------------------------------------------------------- 1 | using Dominio.loja.Entity.Integrations.WFileManager; 2 | using Dominio.loja.Events.Praedicamenta; 3 | using Framework.loja; 4 | using Framework.loja.CustomAttributes; 5 | using System.ComponentModel.DataAnnotations; 6 | using System.ComponentModel.DataAnnotations.Schema; 7 | 8 | namespace Dominio.loja.Entity 9 | { 10 | [Table("categories")] 11 | public class Categories : Entity 12 | { 13 | 14 | [FirstLetterUppercase("")] 15 | public string Name { get; set; } 16 | [StringLength(2048)] 17 | public string? Description { get; set; } 18 | 19 | public Categories(Action applier) :base(applier) 20 | { 21 | } 22 | public Categories() { } 23 | 24 | protected override void When(object @event) 25 | { 26 | switch (@event) 27 | { 28 | case PraedicamentaEvents.CreateCategory e: 29 | Name = e.Name; 30 | Description = e.Description; 31 | Created_at = DateTime.Now; 32 | break; 33 | case PraedicamentaEvents.UpdateCategory e: 34 | Name = e.name; 35 | Description = e.description; 36 | Updated_at = DateTime.Now; 37 | break; 38 | default: throw new NotImplementedException(); 39 | } 40 | 41 | } 42 | } 43 | 44 | 45 | } 46 | -------------------------------------------------------------------------------- /Dominio.loja/Entity/CategoriesPromotion.cs: -------------------------------------------------------------------------------- 1 | using Framework.loja; 2 | using System.ComponentModel.DataAnnotations; 3 | using System.ComponentModel.DataAnnotations.Schema; 4 | using System.Diagnostics; 5 | 6 | namespace Dominio.loja.Entity 7 | { 8 | [Table("categoriesPromotion")] 9 | public class CategoriesPromotion : Entity 10 | { 11 | 12 | [ForeignKey("CateogoriesId")] 13 | public int CategoriesId { get; set; } 14 | public int DisplayOrder { get; set; } 15 | 16 | public bool isActive { get; set; } 17 | public virtual Categories Categories { get; set; } 18 | public virtual ICollection ProductsCategories { get; set; } 19 | 20 | protected override void When(object @event) 21 | { 22 | throw new NotImplementedException(); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Dominio.loja/Entity/Clients.cs: -------------------------------------------------------------------------------- 1 | using Framework.loja; 2 | using System.ComponentModel.DataAnnotations; 3 | using System.ComponentModel.DataAnnotations.Schema; 4 | 5 | 6 | namespace Dominio.loja.Entity 7 | { 8 | [Table("clients")] 9 | public class Clients : Entity 10 | { 11 | 12 | 13 | [StringLength(120)] 14 | public string Email { get; set; } 15 | 16 | [StringLength(30)] 17 | public string Password { get; set; } 18 | [ForeignKey("PermissionsGroupId")] 19 | public int PermissionsGroupId { get; set; } 20 | [Required] 21 | [StringLength(60)] 22 | public string FirstName { get; set; } 23 | [Required] 24 | [StringLength(60)] 25 | public string LastName { get; set; } 26 | [Required] 27 | [StringLength(250)] 28 | public string Address { get; set; } 29 | [StringLength(20)] 30 | public string PhoneNumber { get; set; } 31 | 32 | public virtual PermissionsGroup? PermissionsGroup { get; set; } 33 | protected override void When(object @event) 34 | { 35 | throw new NotImplementedException(); 36 | } 37 | } 38 | } -------------------------------------------------------------------------------- /Dominio.loja/Entity/ClientsProductsCart.cs: -------------------------------------------------------------------------------- 1 | using Framework.loja; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.ComponentModel.DataAnnotations; 5 | using System.ComponentModel.DataAnnotations.Schema; 6 | 7 | namespace Dominio.loja.Entity 8 | { 9 | [Table("clientsProductsCart")] 10 | public class ClientsProductsCart : Entity 11 | { 12 | 13 | public int Quantity { get;set;} 14 | 15 | public bool IsActive { get;set;} 16 | 17 | [ForeignKey("ProductsId")] 18 | public int ProductsId { get; set; } 19 | [ForeignKey("ClientsId")] 20 | public int ClientsId { get; set; } 21 | 22 | public virtual Products Products { get; set; } 23 | 24 | 25 | protected override void When(object @event) 26 | { 27 | throw new NotImplementedException(); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Dominio.loja/Entity/Integrations/WFileManager/FileDirectory.cs: -------------------------------------------------------------------------------- 1 |  using Dominio.loja.Events.FileUpload; 2 | using Framework.loja; 3 | using System.ComponentModel.DataAnnotations; 4 | using System.ComponentModel.DataAnnotations.Schema; 5 | 6 | namespace Dominio.loja.Entity.Integrations.WFileManager 7 | { 8 | [Table("FileDirectory")] 9 | public class FileDirectory : Entity 10 | { 11 | [Required] 12 | public string DirectoryName { get; set; } 13 | /// 14 | /// Upload EndPoint Reference 15 | /// 16 | [Required] 17 | public string Referer { get; set; } 18 | 19 | public virtual DirectoryRestriction? Restriction { get; set; } 20 | 21 | public FileDirectory(Action applier) : base(applier) 22 | { 23 | 24 | } 25 | public FileDirectory() { } 26 | 27 | protected override void When(object @event) 28 | { 29 | 30 | } 31 | 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Dominio.loja/Entity/Integrations/WFileManager/FileRelation.cs: -------------------------------------------------------------------------------- 1 | using Dominio.loja.Events.FileUpload; 2 | using Framework.loja; 3 | using System.ComponentModel.DataAnnotations.Schema; 4 | 5 | namespace Dominio.loja.Entity.Integrations.WFileManager 6 | { 7 | [NotMapped] 8 | public abstract class FileRelation : Entity 9 | { 10 | [ForeignKey("FileStorageId")] 11 | public Guid FileStorageId { get; set; } 12 | public virtual FileStorage FileStorage { get; set; } 13 | public FileRelation() { } 14 | 15 | public FileRelation(FileStorage file) 16 | { 17 | FileStorage = file; 18 | FileStorageId = file.Id; 19 | Created_at = DateTime.Now; 20 | } 21 | 22 | protected override void When(object @event) 23 | { 24 | throw new NotImplementedException(); 25 | } 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /Dominio.loja/Entity/Integrations/WFileManager/Relation/FileCategories.cs: -------------------------------------------------------------------------------- 1 |  2 | using Dominio.loja.Events.FileUpload; 3 | using System.ComponentModel.DataAnnotations.Schema; 4 | 5 | namespace Dominio.loja.Entity.Integrations.WFileManager.Relation 6 | { 7 | [Table("FileCategories")] 8 | public class FileCategories : FileRelation 9 | { 10 | [ForeignKey("CategoryId")] 11 | public int CategoriesId { get; set; } 12 | public virtual Categories Category { get; set; } 13 | public FileCategories() { } 14 | 15 | public FileCategories(FileStorage file, int categoryId ) : base(file) 16 | { 17 | CategoriesId = categoryId; 18 | } 19 | 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Dominio.loja/Entity/Permissions.cs: -------------------------------------------------------------------------------- 1 | using Framework.loja; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.ComponentModel.DataAnnotations; 5 | using System.ComponentModel.DataAnnotations.Schema; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Threading.Tasks; 9 | 10 | namespace Dominio.loja.Entity 11 | { 12 | [Table("permissions")] 13 | public class Permissions : Entity 14 | { 15 | 16 | 17 | [StringLength(255)] 18 | public string Name { get; set; } 19 | 20 | protected override void When(object @event) 21 | { 22 | throw new NotImplementedException(); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Dominio.loja/Entity/PermissionsGroup.cs: -------------------------------------------------------------------------------- 1 | using Framework.loja; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.ComponentModel.DataAnnotations; 5 | using System.ComponentModel.DataAnnotations.Schema; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Threading.Tasks; 9 | 10 | namespace Dominio.loja.Entity 11 | { 12 | [Table("permissionsGroup")] 13 | public class PermissionsGroup : Entity 14 | { 15 | 16 | 17 | [StringLength(255)] 18 | public string Name { get; set; } 19 | 20 | public virtual ICollection PermissionsRelations { get; set; } 21 | 22 | protected override void When(object @event) 23 | { 24 | throw new NotImplementedException(); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Dominio.loja/Entity/PermissionsRelation.cs: -------------------------------------------------------------------------------- 1 | using Framework.loja; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.ComponentModel.DataAnnotations; 5 | using System.ComponentModel.DataAnnotations.Schema; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Threading.Tasks; 9 | 10 | namespace Dominio.loja.Entity 11 | { 12 | [Table("permissionsRelation")] 13 | public class PermissionsRelation : Entity 14 | { 15 | [ForeignKey("PermissionsGroupId")] 16 | public int PermissionsGroupId { get; set; } 17 | [ForeignKey("PermissionsId")] 18 | public int PermissionsId { get; set; } 19 | public virtual Permissions Permissions { get; set; } 20 | protected override void When(object @event) 21 | { 22 | throw new NotImplementedException(); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Dominio.loja/Entity/Prices.cs: -------------------------------------------------------------------------------- 1 | using Framework.loja; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.ComponentModel.DataAnnotations; 5 | using System.ComponentModel.DataAnnotations.Schema; 6 | using System.Data.SqlTypes; 7 | using System.Linq; 8 | using System.Runtime.CompilerServices; 9 | using System.Text; 10 | using System.Threading.Tasks; 11 | 12 | namespace Dominio.loja.Entity 13 | { 14 | [Table("prices")] 15 | public class Prices : Entity 16 | { 17 | 18 | [Column("Price", TypeName = "money")] 19 | public decimal Price { get; set; } 20 | [StringLength(1024)] 21 | public string? Description { get; set; } 22 | protected override void When(object @event) 23 | { 24 | throw new NotImplementedException(); 25 | } 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /Dominio.loja/Entity/Products.cs: -------------------------------------------------------------------------------- 1 | using Dominio.loja.Entity.Integrations.WFileManager; 2 | using Framework.loja; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.ComponentModel.DataAnnotations; 6 | using System.ComponentModel.DataAnnotations.Schema; 7 | using System.Linq; 8 | using System.Text; 9 | using System.Threading.Tasks; 10 | 11 | namespace Dominio.loja.Entity 12 | { 13 | [Table("products")] 14 | public class Products : Entity 15 | { 16 | 17 | [StringLength(255)] 18 | public string Name { get; set; } 19 | [StringLength(2048)] 20 | public string? Description { get; set; } 21 | 22 | public long? Ean { get; set; } 23 | [StringLength(64)] 24 | public string? Sku { get; set; } 25 | public virtual ICollection ProductsPrices { get; set; } 26 | public virtual ProductsStorage ProductsStorage { get; set; } 27 | public virtual ProductsCategories ProductsCategories { get; set; } 28 | public virtual ProductsSubCategories ProductsSubCategories { get; set; } 29 | public virtual ProductsSubSubCategories ProductsSubSubCategories { get; set; } 30 | 31 | protected override void When(object @event) 32 | { 33 | throw new NotImplementedException(); 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /Dominio.loja/Entity/ProductsCategories.cs: -------------------------------------------------------------------------------- 1 | using Framework.loja; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.ComponentModel.DataAnnotations; 5 | using System.ComponentModel.DataAnnotations.Schema; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Threading.Tasks; 9 | 10 | namespace Dominio.loja.Entity 11 | { 12 | [Table("productsCategories")] 13 | public class ProductsCategories : Entity 14 | { 15 | 16 | [ForeignKey("ProductsId")] 17 | public int ProductsId { get; set; } 18 | [ForeignKey("CateogoriesId")] 19 | public int CategoriesId { get; set; } 20 | public virtual Products Products { get; set; } 21 | protected override void When(object @event) 22 | { 23 | throw new NotImplementedException(); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Dominio.loja/Entity/ProductsPrices.cs: -------------------------------------------------------------------------------- 1 | using Framework.loja; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.ComponentModel.DataAnnotations; 5 | using System.ComponentModel.DataAnnotations.Schema; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Threading.Tasks; 9 | 10 | namespace Dominio.loja.Entity 11 | { 12 | [Table("productsPrices")] 13 | public class ProductsPrices : Entity 14 | { 15 | 16 | [ForeignKey("ProductsId")] 17 | public int ProductsId { get; set; } 18 | [ForeignKey("PricesId")] 19 | public int PricesId { get;set; } 20 | protected override void When(object @event) 21 | { 22 | throw new NotImplementedException(); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Dominio.loja/Entity/ProductsStorage.cs: -------------------------------------------------------------------------------- 1 | using Framework.loja; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.ComponentModel.DataAnnotations; 5 | using System.ComponentModel.DataAnnotations.Schema; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Threading.Tasks; 9 | 10 | namespace Dominio.loja.Entity 11 | { 12 | [Table("productsStorage")] 13 | public class ProductsStorage : Entity 14 | { 15 | public int Quantity { get; set; } 16 | [StringLength(255)] 17 | public string Description { get; set; } 18 | 19 | [ForeignKey("ProductsId")] 20 | public int ProductsId { get; set; } 21 | protected override void When(object @event) 22 | { 23 | throw new NotImplementedException(); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Dominio.loja/Entity/ProductsSubCategories.cs: -------------------------------------------------------------------------------- 1 | using Framework.loja; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.ComponentModel.DataAnnotations; 5 | using System.ComponentModel.DataAnnotations.Schema; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Threading.Tasks; 9 | 10 | namespace Dominio.loja.Entity 11 | { 12 | [Table("ProductsSubCategories")] 13 | public class ProductsSubCategories : Entity 14 | { 15 | 16 | public int ProductsId { get; set; } 17 | public int SubCategoriesId { get; set; } 18 | protected override void When(object @event) 19 | { 20 | throw new NotImplementedException(); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Dominio.loja/Entity/ProductsSubSubCategories.cs: -------------------------------------------------------------------------------- 1 | using Framework.loja; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.ComponentModel.DataAnnotations.Schema; 5 | using System.Linq; 6 | using System.Text; 7 | using System.Threading.Tasks; 8 | 9 | namespace Dominio.loja.Entity 10 | { 11 | [Table("ProductsSubSubCategories")] 12 | public class ProductsSubSubCategories : Entity 13 | { 14 | public int SubSubCategoriesId { get; set; } 15 | public int ProductsId { get; set; } 16 | protected override void When(object @event) 17 | { 18 | throw new NotImplementedException(); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Dominio.loja/Entity/RequestOrders.cs: -------------------------------------------------------------------------------- 1 | using Framework.loja; 2 | using System.ComponentModel.DataAnnotations; 3 | 4 | namespace Dominio.loja.Entity 5 | { 6 | public class RequestOrders : Entity 7 | { 8 | 9 | [StringLength(2048)] 10 | public string Description { get; set; } 11 | public int ClientsId { get; set; } 12 | public virtual ICollection RequestOrdersProducts { get; set; } 13 | protected override void When(object @event) 14 | { 15 | throw new NotImplementedException(); 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Dominio.loja/Entity/RequestOrdersProducts.cs: -------------------------------------------------------------------------------- 1 | using Framework.loja; 2 | using System.ComponentModel.DataAnnotations.Schema; 3 | 4 | namespace Dominio.loja.Entity 5 | { 6 | [Table("RequestOrdersProducts")] 7 | public class RequestOrdersProducts : Entity 8 | { 9 | 10 | [ForeignKey("RequestOrdersId")] 11 | public int RequestOrdersId { get; set; } 12 | [ForeignKey("ProductsId")] 13 | public int ProductsId { get; set; } 14 | public int Quantity { get; set; } 15 | public virtual Products Products { get; set; } 16 | protected override void When(object @event) 17 | { 18 | throw new NotImplementedException(); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Dominio.loja/Entity/SubCategoriesProducts.cs: -------------------------------------------------------------------------------- 1 | using Framework.loja; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace Dominio.loja.Entity 9 | { 10 | public class SubCategoriesProducts : Entity 11 | { 12 | public int ProductsId { get; set; } 13 | public int SubCategoriesId { get; set; } 14 | 15 | 16 | protected override void When(object @event) 17 | { 18 | throw new NotImplementedException(); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Dominio.loja/Entity/SubSubCategories.cs: -------------------------------------------------------------------------------- 1 | using Dominio.loja.Events.Praedicamenta; 2 | using Framework.loja; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Linq; 6 | using System.Reflection; 7 | using System.Text; 8 | using System.Threading.Tasks; 9 | 10 | namespace Dominio.loja.Entity 11 | { 12 | public class SubSubCategories : Entity 13 | { 14 | public int SubCategoriesId { get; set; } 15 | public string Name { get; set; } 16 | public string Description { get; set; } 17 | public virtual SubCategories SubCategories { get; set; } 18 | 19 | public SubSubCategories(Action applier) :base(applier){ } 20 | public SubSubCategories() { } 21 | protected override void When(object @event) 22 | { 23 | switch (@event) 24 | { 25 | case PraedicamentaEvents.CreateSubSubCategory c: 26 | Name = c.Name; 27 | Description = c.Description; 28 | SubCategoriesId = c.SubCategory.Id ?? throw new ArgumentNullException(nameof(c.SubCategory.Id)); 29 | Created_at = DateTime.Now; 30 | break; 31 | case PraedicamentaEvents.UpdateSubSubCategory c: 32 | Name = c.name; 33 | Description = c.description; 34 | Updated_at = DateTime.Now; 35 | break; 36 | default: throw new NotImplementedException(); 37 | } 38 | 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /Dominio.loja/Enums/DateTimeFormatValidation.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Dominio.loja.Enums 8 | { 9 | public enum DateTimeFormatValidation 10 | { 11 | mmddyyyy = 0, 12 | ddmmyyyy = 1, 13 | mmddyyyyHHMMSS = 2, 14 | ddmmyyyyHHMMSS = 3 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Dominio.loja/Enums/DirectoryType.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Dominio.loja.Enums 8 | { 9 | public enum DirectoryType 10 | { 11 | ImagesDimensionRestriction , 12 | Documents , 13 | Images , 14 | Videos , 15 | 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Dominio.loja/Enums/ExcelValidation.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Dominio.loja.Enums 8 | { 9 | public enum ExcelValidation 10 | { 11 | StringLength=0, 12 | DateTimeFormat=1, 13 | IsNumber=3, 14 | StringContains=4, 15 | StringValidationMethod=5, 16 | Required=6, 17 | CustomSheetField=7, 18 | 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Dominio.loja/Enums/FilterOrder.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Dominio.loja.Enums 8 | { 9 | public enum FilterOrder 10 | { 11 | Ascending, 12 | Descending 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Dominio.loja/Events/Clients/ClientPermission.cs: -------------------------------------------------------------------------------- 1 | using Framework.loja; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace Dominio.loja.Events.ClientsPermission 9 | { 10 | public class ClientPermission : AggregateRoot 11 | { 12 | public ClientPermission (object @event) 13 | { 14 | Apply(@event); 15 | } 16 | protected override void EnsureValidState() 17 | { 18 | throw new NotImplementedException(); 19 | } 20 | 21 | protected override void When(object @event) 22 | { 23 | switch(@event) 24 | { 25 | 26 | } 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Dominio.loja/Events/Clients/ClientsEvents.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Dominio.loja.Events.Users 8 | { 9 | public class ClientsEvents 10 | { 11 | public record AddClientAdmin(); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Dominio.loja/Events/FileUpload/Doc.cs: -------------------------------------------------------------------------------- 1 | using Dominio.loja.Interfaces.Files; 2 | using Framework.loja.ExtensionMethods; 3 | using static Dominio.loja.Events.FileUpload.FileManagerEvents; 4 | 5 | 6 | namespace Dominio.loja.Events.FileUpload 7 | { 8 | public sealed class Doc : FileType , IFileTypeRestriction, IFileTypeProperty 9 | { 10 | public int MaxPages { get; set; } 11 | public int MinPages { get; set; } 12 | public int Pages { get; set; } 13 | 14 | public override string Type => typeof(Doc).Name; 15 | public Doc() { } 16 | 17 | public Doc(IFileTypeProperty ft) : base(ft.Value) 18 | { 19 | } 20 | public void IsValid(object ft , FileInfo fi) 21 | { 22 | Doc doc = (Doc)ft; 23 | if(Pages < MinPages) 24 | throw new ArgumentOutOfRangeException($"Maximun allowed pages is ${MinPages} and was sent ${Pages}"); 25 | 26 | if ( MaxPages > 0 && Pages > MaxPages) 27 | throw new ArgumentOutOfRangeException($"Maximun allowed pages is ${MaxPages} and was sent ${Pages}"); 28 | } 29 | 30 | public void SetFileProperty(object fp) 31 | { 32 | var pages = (FileProperties.Pages)fp; 33 | Pages = pages.pages; 34 | } 35 | 36 | public void Deserialize() 37 | { 38 | throw new NotImplementedException(); 39 | } 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /Dominio.loja/Events/FileUpload/Image.cs: -------------------------------------------------------------------------------- 1 | using Dominio.loja.Interfaces.Files; 2 | using static Dominio.loja.Events.FileUpload.FileManagerEvents.FileProperties; 3 | 4 | namespace Dominio.loja.Events.FileUpload 5 | { 6 | public sealed class Image : FileType , IFileTypeRestriction , IFileTypeProperty 7 | { 8 | public List Dimensions { get; set; } 9 | public override string Type { get => typeof(Image).Name; } 10 | public Image(IFileTypeProperty ft) : base (ft.Value) 11 | { 12 | 13 | } 14 | 15 | public Image() { } 16 | 17 | public void IsValid(object ft , FileInfo fi) 18 | { 19 | Image image = (Image)ft; 20 | if (!Dimensions.Any()) 21 | return; 22 | 23 | if (!image.Dimensions.Any(x => Dimensions.Any(t => t.height == x.height && t.width == x.width))) 24 | throw new BadImageFormatException("Image format is not valid"); 25 | } 26 | 27 | public void SetFileProperty(object fp ) 28 | { 29 | Dimensions = new(); 30 | var dim = (Dimensions)fp; 31 | 32 | Dimensions.Add(dim); 33 | } 34 | 35 | public void Deserialize() 36 | { 37 | throw new NotImplementedException(); 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /Dominio.loja/Events/FileUpload/Pdf.cs: -------------------------------------------------------------------------------- 1 | using Dominio.loja.Interfaces.Files; 2 | using static Dominio.loja.Events.FileUpload.FileManagerEvents.FileProperties; 3 | 4 | namespace Dominio.loja.Events.FileUpload 5 | { 6 | public sealed class Pdf : FileType, IFileTypeRestriction 7 | { 8 | private int Min { get; set; } 9 | private int Max { get; set; } 10 | public override string Type =>typeof(Pdf).Name; 11 | public int Pages { get; set; } 12 | private record FileProperty(int pages); 13 | 14 | public Pdf() { } 15 | 16 | public Pdf(IFileTypeProperty ft) : base(ft.Value) { } 17 | 18 | public void IsValid(object ft , FileInfo fi) 19 | { 20 | Pdf pdf = (Pdf)ft; 21 | if (Min < pdf.Pages) 22 | throw new ArgumentOutOfRangeException($"The document should have ({Min}) pages , but have {pdf.Pages}"); 23 | 24 | if (Max > 0 && pdf.Pages > Max) 25 | throw new ArgumentOutOfRangeException($"The document should have a maximum of ({Max}) pages , but have {pdf.Pages}"); 26 | } 27 | 28 | public void Deserialize() 29 | { 30 | throw new NotImplementedException(); 31 | } 32 | }; 33 | 34 | } 35 | -------------------------------------------------------------------------------- /Dominio.loja/Events/FileUpload/ValidExtensions.cs: -------------------------------------------------------------------------------- 1 |  2 | using Dominio.loja.Interfaces.Files; 3 | using static Dominio.loja.Events.FileUpload.FileManagerEvents.FileProperties; 4 | 5 | namespace Dominio.loja.Events.FileUpload 6 | { 7 | public class ValidExtensions : FileType , IFileTypeRestriction 8 | { 9 | public override string Type => typeof(ValidExtensions).Name; 10 | public List Extensions { get; set; } = new(); 11 | public ValidExtensions() { } 12 | public ValidExtensions(string value) : base(value) 13 | { 14 | } 15 | 16 | /// 17 | /// Must be validated with 18 | /// 19 | /// 20 | /// 21 | public void IsValid(object ft , FileInfo fi) 22 | { 23 | if (Extensions.Count() > 0 && !Extensions.Any(x => fi.Extension.ToLower().Contains(x.ToLower()))) 24 | throw new InvalidDataException("File extensions does not match"); 25 | } 26 | 27 | public void Deserialize() 28 | { 29 | throw new NotImplementedException(); 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /Dominio.loja/Events/Praedicamenta/PraedicamentaEvents.cs: -------------------------------------------------------------------------------- 1 | using Dominio.loja.Entity; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace Dominio.loja.Events.Praedicamenta 9 | { 10 | public class PraedicamentaEvents 11 | { 12 | public record class CreateCategory(string Name , string Description); 13 | public record class CreateSubCategory(Categories Category, string Name, string Description); 14 | public record class CreateSubSubCategory(SubCategories SubCategory, string Name, string Description); 15 | public record class UpdateSubSubCategory(int? Id, string name, string description); 16 | public record class UpdateSubCategory(int? Id, string name, string description); 17 | public record class UpdateCategory( int? Id, string name, string description); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Dominio.loja/Events/ProductManager/ProductManager.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Dominio.loja.Events.Products 8 | { 9 | public class ProductManager 10 | { 11 | 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Dominio.loja/Interfaces/Context/IAdminControllerContext.cs: -------------------------------------------------------------------------------- 1 | using Dominio.loja.Entity; 2 | using Microsoft.EntityFrameworkCore; 3 | 4 | namespace Dominio.loja.Interfaces.Context 5 | { 6 | public interface IAdminControllerContext 7 | { 8 | DbSet clients { get; set; } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Dominio.loja/Interfaces/Context/IAdminStoreCategoriesControllerContext.cs: -------------------------------------------------------------------------------- 1 | using Dominio.loja.Entity; 2 | using Microsoft.EntityFrameworkCore; 3 | 4 | namespace Dominio.loja.Interfaces.Context 5 | { 6 | public interface IAdminStoreCategoriesControllerContext: IDbContext 7 | { 8 | DbSet categories { get; set; } 9 | DbSet subCategories { get; set; } 10 | DbSet subSubCategories { get; set; } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Dominio.loja/Interfaces/Context/IDbContext.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore.ChangeTracking; 2 | 3 | namespace Dominio.loja.Interfaces.Context 4 | { 5 | public interface IDbContext 6 | { 7 | int SaveChanges(); 8 | Task SaveChangesAsync(bool acceptAllChangesOnSuccess, CancellationToken cancellationToken); 9 | EntityEntry Update(object entity); 10 | EntityEntry Remove(object entity); 11 | void Dispose(); 12 | ValueTask DisposeAsync(); 13 | Task AddRangeAsync(object[] entities); 14 | void AddRange(object[] entities); 15 | void RemoveRange(object[] entities); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Dominio.loja/Interfaces/Context/IInternalEventHandler.cs: -------------------------------------------------------------------------------- 1 | namespace Dominio.loja.Interfaces.Context 2 | { 3 | public interface IInternalEventHandler 4 | { 5 | void Handle(object @event); 6 | } 7 | } -------------------------------------------------------------------------------- /Dominio.loja/Interfaces/Context/IStoreClientsControllerContext.cs: -------------------------------------------------------------------------------- 1 | using Dominio.loja.Entity; 2 | using Microsoft.EntityFrameworkCore; 3 | 4 | 5 | namespace Dominio.loja.Interfaces.Context 6 | { 7 | public interface IStoreClientsControllerContext : IDbContext 8 | { 9 | DbSet clients { get; set; } 10 | DbSet products { get; set; } 11 | DbSet productsCategories { get; set; } 12 | DbSet productsPrices { get; set; } 13 | DbSet productsStorage { get; set; } 14 | DbSet categories { get; set; } 15 | DbSet prices { get; set; } 16 | DbSet clientsProducts_cart { get; set; } 17 | DbSet requestOrders { get; set; } 18 | DbSet requestOrdersProducts { get; set; } 19 | 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Dominio.loja/Interfaces/Context/IStoreControllerContext.cs: -------------------------------------------------------------------------------- 1 | using Dominio.loja.Entity; 2 | using Microsoft.EntityFrameworkCore; 3 | 4 | 5 | namespace Dominio.loja.Interfaces.Context 6 | { 7 | public interface IStoreControllerContext : IDbContext 8 | { 9 | DbSet clients { get; set; } 10 | 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Dominio.loja/Interfaces/Context/IStoreProductsControllerContext.cs: -------------------------------------------------------------------------------- 1 | using Dominio.loja.Entity; 2 | using Microsoft.EntityFrameworkCore; 3 | 4 | namespace Dominio.loja.Interfaces.Context 5 | { 6 | public interface IStoreProductsControllerContext :IDbContext 7 | { 8 | DbSet categories { get; set; } 9 | DbSet prices { get; set; } 10 | DbSet products { get; set; } 11 | DbSet categoriesPromotion { get; set; } 12 | DbSet productsCategories { get; set; } 13 | 14 | 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Dominio.loja/Interfaces/Files/IFileType.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Dominio.loja.Interfaces.Files 8 | { 9 | public interface IFileType 10 | { 11 | public void Deserialize(); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Dominio.loja/Interfaces/Files/IFileTypeProperty.cs: -------------------------------------------------------------------------------- 1 | using Dominio.loja.Events.FileUpload; 2 | using Microsoft.Extensions.Primitives; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Linq; 6 | using System.Text; 7 | using System.Threading.Tasks; 8 | 9 | namespace Dominio.loja.Interfaces.Files 10 | { 11 | public interface IFileTypeProperty : IFileType 12 | { 13 | void SetFileProperty(object fp); 14 | string Type { get; set; } 15 | string Value { get; set; } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Dominio.loja/Interfaces/Files/IFileTypeRestriction.cs: -------------------------------------------------------------------------------- 1 | using Dominio.loja.Events.FileUpload; 2 | using System.Text.Json.Serialization; 3 | using static Dominio.loja.Events.FileUpload.FileManagerEvents; 4 | 5 | namespace Dominio.loja.Interfaces.Files 6 | { 7 | public interface IFileTypeRestriction : IFileType 8 | { 9 | public void IsValid(object ft, FileInfo fi); 10 | public string Type { get; set; } 11 | public void SerializeFileProperties(); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Dominio.loja/Interfaces/IAuthentication.cs: -------------------------------------------------------------------------------- 1 | using Dominio.loja.Events.Authentication; 2 | 3 | namespace Dominio.loja.Interfaces 4 | { 5 | public interface IAuthentication 6 | { 7 | 8 | bool ValidateAuthentication(Authentication @e); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Framework.loja/AggregateRoot.cs: -------------------------------------------------------------------------------- 1 | using Framework.loja.Interfaces; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Security.Cryptography; 6 | using System.Text; 7 | using System.Threading.Tasks; 8 | 9 | namespace Framework.loja 10 | { 11 | public abstract class AggregateRoot : IInternalEventHandler 12 | { 13 | public TId Id { get; protected set; } 14 | 15 | protected abstract void When(object @event); 16 | 17 | private readonly List _changes; 18 | 19 | protected AggregateRoot() => _changes = new List(); 20 | 21 | protected void Apply(object @event) 22 | { 23 | When(@event); 24 | EnsureValidState(); 25 | _changes.Add(@event); 26 | } 27 | public IEnumerable GetChanges() => _changes.AsEnumerable(); 28 | 29 | public void ClearChanges() => _changes.Clear(); 30 | 31 | protected abstract void EnsureValidState(); 32 | 33 | protected void ApplyToEntity(IInternalEventHandler entity, object @event) 34 | => entity?.Handle(@event); 35 | public void Load(IEnumerable history) 36 | { 37 | foreach (var e in history) 38 | { 39 | When(e); 40 | } 41 | } 42 | 43 | void IInternalEventHandler.Handle(object @event) => When(@event); 44 | 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /Framework.loja/ControllerResponse.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Diagnostics; 4 | using System.Linq; 5 | using System.Net; 6 | using System.Text; 7 | using System.Threading.Tasks; 8 | 9 | namespace Framework.loja.Dto.Models 10 | { 11 | public class ControllerResponse where T : class 12 | { 13 | public HttpStatusCode StatusCode { get; set; } 14 | public T Response { get; set; } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Framework.loja/CustomAttributes/FirstLetterUpperCaseAttribute.cs: -------------------------------------------------------------------------------- 1 | using Framework.loja.Interfaces; 2 | using System.ComponentModel.DataAnnotations; 3 | using System.Text.RegularExpressions; 4 | 5 | 6 | namespace Framework.loja.CustomAttributes 7 | { 8 | [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter,AllowMultiple = false)] 9 | public class FirstLetterUppercaseAttribute : ValidationAttribute , IStringValidationAttribute 10 | { 11 | public string RegexPattern => "^$|^[A-Z]"; 12 | private string ErrorMessage { get; set; } 13 | public FirstLetterUppercaseAttribute(Func error) 14 | { 15 | 16 | } 17 | public FirstLetterUppercaseAttribute(string i ) : this(()=>i) 18 | { 19 | ErrorMessage = i; 20 | } 21 | public override bool IsValid(object value) => Regex.IsMatch(value.ToString(), RegexPattern); 22 | 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /Framework.loja/ExtensionMethods/ExtensionMethods.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Net.Mime; 3 | 4 | namespace Framework.loja.ExtensionMethods 5 | { 6 | public static class MyExtensions 7 | { 8 | public static bool PropertyValueExists(this object obj, string typeName, T typeValue) where T : class 9 | { 10 | var prop = obj.GetType().GetProperty(typeName)?.GetValue(obj); 11 | 12 | if( prop.GetType() == typeValue.GetType()) 13 | { 14 | return prop.Equals(typeValue); 15 | } 16 | return false; 17 | } 18 | public static object? GetPropertyValue(this object obj, string attributeName) 19 | => obj.GetType().GetProperty(attributeName)?.GetValue(obj); 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /Framework.loja/Framework.loja.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net8.0 5 | enable 6 | enable 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /Framework.loja/Interfaces/IApplicationService.cs: -------------------------------------------------------------------------------- 1 | using Framework.loja.Dto.Models; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace Framework.loja.Interfaces 9 | { 10 | public interface IApplicationService 11 | { 12 | Task Handle(object command); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Framework.loja/Interfaces/IInternalEventHandler.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Framework.loja.Interfaces 8 | { 9 | public interface IInternalEventHandler 10 | { 11 | void Handle(object command); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Framework.loja/Interfaces/IStringValidationAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Framework.loja.Interfaces 8 | { 9 | public interface IStringValidationAttribute 10 | { 11 | string RegexPattern { get; } 12 | 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Framework.loja/Interfaces/IUnitOfWork.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Framework.loja.Interfaces 8 | { 9 | public interface IUnitOfWork 10 | { 11 | Task Commit(); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Framework.loja/InvalidValueException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Framework.loja 8 | { 9 | public class InvalidValueException : Exception 10 | { 11 | public InvalidValueException(Type type, string message) : base($"Value of {type.Name} {message}") 12 | { 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Framework.loja/Utility/Files/ReadableFileLength.cs: -------------------------------------------------------------------------------- 1 |  2 | 3 | namespace Framwork.loja.Utility.Files 4 | { 5 | /// 6 | /// Converts number into human readable file size.

7 | /// (string)new ReadableFileLength(1000) //Output 1KB 8 | ///
9 | public class ReadableFileLength 10 | { 11 | public long SizeInBytes { get; private set; } 12 | 13 | public ReadableFileLength(long sizeInBytes) => SizeInBytes = sizeInBytes; 14 | public ReadableFileLength(int sizeInBytes) => SizeInBytes = sizeInBytes; 15 | 16 | 17 | public static implicit operator string(ReadableFileLength fileSize) 18 | { 19 | if ( fileSize.SizeInBytes < 1000) 20 | return $"{fileSize.SizeInBytes} Bytes"; 21 | else if (fileSize.SizeInBytes < 1000000) 22 | return $"{fileSize.SizeInBytes/1000} KB"; 23 | else if (fileSize.SizeInBytes < 1000000000) 24 | return $"{fileSize.SizeInBytes / 1000000} MB"; 25 | else 26 | return $"{fileSize.SizeInBytes / 1000000000} GB"; 27 | } 28 | 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /FrontEnd.loja_/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "testing.automaticallyOpenPeekView": "never" 3 | } -------------------------------------------------------------------------------- /FrontEnd.loja_/README.md: -------------------------------------------------------------------------------- 1 | # FrontEnd.loja 2 | 3 | ## Project setup 4 | ``` 5 | npm install 6 | ``` 7 | 8 | ### Compiles and hot-reloads for development 9 | ``` 10 | npm run serve 11 | ``` 12 | 13 | ### Compiles and minifies for production 14 | ``` 15 | npm run build 16 | ``` 17 | 18 | ### Customize configuration 19 | See [Configuration Reference](https://cli.vuejs.org/config/). 20 | -------------------------------------------------------------------------------- /FrontEnd.loja_/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "ApiUrl": "https://localhost:5556/api/", 3 | "GoogleReCaptcha": { 4 | "SiteKey_v2": "6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI", 5 | "SiteKey_v3": "6Lf9cGApAAAAANTZFOZgMamei1LobSMF85aKfMih" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /FrontEnd.loja_/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [ 3 | '@vue/cli-plugin-babel/preset' 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /FrontEnd.loja_/dist/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/waltereidi/Loja/feba7bc63a0f5eb874a1e15b64c26e9e95bbe3e3/FrontEnd.loja_/dist/favicon.ico -------------------------------------------------------------------------------- /FrontEnd.loja_/dist/fonts/Inter-italic.var.958a0b97.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/waltereidi/Loja/feba7bc63a0f5eb874a1e15b64c26e9e95bbe3e3/FrontEnd.loja_/dist/fonts/Inter-italic.var.958a0b97.woff2 -------------------------------------------------------------------------------- /FrontEnd.loja_/dist/fonts/Inter-roman.var.b2129c00.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/waltereidi/Loja/feba7bc63a0f5eb874a1e15b64c26e9e95bbe3e3/FrontEnd.loja_/dist/fonts/Inter-roman.var.b2129c00.woff2 -------------------------------------------------------------------------------- /FrontEnd.loja_/dist/fonts/Montserrat-ExtraLight.c82a42c9.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/waltereidi/Loja/feba7bc63a0f5eb874a1e15b64c26e9e95bbe3e3/FrontEnd.loja_/dist/fonts/Montserrat-ExtraLight.c82a42c9.ttf -------------------------------------------------------------------------------- /FrontEnd.loja_/dist/fonts/Montserrat-Light.ac0230b4.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/waltereidi/Loja/feba7bc63a0f5eb874a1e15b64c26e9e95bbe3e3/FrontEnd.loja_/dist/fonts/Montserrat-Light.ac0230b4.ttf -------------------------------------------------------------------------------- /FrontEnd.loja_/dist/fonts/Montserrat-Medium.62e48611.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/waltereidi/Loja/feba7bc63a0f5eb874a1e15b64c26e9e95bbe3e3/FrontEnd.loja_/dist/fonts/Montserrat-Medium.62e48611.ttf -------------------------------------------------------------------------------- /FrontEnd.loja_/dist/fonts/Montserrat-SemiBold.941396b7.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/waltereidi/Loja/feba7bc63a0f5eb874a1e15b64c26e9e95bbe3e3/FrontEnd.loja_/dist/fonts/Montserrat-SemiBold.941396b7.ttf -------------------------------------------------------------------------------- /FrontEnd.loja_/dist/fonts/Montserrat-Thin.434cb22f.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/waltereidi/Loja/feba7bc63a0f5eb874a1e15b64c26e9e95bbe3e3/FrontEnd.loja_/dist/fonts/Montserrat-Thin.434cb22f.ttf -------------------------------------------------------------------------------- /FrontEnd.loja_/dist/fonts/Montserrat-VariableFont_wght.f595c38f.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/waltereidi/Loja/feba7bc63a0f5eb874a1e15b64c26e9e95bbe3e3/FrontEnd.loja_/dist/fonts/Montserrat-VariableFont_wght.f595c38f.ttf -------------------------------------------------------------------------------- /FrontEnd.loja_/dist/fonts/Montserrat/Montserrat-Italic-VariableFont_wght.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/waltereidi/Loja/feba7bc63a0f5eb874a1e15b64c26e9e95bbe3e3/FrontEnd.loja_/dist/fonts/Montserrat/Montserrat-Italic-VariableFont_wght.ttf -------------------------------------------------------------------------------- /FrontEnd.loja_/dist/fonts/Montserrat/Montserrat-VariableFont_wght.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/waltereidi/Loja/feba7bc63a0f5eb874a1e15b64c26e9e95bbe3e3/FrontEnd.loja_/dist/fonts/Montserrat/Montserrat-VariableFont_wght.ttf -------------------------------------------------------------------------------- /FrontEnd.loja_/dist/fonts/Montserrat/static/Montserrat-Black.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/waltereidi/Loja/feba7bc63a0f5eb874a1e15b64c26e9e95bbe3e3/FrontEnd.loja_/dist/fonts/Montserrat/static/Montserrat-Black.ttf -------------------------------------------------------------------------------- /FrontEnd.loja_/dist/fonts/Montserrat/static/Montserrat-BlackItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/waltereidi/Loja/feba7bc63a0f5eb874a1e15b64c26e9e95bbe3e3/FrontEnd.loja_/dist/fonts/Montserrat/static/Montserrat-BlackItalic.ttf -------------------------------------------------------------------------------- /FrontEnd.loja_/dist/fonts/Montserrat/static/Montserrat-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/waltereidi/Loja/feba7bc63a0f5eb874a1e15b64c26e9e95bbe3e3/FrontEnd.loja_/dist/fonts/Montserrat/static/Montserrat-Bold.ttf -------------------------------------------------------------------------------- /FrontEnd.loja_/dist/fonts/Montserrat/static/Montserrat-BoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/waltereidi/Loja/feba7bc63a0f5eb874a1e15b64c26e9e95bbe3e3/FrontEnd.loja_/dist/fonts/Montserrat/static/Montserrat-BoldItalic.ttf -------------------------------------------------------------------------------- /FrontEnd.loja_/dist/fonts/Montserrat/static/Montserrat-ExtraBold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/waltereidi/Loja/feba7bc63a0f5eb874a1e15b64c26e9e95bbe3e3/FrontEnd.loja_/dist/fonts/Montserrat/static/Montserrat-ExtraBold.ttf -------------------------------------------------------------------------------- /FrontEnd.loja_/dist/fonts/Montserrat/static/Montserrat-ExtraBoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/waltereidi/Loja/feba7bc63a0f5eb874a1e15b64c26e9e95bbe3e3/FrontEnd.loja_/dist/fonts/Montserrat/static/Montserrat-ExtraBoldItalic.ttf -------------------------------------------------------------------------------- /FrontEnd.loja_/dist/fonts/Montserrat/static/Montserrat-ExtraLight.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/waltereidi/Loja/feba7bc63a0f5eb874a1e15b64c26e9e95bbe3e3/FrontEnd.loja_/dist/fonts/Montserrat/static/Montserrat-ExtraLight.ttf -------------------------------------------------------------------------------- /FrontEnd.loja_/dist/fonts/Montserrat/static/Montserrat-ExtraLightItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/waltereidi/Loja/feba7bc63a0f5eb874a1e15b64c26e9e95bbe3e3/FrontEnd.loja_/dist/fonts/Montserrat/static/Montserrat-ExtraLightItalic.ttf -------------------------------------------------------------------------------- /FrontEnd.loja_/dist/fonts/Montserrat/static/Montserrat-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/waltereidi/Loja/feba7bc63a0f5eb874a1e15b64c26e9e95bbe3e3/FrontEnd.loja_/dist/fonts/Montserrat/static/Montserrat-Italic.ttf -------------------------------------------------------------------------------- /FrontEnd.loja_/dist/fonts/Montserrat/static/Montserrat-Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/waltereidi/Loja/feba7bc63a0f5eb874a1e15b64c26e9e95bbe3e3/FrontEnd.loja_/dist/fonts/Montserrat/static/Montserrat-Light.ttf -------------------------------------------------------------------------------- /FrontEnd.loja_/dist/fonts/Montserrat/static/Montserrat-LightItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/waltereidi/Loja/feba7bc63a0f5eb874a1e15b64c26e9e95bbe3e3/FrontEnd.loja_/dist/fonts/Montserrat/static/Montserrat-LightItalic.ttf -------------------------------------------------------------------------------- /FrontEnd.loja_/dist/fonts/Montserrat/static/Montserrat-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/waltereidi/Loja/feba7bc63a0f5eb874a1e15b64c26e9e95bbe3e3/FrontEnd.loja_/dist/fonts/Montserrat/static/Montserrat-Medium.ttf -------------------------------------------------------------------------------- /FrontEnd.loja_/dist/fonts/Montserrat/static/Montserrat-MediumItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/waltereidi/Loja/feba7bc63a0f5eb874a1e15b64c26e9e95bbe3e3/FrontEnd.loja_/dist/fonts/Montserrat/static/Montserrat-MediumItalic.ttf -------------------------------------------------------------------------------- /FrontEnd.loja_/dist/fonts/Montserrat/static/Montserrat-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/waltereidi/Loja/feba7bc63a0f5eb874a1e15b64c26e9e95bbe3e3/FrontEnd.loja_/dist/fonts/Montserrat/static/Montserrat-Regular.ttf -------------------------------------------------------------------------------- /FrontEnd.loja_/dist/fonts/Montserrat/static/Montserrat-SemiBold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/waltereidi/Loja/feba7bc63a0f5eb874a1e15b64c26e9e95bbe3e3/FrontEnd.loja_/dist/fonts/Montserrat/static/Montserrat-SemiBold.ttf -------------------------------------------------------------------------------- /FrontEnd.loja_/dist/fonts/Montserrat/static/Montserrat-SemiBoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/waltereidi/Loja/feba7bc63a0f5eb874a1e15b64c26e9e95bbe3e3/FrontEnd.loja_/dist/fonts/Montserrat/static/Montserrat-SemiBoldItalic.ttf -------------------------------------------------------------------------------- /FrontEnd.loja_/dist/fonts/Montserrat/static/Montserrat-Thin.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/waltereidi/Loja/feba7bc63a0f5eb874a1e15b64c26e9e95bbe3e3/FrontEnd.loja_/dist/fonts/Montserrat/static/Montserrat-Thin.ttf -------------------------------------------------------------------------------- /FrontEnd.loja_/dist/fonts/Montserrat/static/Montserrat-ThinItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/waltereidi/Loja/feba7bc63a0f5eb874a1e15b64c26e9e95bbe3e3/FrontEnd.loja_/dist/fonts/Montserrat/static/Montserrat-ThinItalic.ttf -------------------------------------------------------------------------------- /FrontEnd.loja_/dist/img/Logo/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/waltereidi/Loja/feba7bc63a0f5eb874a1e15b64c26e9e95bbe3e3/FrontEnd.loja_/dist/img/Logo/logo.png -------------------------------------------------------------------------------- /FrontEnd.loja_/dist/img/icons/AppHeader/clock.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /FrontEnd.loja_/dist/img/icons/AppHeader/list.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /FrontEnd.loja_/dist/img/icons/AppHeader/menu.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /FrontEnd.loja_/dist/img/icons/AppHeader/user.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /FrontEnd.loja_/dist/manifest.json: -------------------------------------------------------------------------------- 1 | {"name":"loja-frontend","short_name":"loja-frontend","theme_color":"#4DBA87","icons":[{"src":"./img/icons/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"./img/icons/android-chrome-512x512.png","sizes":"512x512","type":"image/png"},{"src":"./img/icons/android-chrome-maskable-192x192.png","sizes":"192x192","type":"image/png","purpose":"maskable"},{"src":"./img/icons/android-chrome-maskable-512x512.png","sizes":"512x512","type":"image/png","purpose":"maskable"}],"start_url":".","display":"standalone","background_color":"#000000"} -------------------------------------------------------------------------------- /FrontEnd.loja_/dist/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: 3 | -------------------------------------------------------------------------------- /FrontEnd.loja_/postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /FrontEnd.loja_/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/waltereidi/Loja/feba7bc63a0f5eb874a1e15b64c26e9e95bbe3e3/FrontEnd.loja_/public/favicon.ico -------------------------------------------------------------------------------- /FrontEnd.loja_/public/fonts/Montserrat/Montserrat-Italic-VariableFont_wght.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/waltereidi/Loja/feba7bc63a0f5eb874a1e15b64c26e9e95bbe3e3/FrontEnd.loja_/public/fonts/Montserrat/Montserrat-Italic-VariableFont_wght.ttf -------------------------------------------------------------------------------- /FrontEnd.loja_/public/fonts/Montserrat/Montserrat-VariableFont_wght.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/waltereidi/Loja/feba7bc63a0f5eb874a1e15b64c26e9e95bbe3e3/FrontEnd.loja_/public/fonts/Montserrat/Montserrat-VariableFont_wght.ttf -------------------------------------------------------------------------------- /FrontEnd.loja_/public/fonts/Montserrat/static/Montserrat-Black.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/waltereidi/Loja/feba7bc63a0f5eb874a1e15b64c26e9e95bbe3e3/FrontEnd.loja_/public/fonts/Montserrat/static/Montserrat-Black.ttf -------------------------------------------------------------------------------- /FrontEnd.loja_/public/fonts/Montserrat/static/Montserrat-BlackItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/waltereidi/Loja/feba7bc63a0f5eb874a1e15b64c26e9e95bbe3e3/FrontEnd.loja_/public/fonts/Montserrat/static/Montserrat-BlackItalic.ttf -------------------------------------------------------------------------------- /FrontEnd.loja_/public/fonts/Montserrat/static/Montserrat-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/waltereidi/Loja/feba7bc63a0f5eb874a1e15b64c26e9e95bbe3e3/FrontEnd.loja_/public/fonts/Montserrat/static/Montserrat-Bold.ttf -------------------------------------------------------------------------------- /FrontEnd.loja_/public/fonts/Montserrat/static/Montserrat-BoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/waltereidi/Loja/feba7bc63a0f5eb874a1e15b64c26e9e95bbe3e3/FrontEnd.loja_/public/fonts/Montserrat/static/Montserrat-BoldItalic.ttf -------------------------------------------------------------------------------- /FrontEnd.loja_/public/fonts/Montserrat/static/Montserrat-ExtraBold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/waltereidi/Loja/feba7bc63a0f5eb874a1e15b64c26e9e95bbe3e3/FrontEnd.loja_/public/fonts/Montserrat/static/Montserrat-ExtraBold.ttf -------------------------------------------------------------------------------- /FrontEnd.loja_/public/fonts/Montserrat/static/Montserrat-ExtraBoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/waltereidi/Loja/feba7bc63a0f5eb874a1e15b64c26e9e95bbe3e3/FrontEnd.loja_/public/fonts/Montserrat/static/Montserrat-ExtraBoldItalic.ttf -------------------------------------------------------------------------------- /FrontEnd.loja_/public/fonts/Montserrat/static/Montserrat-ExtraLight.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/waltereidi/Loja/feba7bc63a0f5eb874a1e15b64c26e9e95bbe3e3/FrontEnd.loja_/public/fonts/Montserrat/static/Montserrat-ExtraLight.ttf -------------------------------------------------------------------------------- /FrontEnd.loja_/public/fonts/Montserrat/static/Montserrat-ExtraLightItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/waltereidi/Loja/feba7bc63a0f5eb874a1e15b64c26e9e95bbe3e3/FrontEnd.loja_/public/fonts/Montserrat/static/Montserrat-ExtraLightItalic.ttf -------------------------------------------------------------------------------- /FrontEnd.loja_/public/fonts/Montserrat/static/Montserrat-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/waltereidi/Loja/feba7bc63a0f5eb874a1e15b64c26e9e95bbe3e3/FrontEnd.loja_/public/fonts/Montserrat/static/Montserrat-Italic.ttf -------------------------------------------------------------------------------- /FrontEnd.loja_/public/fonts/Montserrat/static/Montserrat-Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/waltereidi/Loja/feba7bc63a0f5eb874a1e15b64c26e9e95bbe3e3/FrontEnd.loja_/public/fonts/Montserrat/static/Montserrat-Light.ttf -------------------------------------------------------------------------------- /FrontEnd.loja_/public/fonts/Montserrat/static/Montserrat-LightItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/waltereidi/Loja/feba7bc63a0f5eb874a1e15b64c26e9e95bbe3e3/FrontEnd.loja_/public/fonts/Montserrat/static/Montserrat-LightItalic.ttf -------------------------------------------------------------------------------- /FrontEnd.loja_/public/fonts/Montserrat/static/Montserrat-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/waltereidi/Loja/feba7bc63a0f5eb874a1e15b64c26e9e95bbe3e3/FrontEnd.loja_/public/fonts/Montserrat/static/Montserrat-Medium.ttf -------------------------------------------------------------------------------- /FrontEnd.loja_/public/fonts/Montserrat/static/Montserrat-MediumItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/waltereidi/Loja/feba7bc63a0f5eb874a1e15b64c26e9e95bbe3e3/FrontEnd.loja_/public/fonts/Montserrat/static/Montserrat-MediumItalic.ttf -------------------------------------------------------------------------------- /FrontEnd.loja_/public/fonts/Montserrat/static/Montserrat-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/waltereidi/Loja/feba7bc63a0f5eb874a1e15b64c26e9e95bbe3e3/FrontEnd.loja_/public/fonts/Montserrat/static/Montserrat-Regular.ttf -------------------------------------------------------------------------------- /FrontEnd.loja_/public/fonts/Montserrat/static/Montserrat-SemiBold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/waltereidi/Loja/feba7bc63a0f5eb874a1e15b64c26e9e95bbe3e3/FrontEnd.loja_/public/fonts/Montserrat/static/Montserrat-SemiBold.ttf -------------------------------------------------------------------------------- /FrontEnd.loja_/public/fonts/Montserrat/static/Montserrat-SemiBoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/waltereidi/Loja/feba7bc63a0f5eb874a1e15b64c26e9e95bbe3e3/FrontEnd.loja_/public/fonts/Montserrat/static/Montserrat-SemiBoldItalic.ttf -------------------------------------------------------------------------------- /FrontEnd.loja_/public/fonts/Montserrat/static/Montserrat-Thin.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/waltereidi/Loja/feba7bc63a0f5eb874a1e15b64c26e9e95bbe3e3/FrontEnd.loja_/public/fonts/Montserrat/static/Montserrat-Thin.ttf -------------------------------------------------------------------------------- /FrontEnd.loja_/public/fonts/Montserrat/static/Montserrat-ThinItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/waltereidi/Loja/feba7bc63a0f5eb874a1e15b64c26e9e95bbe3e3/FrontEnd.loja_/public/fonts/Montserrat/static/Montserrat-ThinItalic.ttf -------------------------------------------------------------------------------- /FrontEnd.loja_/public/img/Logo/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/waltereidi/Loja/feba7bc63a0f5eb874a1e15b64c26e9e95bbe3e3/FrontEnd.loja_/public/img/Logo/logo.png -------------------------------------------------------------------------------- /FrontEnd.loja_/public/img/icons/AppHeader/clock.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /FrontEnd.loja_/public/img/icons/AppHeader/list.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /FrontEnd.loja_/public/img/icons/AppHeader/menu.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /FrontEnd.loja_/public/img/icons/AppHeader/user.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /FrontEnd.loja_/public/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: 3 | -------------------------------------------------------------------------------- /FrontEnd.loja_/src/Utils/Utility.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/waltereidi/Loja/feba7bc63a0f5eb874a1e15b64c26e9e95bbe3e3/FrontEnd.loja_/src/Utils/Utility.ts -------------------------------------------------------------------------------- /FrontEnd.loja_/src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/waltereidi/Loja/feba7bc63a0f5eb874a1e15b64c26e9e95bbe3e3/FrontEnd.loja_/src/assets/logo.png -------------------------------------------------------------------------------- /FrontEnd.loja_/src/components/App/AppFooter/AppFooterBottom.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 20 | -------------------------------------------------------------------------------- /FrontEnd.loja_/src/components/App/AppFooter/style.scss: -------------------------------------------------------------------------------- 1 | @import "src/variables"; 2 | .footer { 3 | font-weight: normal; 4 | display: flex; 5 | flex-flow: column; 6 | 7 | &--list-spacebetween { 8 | flex-flow: row wrap; 9 | display: flex; 10 | flex: 1 1 auto; 11 | justify-content: space-between; 12 | ul { 13 | padding: 1em 1em 1em 1em; 14 | min-width: 160px; 15 | font-weight: 700; 16 | font-size: 0.8rem; 17 | } 18 | ul li { 19 | font-weight: 300; 20 | font-size: 0.68rem; 21 | padding: 0.4rem 0 0.4rem 0; 22 | } 23 | ul li:first-child { 24 | margin-top: 1em; 25 | } 26 | } 27 | &--list-flexstart { 28 | flex-flow: row wrap; 29 | display: flex; 30 | flex: 1 1 auto; 31 | font-weight: 700; 32 | font-size: 0.8em; 33 | padding: 1em; 34 | ul { 35 | padding: 1em; 36 | display: flex; 37 | flex-flow: row wrap; 38 | } 39 | ul > li { 40 | flex: 0 0 auto; 41 | font-weight: 300; 42 | margin: 0 0.5em 0 0.5em; 43 | img { 44 | height: 30px; 45 | } 46 | } 47 | } 48 | &--line-centralized { 49 | display: flex; 50 | justify-content: center; 51 | font-weight: 300; 52 | font-size: 0.65em; 53 | padding: 1em 2em 3em 2em; 54 | } 55 | } 56 | .bottom-centralized { 57 | display: flex; 58 | justify-content: center; 59 | background-color: #004d40; 60 | color: white; 61 | font-size: 0.65em; 62 | width: 100vw; 63 | left: 0; 64 | padding: 1em 0 1em 0; 65 | } 66 | -------------------------------------------------------------------------------- /FrontEnd.loja_/src/components/App/AppHeader/Buy/BuyHeader.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 47 | 48 | -------------------------------------------------------------------------------- /FrontEnd.loja_/src/components/App/AppHeader/Buy/style.scss: -------------------------------------------------------------------------------- 1 | @import 'src/variables'; 2 | .item{ 3 | flex-flow:row wrap ; 4 | font-size:0.6rem; 5 | height: 5rem; 6 | max-width: 4rem; 7 | display: flex; 8 | font-family: 'Montserrat'; 9 | color: $theme; 10 | &--icon{ 11 | flex: 0 0 2rem; 12 | } 13 | &--text{ 14 | flex: 0 0 3rem; 15 | display: flex; 16 | p{ 17 | font-weight: 700; 18 | } 19 | span{ 20 | font-weight: 300; 21 | } 22 | } 23 | 24 | } 25 | 26 | @media (min-width:360px) and (max-width:460px) 27 | { 28 | .office-hour , .cart{ 29 | display:none; 30 | } 31 | } 32 | 33 | -------------------------------------------------------------------------------- /FrontEnd.loja_/src/components/App/AppHeader/Category/style.scss: -------------------------------------------------------------------------------- 1 | .lock-screen{ 2 | width: 100%; 3 | height: 100%; 4 | z-index: 1000; 5 | position: absolute; 6 | } 7 | 8 | 9 | .menu{ 10 | z-index: 10000; 11 | position: fixed ; 12 | display: flex ; 13 | flex-flow : column ; 14 | height: 100vh; 15 | min-width: 400px; 16 | 17 | background-color: white; 18 | 19 | &--close-button{ 20 | position: absolute; 21 | right:1em; 22 | top:1em; 23 | height: 3em; 24 | width: 3em; 25 | background-color: red; 26 | } 27 | &--login{ 28 | cursor: pointer; 29 | height: 4em; 30 | } 31 | &--information{ 32 | cursor: pointer; 33 | height: 4em; 34 | } 35 | 36 | &--main-menu{ 37 | cursor: pointer; 38 | height: 4em; 39 | color:red; 40 | } 41 | 42 | &--return{ 43 | cursor: pointer; 44 | height: 3em; 45 | } 46 | 47 | &--category { 48 | cursor: pointer; 49 | height: 3em; 50 | } 51 | } 52 | .flex-column{ 53 | flex: 0 0 auto ; 54 | display: flex; 55 | flex-flow: row wrap ; 56 | text-align: center; 57 | align-content: center; 58 | i{ 59 | flex: 0 0 20%; 60 | } 61 | p{ 62 | flex: 0 0 70%; 63 | } 64 | span{ 65 | flex: 0 0 10%; 66 | } 67 | } -------------------------------------------------------------------------------- /FrontEnd.loja_/src/components/App/AppHeader/CategoryBar/CategoryBar.vue: -------------------------------------------------------------------------------- 1 | 11 | 19 | -------------------------------------------------------------------------------- /FrontEnd.loja_/src/components/App/AppHeader/CategoryBar/styles.scss: -------------------------------------------------------------------------------- 1 | @import '/src/variables.scss'; 2 | .category{ 3 | 4 | font-family: 'Montserrat'; 5 | margin: 1rem 1rem 1rem 1rem; 6 | display:flex; 7 | flex-flow:column ; 8 | text-align: center; 9 | justify-self: center; 10 | img{ 11 | height: 4rem; 12 | width: 6rem; 13 | } 14 | p{ 15 | font-size: 0.8rem; 16 | color:$theme ; 17 | font-weight: 300; 18 | } 19 | } -------------------------------------------------------------------------------- /FrontEnd.loja_/src/components/App/AppHeader/Logo/LogoHeader.vue: -------------------------------------------------------------------------------- 1 | 6 | 12 | -------------------------------------------------------------------------------- /FrontEnd.loja_/src/components/App/AppHeader/Search/SearchHeader.vue: -------------------------------------------------------------------------------- 1 | 4 | 17 | -------------------------------------------------------------------------------- /FrontEnd.loja_/src/components/App/AppHeader/style.scss: -------------------------------------------------------------------------------- 1 | .header{ 2 | display: flex; 3 | flex-flow: row wrap ; 4 | margin:2em 0 1em 0; 5 | 6 | &--menu{ 7 | flex : 1 1 10%; 8 | 9 | img{ 10 | width: 3em; 11 | height: 3em; 12 | 13 | } 14 | } 15 | &--logo{ 16 | flex: 1 1 20%; 17 | } 18 | 19 | &--search{ 20 | flex: 1 1 30%; 21 | } 22 | &--buy{ 23 | flex-flow: row wrap ; 24 | flex: 1 1 40%; 25 | display:flex; 26 | justify-content: space-around; 27 | } 28 | 29 | &--category-bar{ 30 | flex: 0 0 100% ; 31 | display:flex ; 32 | flex-flow:row wrap; 33 | justify-content: space-around; 34 | &__category{ 35 | flex: 0 0 auto; 36 | } 37 | } 38 | 39 | @media (max-width:970px) 40 | { 41 | &--menu{ 42 | flex : 1 1 10%; 43 | } 44 | &--logo{ 45 | flex: 1 1 45%; 46 | } 47 | &--category-bar{ 48 | display:none ; 49 | } 50 | 51 | &--search{ 52 | flex: 1 1 100% 53 | } 54 | &--buy{ 55 | flex: 1 1 45%; 56 | } 57 | } 58 | } -------------------------------------------------------------------------------- /FrontEnd.loja_/src/components/ProductCategory/ProductCategory.vue: -------------------------------------------------------------------------------- 1 | 16 | 27 | -------------------------------------------------------------------------------- /FrontEnd.loja_/src/components/ProductCategory/ProductComponent/ProductComponent.vue: -------------------------------------------------------------------------------- 1 | 13 | 14 | 33 | 34 | 37 | -------------------------------------------------------------------------------- /FrontEnd.loja_/src/components/ProductCategory/ProductComponent/style.scss: -------------------------------------------------------------------------------- 1 | .product{ 2 | flex: 1 1 1em; 3 | display:flex ; 4 | flex-flow:column; 5 | height: 10em; 6 | border:1px solid black; 7 | justify-content: space-around; 8 | &--image{ 9 | 10 | } 11 | &--price{ 12 | 13 | } 14 | &--actions{ 15 | display:flex ; 16 | justify-content: space-between; 17 | padding:1em; 18 | } 19 | } -------------------------------------------------------------------------------- /FrontEnd.loja_/src/components/ProductCategory/style.scss: -------------------------------------------------------------------------------- 1 | .title{ 2 | font-weight: 700; 3 | font-size:2rem; 4 | display:flex; 5 | flex-flow: row wrap; 6 | justify-content: flex-start; 7 | img{ 8 | height: 10px; 9 | width: 10px; 10 | } 11 | } 12 | .products{ 13 | flex: 1 1 auto; 14 | display:flex; 15 | flex-flow:row wrap ; 16 | 17 | 18 | } -------------------------------------------------------------------------------- /FrontEnd.loja_/src/index.scss: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | 5 | body { 6 | font-family: "Montserrat"; 7 | } 8 | %theme { 9 | $theme: #004d40; 10 | } 11 | 12 | @font-face { 13 | font-family: "Montserrat"; 14 | src: url("/public/fonts/Montserrat/Montserrat-VariableFont_wght.ttf"); 15 | font-weight: normal; 16 | } 17 | @font-face { 18 | font-family: "Montserrat"; 19 | src: url("/public/fonts/Montserrat/static/Montserrat-Thin.ttf"); 20 | font-weight: 100; 21 | } 22 | @font-face { 23 | font-family: "Montserrat"; 24 | src: url("/public/fonts/Montserrat/static/Montserrat-ExtraLight.ttf"); 25 | font-weight: 200; 26 | } 27 | @font-face { 28 | font-family: "Montserrat"; 29 | src: url("/public/fonts/Montserrat/static/Montserrat-Light.ttf"); 30 | font-weight: 300; 31 | } 32 | @font-face { 33 | font-family: "Montserrat"; 34 | src: url("/public/fonts/Montserrat/static/Montserrat-Medium.ttf"); 35 | font-weight: 500; 36 | } 37 | @font-face { 38 | font-family: "Montserrat"; 39 | src: url("/public/fonts/Montserrat/static/Montserrat-SemiBold.ttf"); 40 | font-weight: 600; 41 | } 42 | 43 | .app-container { 44 | width: 80vw; 45 | margin: auto; 46 | } 47 | -------------------------------------------------------------------------------- /FrontEnd.loja_/src/main.ts: -------------------------------------------------------------------------------- 1 | import 'primevue/resources/themes/lara-light-green/theme.css'; 2 | import { createApp } from 'vue' 3 | import App from './App.vue' 4 | import './registerServiceWorker' 5 | import router from './router' 6 | import store from './store/store' 7 | import { createPinia } from 'pinia'; 8 | import ToastService from 'primevue/toastservice'; 9 | import PrimeVue from 'primevue/config'; 10 | import Toast from 'primevue/toast'; 11 | const app = createApp(App); 12 | 13 | app.use(PrimeVue, { ripple: true }); 14 | app.use(ToastService); 15 | app.use(createPinia()); 16 | app.use(store); 17 | app.use(router); 18 | /* eslint-disable */ 19 | app.component('Toast', Toast); 20 | app.mount('#app'); -------------------------------------------------------------------------------- /FrontEnd.loja_/src/registerServiceWorker.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-console */ 2 | 3 | import { register } from 'register-service-worker' 4 | 5 | if (process.env.NODE_ENV === 'production') { 6 | register(`${process.env.BASE_URL}service-worker.js`, { 7 | ready () { 8 | console.log( 9 | 'App is being served from cache by a service worker.\n' + 10 | 'For more details, visit https://goo.gl/AFskqB' 11 | ) 12 | }, 13 | registered () { 14 | console.log('Service worker has been registered.') 15 | }, 16 | cached () { 17 | console.log('Content has been cached for offline use.') 18 | }, 19 | updatefound () { 20 | console.log('New content is downloading.') 21 | }, 22 | updated () { 23 | console.log('New content is available; please refresh.') 24 | }, 25 | offline () { 26 | console.log('No internet connection found. App is running in offline mode.') 27 | }, 28 | error (error) { 29 | console.error('Error during service worker registration:', error) 30 | } 31 | }) 32 | } 33 | -------------------------------------------------------------------------------- /FrontEnd.loja_/src/router/index.ts: -------------------------------------------------------------------------------- 1 | import AppBody from '@/views/AppBody/AppBody.vue'; 2 | import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router'; 3 | import LoginView from '@/views/Login/LoginView.vue'; 4 | import Register from '@/views/Register/RegisterView.vue'; 5 | import BuyList from '@/views/BuyList/BuyList.vue'; 6 | 7 | const router = createRouter({ 8 | history: createWebHistory(process.env.BASE_URL), 9 | routes: [ 10 | { 11 | path: '/', 12 | name: 'AppBody', 13 | component: AppBody 14 | }, 15 | { 16 | path: '/Login', 17 | name: 'Login', 18 | component: LoginView 19 | }, 20 | { 21 | path:'/Register' , 22 | name:'Register' , 23 | component: Register , 24 | }, 25 | { 26 | path:'/BuyList' , 27 | name:'BuyList' , 28 | component: BuyList , 29 | }, 30 | 31 | ], 32 | scrollBehavior(to, from, savedPosition) { 33 | return {top:0} 34 | } 35 | }) 36 | 37 | export default router 38 | -------------------------------------------------------------------------------- /FrontEnd.loja_/src/shims-vue.d.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | declare module '*.vue' { 3 | import type { DefineComponent } from 'vue' 4 | const component: DefineComponent<{}, {}, any> 5 | export default component 6 | } 7 | -------------------------------------------------------------------------------- /FrontEnd.loja_/src/store/Controllers/buyStoreController.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/waltereidi/Loja/feba7bc63a0f5eb874a1e15b64c26e9e95bbe3e3/FrontEnd.loja_/src/store/Controllers/buyStoreController.ts -------------------------------------------------------------------------------- /FrontEnd.loja_/src/store/Controllers/categoryStoreController.ts: -------------------------------------------------------------------------------- 1 | export class CategoryStoreController{ 2 | 3 | 4 | getCategoryBar(datasource:Array) : Array 5 | { 6 | return datasource.filter( (x)=> x.order<=10); 7 | } 8 | } -------------------------------------------------------------------------------- /FrontEnd.loja_/src/store/Controllers/promotionStoreController.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/waltereidi/Loja/feba7bc63a0f5eb874a1e15b64c26e9e95bbe3e3/FrontEnd.loja_/src/store/Controllers/promotionStoreController.ts -------------------------------------------------------------------------------- /FrontEnd.loja_/src/store/Controllers/storeController.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/waltereidi/Loja/feba7bc63a0f5eb874a1e15b64c26e9e95bbe3e3/FrontEnd.loja_/src/store/Controllers/storeController.ts -------------------------------------------------------------------------------- /FrontEnd.loja_/src/store/Entity/requestModel.ts: -------------------------------------------------------------------------------- 1 | export interface RequestModel 2 | { 3 | method: string 4 | url: string 5 | body?: any 6 | } -------------------------------------------------------------------------------- /FrontEnd.loja_/src/store/Entity/store.ts: -------------------------------------------------------------------------------- 1 | import { RequestController } from "../Controllers/requestController" 2 | 3 | export enum EnumMessageType { 4 | error = 0 , 5 | success = 1 , 6 | warning = 2 , 7 | loading = 3 , 8 | notification = 4 , 9 | } 10 | export interface MessageInterface 11 | { 12 | message : string , 13 | type : EnumMessageType, 14 | } 15 | 16 | export interface State 17 | { 18 | message? : MessageInterface[] , 19 | login: any, 20 | navMenu: boolean, 21 | requestController: RequestController, 22 | config: any, 23 | useToast:any, 24 | } 25 | export interface HttpHeaders 26 | { 27 | key: string, 28 | value:string 29 | } -------------------------------------------------------------------------------- /FrontEnd.loja_/src/store/Entity/toastMessage.ts: -------------------------------------------------------------------------------- 1 | export interface ToastMessage{ 2 | severity:string; 3 | summary:string; 4 | detail:string; 5 | life: number; 6 | } -------------------------------------------------------------------------------- /FrontEnd.loja_/src/store/buyStore.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/waltereidi/Loja/feba7bc63a0f5eb874a1e15b64c26e9e95bbe3e3/FrontEnd.loja_/src/store/buyStore.ts -------------------------------------------------------------------------------- /FrontEnd.loja_/src/store/categoryStore.ts: -------------------------------------------------------------------------------- 1 | import { ref , computed } from "vue"; 2 | import { defineStore } from 'pinia'; 3 | import { CategoryStoreController } from "@/store/Controllers/categoryStoreController"; 4 | 5 | export const categoryStore = defineStore('category' , { 6 | 7 | state: () => { 8 | return { 9 | categoryArray : {}, 10 | categoryStoreController : new CategoryStoreController(), 11 | } 12 | }, 13 | getters:{ 14 | getCategoryBar(state) 15 | { 16 | return state.categoryArray; 17 | }, 18 | getProductCategoryDataSource() 19 | { 20 | return require('../../tests/json/productCategory.json'); 21 | } 22 | }, 23 | actions:{ 24 | 25 | setCategoryBar(datasource:Array) 26 | { 27 | this.categoryArray=this.categoryStoreController.getCategoryBar(datasource); 28 | } 29 | 30 | } 31 | 32 | 33 | 34 | }); -------------------------------------------------------------------------------- /FrontEnd.loja_/src/store/promotionStore.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/waltereidi/Loja/feba7bc63a0f5eb874a1e15b64c26e9e95bbe3e3/FrontEnd.loja_/src/store/promotionStore.ts -------------------------------------------------------------------------------- /FrontEnd.loja_/src/variables.scss: -------------------------------------------------------------------------------- 1 | $theme: #004d40; 2 | -------------------------------------------------------------------------------- /FrontEnd.loja_/src/views/AppBody/AppBody.vue: -------------------------------------------------------------------------------- 1 | 16 | 17 | 25 | -------------------------------------------------------------------------------- /FrontEnd.loja_/src/views/AppBody/style.scss: -------------------------------------------------------------------------------- 1 | .app-body{ 2 | 3 | 4 | display:flex; 5 | flex-flow:column; 6 | 7 | 8 | 9 | } 10 | .productCategory{ 11 | margin: 3em 0 3em 0 ; 12 | } -------------------------------------------------------------------------------- /FrontEnd.loja_/src/views/BuyList/BuyList.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 37 | -------------------------------------------------------------------------------- /FrontEnd.loja_/src/views/BuyList/style.scss: -------------------------------------------------------------------------------- 1 | .buy-list-container{ 2 | min-width: 40em; 3 | max-width: 40vw; 4 | flex-flow:column ; 5 | display:flex ; 6 | margin:auto; 7 | 8 | 9 | &--title{ 10 | font-size: 2rem; 11 | font-weight: 700; 12 | margin: 2rem 0 2rem 0 ; 13 | } 14 | 15 | &--list{ 16 | flex-flow:column; 17 | flex: 1 1 auto ; 18 | display:flex ; 19 | 20 | &__product{ 21 | display:flex ; 22 | flex-flow:row wrap ; 23 | flex: 1 1 auto ; 24 | height: 3em; 25 | background-color: teal; 26 | border: 1px solid black; 27 | } 28 | } 29 | &--price{ 30 | 31 | 32 | } 33 | &--submit{ 34 | margin: 2rem 0 2rem 0 ; 35 | display: flex; 36 | flex-flow: row wrap ; 37 | justify-content: space-between; 38 | } 39 | 40 | } -------------------------------------------------------------------------------- /FrontEnd.loja_/src/views/Login/style.scss: -------------------------------------------------------------------------------- 1 | .login-container{ 2 | display:flex; 3 | flex-flow:column ; 4 | 5 | 6 | &--title{ 7 | font-weight: 700; 8 | font-size:2rem; 9 | align-self: center; 10 | } 11 | &--form{ 12 | min-width: 30em; 13 | max-width: 30vw; 14 | flex-flow:column; 15 | display:flex; 16 | align-self: center; 17 | margin:2rem 0 2rem 0; 18 | &__input{ 19 | margin: 1rem 0 1rem 0; 20 | } 21 | &__submit{ 22 | 23 | } 24 | 25 | } 26 | &--register{ 27 | align-self:center; 28 | margin:2rem 0 2rem 0; 29 | } 30 | 31 | 32 | } -------------------------------------------------------------------------------- /FrontEnd.loja_/src/views/Register/style.scss: -------------------------------------------------------------------------------- 1 | .cadastro-container{ 2 | display:flex; 3 | flex-flow:column ; 4 | justify-content: center; 5 | 6 | 7 | &--title{ 8 | font-weight: 700; 9 | font-size:2rem; 10 | align-self: center; 11 | } 12 | &--form{ 13 | align-self: center; 14 | text-align: start; 15 | min-width: 30em; 16 | max-width:30vw; 17 | margin:2em 0 2em 0; 18 | &__input{ 19 | margin: 1em 0 1em 0; 20 | } 21 | input{ 22 | margin-bottom:1em; 23 | } 24 | 25 | &__input-group{ 26 | display:flex; 27 | flex-flow:row wrap ; 28 | justify-content: space-between; 29 | 30 | div{ 31 | flex: 0 0 50%-calc(1em); 32 | display:flex; 33 | flex-flow:column; 34 | justify-content: flex-start; 35 | } 36 | } 37 | &--check-group{ 38 | display: flex ; 39 | flex-flow:row wrap ; 40 | justify-content: flex-start; 41 | 42 | } 43 | &__submit{ 44 | margin: 2em 0 2em 0 ; 45 | } 46 | 47 | 48 | 49 | } 50 | 51 | } -------------------------------------------------------------------------------- /FrontEnd.loja_/tailwind.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('tailwindcss').Config} */ 2 | module.exports = { 3 | purge: ['./index.html', './src/**/*.{vue,js,ts,jsx,tsx}'], 4 | content: [], 5 | theme: { 6 | extend: {}, 7 | }, 8 | plugins: [], 9 | } 10 | 11 | -------------------------------------------------------------------------------- /FrontEnd.loja_/tests/json/categoryHeader.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "name" : "ca1" , 4 | "category" : "main" , 5 | "parent" : null , 6 | "order":1 , 7 | "children" : [ 8 | { 9 | "name" : "ca1_2" , 10 | "category" : "subMenu" , 11 | "parent" : "ca1" , 12 | "children" : [ 13 | { 14 | "name" : "ca1_3" , 15 | "category" :"produtos" , 16 | "parent":"ca1_2", 17 | "children" : null 18 | } 19 | ] 20 | } 21 | ] 22 | 23 | }, 24 | { 25 | "name" : "da1" , 26 | "category" : "main" , 27 | "parent" : null , 28 | "order":2 , 29 | "children" : [ 30 | { 31 | "name" : "da1_2" , 32 | "category" : "subMenu" , 33 | "parent" : "da1" , 34 | "children" : [ 35 | { 36 | "name" : "da1_3" , 37 | "category" :"produtos" , 38 | "parent":"da1_2", 39 | "children" : null 40 | }, 41 | { 42 | "name" : "da1_3_2" , 43 | "category" :"produtos" , 44 | "parent":"da1_2", 45 | "children" : null 46 | } 47 | ] 48 | } 49 | ] 50 | 51 | } 52 | 53 | ] -------------------------------------------------------------------------------- /FrontEnd.loja_/tests/unit/Controllers/categoryStoreController.spec.ts: -------------------------------------------------------------------------------- 1 | import { expect, test } from 'vitest'; 2 | import { CategoryStoreController } from "../../../src/store/Controllers/categoryStoreController"; 3 | import datasource from '../../json/categoryHeader.json' assert { type: 'json' }; 4 | 5 | const categoryStoreController =new CategoryStoreController(); 6 | 7 | test('getCategoryBar',()=>{ 8 | const datasourceTest :Array = datasource; 9 | datasourceTest[0].order = 11; 10 | const retorno :any = categoryStoreController.getCategoryBar(datasourceTest); 11 | 12 | expect(retorno[0].order).toBe(2); 13 | }) -------------------------------------------------------------------------------- /FrontEnd.loja_/tests/unit/Controllers/compraStoreController.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/waltereidi/Loja/feba7bc63a0f5eb874a1e15b64c26e9e95bbe3e3/FrontEnd.loja_/tests/unit/Controllers/compraStoreController.spec.ts -------------------------------------------------------------------------------- /FrontEnd.loja_/tests/unit/Controllers/destaqueStoreController.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/waltereidi/Loja/feba7bc63a0f5eb874a1e15b64c26e9e95bbe3e3/FrontEnd.loja_/tests/unit/Controllers/destaqueStoreController.spec.ts -------------------------------------------------------------------------------- /FrontEnd.loja_/tests/unit/Controllers/storeController.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/waltereidi/Loja/feba7bc63a0f5eb874a1e15b64c26e9e95bbe3e3/FrontEnd.loja_/tests/unit/Controllers/storeController.spec.ts -------------------------------------------------------------------------------- /FrontEnd.loja_/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "esnext", 4 | "module": "esnext", 5 | "strict": false, 6 | "jsx": "preserve", 7 | "moduleResolution": "node", 8 | "experimentalDecorators": true, 9 | "skipLibCheck": true, 10 | "esModuleInterop": true, 11 | "allowSyntheticDefaultImports": true, 12 | "forceConsistentCasingInFileNames": true, 13 | "useDefineForClassFields": true, 14 | "sourceMap": true, 15 | "resolveJsonModule": true, 16 | "baseUrl": ".", 17 | "types": [ 18 | "webpack-env" 19 | ], 20 | "paths": { 21 | "@/*": [ 22 | "src/*" 23 | ] 24 | }, 25 | "lib": [ 26 | "esnext", 27 | "dom", 28 | "dom.iterable", 29 | "scripthost" 30 | ] 31 | }, 32 | "include": [ 33 | "src/**/*.ts", 34 | "src/**/*.tsx", 35 | "src/**/*.vue", 36 | "tests/**/*.ts", 37 | "tests/**/*.tsx" 38 | ], 39 | "exclude": [ 40 | "node_modules" 41 | ] 42 | } 43 | -------------------------------------------------------------------------------- /FrontEnd.loja_/vue.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | chainWebpack: config => { 3 | config.module 4 | .rule('vue') 5 | .use('vue-loader') 6 | .tap(options => { 7 | options.compilerOptions = { 8 | // treat any tag that starts with ion- as custom elements 9 | isCustomElement: tag => tag==='ThemeButton'||tag==='Checkbox' 10 | } 11 | return options 12 | }) 13 | }, 14 | configureWebpack:{ 15 | resolve:{ 16 | extensions:[".ts"], 17 | } 18 | }, 19 | devServer: { 20 | client: { 21 | overlay: { 22 | errors: true, 23 | warnings: false, 24 | runtimeErrors: false, 25 | }, 26 | }, 27 | }, 28 | } -------------------------------------------------------------------------------- /Infra.loja/Infra.loja.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net8.0 5 | enable 6 | enable 7 | 8 | 9 | 10 | 11 | 12 | all 13 | runtime; build; native; contentfiles; analyzers; buildtransitive 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | WConnectionKeyVault.dll 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | True 37 | 38 | 39 | -------------------------------------------------------------------------------- /Infra.loja/WConnectionKeyVault.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/waltereidi/Loja/feba7bc63a0f5eb874a1e15b64c26e9e95bbe3e3/Infra.loja/WConnectionKeyVault.dll -------------------------------------------------------------------------------- /Loja.loja/.eslintrc.cjs: -------------------------------------------------------------------------------- 1 | /* eslint-env node */ 2 | require('@rushstack/eslint-patch/modern-module-resolution') 3 | 4 | module.exports = { 5 | root: true, 6 | 'extends': [ 7 | 'plugin:vue/vue3-essential', 8 | 'eslint:recommended', 9 | '@vue/eslint-config-typescript' 10 | ], 11 | parserOptions: { 12 | ecmaVersion: 'latest' 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Loja.loja/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | .DS_Store 12 | dist 13 | dist-ssr 14 | coverage 15 | *.local 16 | 17 | /cypress/videos/ 18 | /cypress/screenshots/ 19 | 20 | # Editor directories and files 21 | .vscode/* 22 | !.vscode/extensions.json 23 | .idea 24 | *.suo 25 | *.ntvs* 26 | *.njsproj 27 | *.sln 28 | *.sw? 29 | 30 | *.tsbuildinfo 31 | -------------------------------------------------------------------------------- /Loja.loja/.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": [ 3 | "Vue.volar", 4 | "dbaeumer.vscode-eslint" 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /Loja.loja/Loja.loja.esproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | npm run dev 4 | .\ 5 | Jest 6 | 7 | false 8 | 9 | $(MSBuildProjectDirectory)\dist 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /Loja.loja/README.md: -------------------------------------------------------------------------------- 1 | # vueapp1.client 2 | 3 | This template should help get you started developing with Vue 3 in Vite. 4 | 5 | ## Recommended IDE Setup 6 | 7 | [VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur). 8 | 9 | ## Type Support for `.vue` Imports in TS 10 | 11 | TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) to make the TypeScript language service aware of `.vue` types. 12 | 13 | ## Customize configuration 14 | 15 | See [Vite Configuration Reference](https://vitejs.dev/config/). 16 | 17 | ## Project Setup 18 | 19 | ```sh 20 | npm install 21 | ``` 22 | 23 | ### Compile and Hot-Reload for Development 24 | 25 | ```sh 26 | npm run dev 27 | ``` 28 | 29 | ### Type-Check, Compile and Minify for Production 30 | 31 | ```sh 32 | npm run build 33 | ``` 34 | 35 | ### Lint with [ESLint](https://eslint.org/) 36 | 37 | ```sh 38 | npm run lint 39 | ``` 40 | -------------------------------------------------------------------------------- /Loja.loja/env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /Loja.loja/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite App 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /Loja.loja/nuget.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Loja.loja/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vueapp1.client", 3 | "version": "0.0.0", 4 | "private": true, 5 | "type": "module", 6 | "scripts": { 7 | "dev": "vite", 8 | "build": "run-p type-check \"build-only {@}\" --", 9 | "preview": "vite preview", 10 | "build-only": "vite build", 11 | "type-check": "vue-tsc --build --force", 12 | "lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore" 13 | }, 14 | "dependencies": { 15 | "vue": "^3.4.21" 16 | }, 17 | "devDependencies": { 18 | "@rushstack/eslint-patch": "^1.3.3", 19 | "@tsconfig/node20": "^20.1.2", 20 | "@types/node": "^20.11.25", 21 | "@vitejs/plugin-vue": "^5.0.4", 22 | "@vue/eslint-config-typescript": "^12.0.0", 23 | "@vue/tsconfig": "^0.5.1", 24 | "eslint": "^8.49.0", 25 | "eslint-plugin-vue": "^9.17.0", 26 | "npm-run-all2": "^6.1.2", 27 | "typescript": "~5.4.0", 28 | "vite": "^5.1.5", 29 | "vue-tsc": "^2.0.6" 30 | } 31 | } -------------------------------------------------------------------------------- /Loja.loja/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/waltereidi/Loja/feba7bc63a0f5eb874a1e15b64c26e9e95bbe3e3/Loja.loja/public/favicon.ico -------------------------------------------------------------------------------- /Loja.loja/src/App.vue: -------------------------------------------------------------------------------- 1 | 5 | 6 | 18 | 19 | 47 | -------------------------------------------------------------------------------- /Loja.loja/src/assets/logo.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Loja.loja/src/assets/main.css: -------------------------------------------------------------------------------- 1 | @import './base.css'; 2 | 3 | #app { 4 | max-width: 1280px; 5 | margin: 0 auto; 6 | padding: 2rem; 7 | font-weight: normal; 8 | } 9 | 10 | a, 11 | .green { 12 | text-decoration: none; 13 | color: hsla(160, 100%, 37%, 1); 14 | transition: 0.4s; 15 | padding: 3px; 16 | } 17 | 18 | @media (hover: hover) { 19 | a:hover { 20 | background-color: hsla(160, 100%, 37%, 0.2); 21 | } 22 | } 23 | 24 | @media (min-width: 1024px) { 25 | body { 26 | display: flex; 27 | place-items: center; 28 | } 29 | 30 | #app { 31 | display: grid; 32 | grid-template-columns: 1fr 1fr; 33 | padding: 0 2rem; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /Loja.loja/src/components/icons/IconCommunity.vue: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /Loja.loja/src/components/icons/IconDocumentation.vue: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /Loja.loja/src/components/icons/IconSupport.vue: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /Loja.loja/src/components/icons/IconTooling.vue: -------------------------------------------------------------------------------- 1 | 2 | 20 | -------------------------------------------------------------------------------- /Loja.loja/src/main.ts: -------------------------------------------------------------------------------- 1 | import './assets/main.css' 2 | 3 | import { createApp } from 'vue' 4 | import App from './App.vue' 5 | 6 | createApp(App).mount('#app') 7 | -------------------------------------------------------------------------------- /Loja.loja/src/shims-vue.d.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | declare module '*.vue' { 3 | import type { DefineComponent } from 'vue' 4 | const component: DefineComponent<{}, {}, any> 5 | export default component 6 | } 7 | -------------------------------------------------------------------------------- /Loja.loja/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@vue/tsconfig/tsconfig.dom.json", 3 | "include": ["env.d.ts", "src/**/*", "src/**/*.vue"], 4 | "exclude": ["src/**/__tests__/*"], 5 | "compilerOptions": { 6 | "composite": true, 7 | "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo", 8 | 9 | "baseUrl": ".", 10 | "paths": { 11 | "@/*": ["./src/*"] 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Loja.loja/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", 4 | "module": "esnext", 5 | "strict": false, 6 | "jsx": "preserve", 7 | "importHelpers": true, 8 | "moduleResolution": "node", 9 | "skipLibCheck": true, 10 | "esModuleInterop": true, 11 | "allowSyntheticDefaultImports": true, 12 | "forceConsistentCasingInFileNames": true, 13 | "useDefineForClassFields": true, 14 | "sourceMap": true, 15 | "baseUrl": ".", 16 | "types": [ 17 | "webpack-env" 18 | ], 19 | "paths": { 20 | "@/*": [ 21 | "src/*" 22 | ] 23 | }, 24 | "lib": [ 25 | "esnext", 26 | "dom", 27 | "dom.iterable", 28 | "scripthost" 29 | ] 30 | }, 31 | "include": [ 32 | "src/**/*.ts", 33 | "src/**/*.tsx", 34 | "src/**/*.vue", 35 | "tests/**/*.ts", 36 | "tests/**/*.tsx" 37 | ], 38 | "exclude": [ 39 | "node_modules" 40 | ] 41 | } 42 | -------------------------------------------------------------------------------- /Loja.loja/tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@tsconfig/node20/tsconfig.json", 3 | "include": [ 4 | "vite.config.*", 5 | "vitest.config.*", 6 | "cypress.config.*", 7 | "nightwatch.conf.*", 8 | "playwright.config.*" 9 | ], 10 | "compilerOptions": { 11 | "composite": true, 12 | "noEmit": true, 13 | "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo", 14 | 15 | "module": "ESNext", 16 | "moduleResolution": "Bundler", 17 | "types": ["node"] 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /MicroServices/Api.ServicesManager/Api.ServicesManager.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net8.0 5 | enable 6 | enable 7 | TopShelf 8 | TopShelf 9 | WalterMatsuda 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /MicroServices/Api.ServicesManager/Api.ServicesManager.http: -------------------------------------------------------------------------------- 1 | # @Api.ServicesManager_HostAddress = http://localhost:5126 2 | 3 | # GET {{Api.ServicesManager_HostAddress}}/weatherforecast/ 4 | # Accept: application/json 5 | 6 | ### 7 | -------------------------------------------------------------------------------- /MicroServices/Api.ServicesManager/Contracts/QuartzApplicationServicesContract.cs: -------------------------------------------------------------------------------- 1 | namespace Api.ServicesManager.Contracts 2 | { 3 | public class QuartzApplicationServicesContract 4 | { 5 | public class T1 6 | { 7 | public record class StartQuartz(); 8 | public record class StopQuartz(); 9 | public record class GetQuartzState(); 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /MicroServices/Api.ServicesManager/Contracts/SMApplicationServicesContract.cs: -------------------------------------------------------------------------------- 1 | namespace Api.ServicesManager.Contracts 2 | { 3 | public class SMApplicationServicesContract 4 | { 5 | public class T1 6 | { 7 | public record class GetAllServicesState(); 8 | public record class StartAllServices(); 9 | public record class StopAllServices(); 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /MicroServices/Api.ServicesManager/Controllers/BaseController.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Mvc; 2 | 3 | namespace Api.ServicesManager.Controllers 4 | { 5 | public class BaseController : Controller 6 | { 7 | private readonly ILogger _logger; 8 | public BaseController(ILogger logger) 9 | { 10 | _logger = logger; 11 | } 12 | protected async Task HandleRequest(T request, Func> handler) where T : class 13 | { 14 | try 15 | { 16 | return handler(request); 17 | } 18 | catch (Exception ex) 19 | { 20 | _logger.LogError(ex.Message); 21 | return BadRequest(ex.Message); 22 | } 23 | } 24 | 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /MicroServices/Api.ServicesManager/Interfaces/IHostedServices.cs: -------------------------------------------------------------------------------- 1 | using Api.ServicesManager.MicroService; 2 | 3 | namespace Api.ServicesManager.Interfaces 4 | { 5 | public interface IHostedServices 6 | { 7 | Task UpdateServiceState(bool isRunning, Type service); 8 | Task GetState(Type service); 9 | Task> GetAllServicesState(); 10 | Task EnableAllServices(); 11 | Task DisableAllServices(); 12 | 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /MicroServices/Api.ServicesManager/Log4net.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /MicroServices/Api.ServicesManager/MicroService/Quartz/QuartzMS.cs: -------------------------------------------------------------------------------- 1 |  2 | using MicroServices.Integrations.QuartzScheduler; 3 | 4 | namespace Api.ServicesManager.MicroService.Quartz 5 | { 6 | public sealed class QuartzMS : BackgroundService 7 | { 8 | private readonly QuartzScheduler service; 9 | public QuartzMS() 10 | { 11 | service = new QuartzScheduler(); 12 | } 13 | protected override Task ExecuteAsync(CancellationToken stoppingToken) 14 | { 15 | return service.Start(); 16 | } 17 | public override Task StopAsync(CancellationToken cancellationToken) 18 | { 19 | return service.Stop(); 20 | } 21 | 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /MicroServices/Api.ServicesManager/MicroService/WFileManager/WFileManagerMS.cs: -------------------------------------------------------------------------------- 1 |  2 | namespace Api.ServicesManager.MicroService.WFileManager 3 | { 4 | public class WFileManagerMS : BackgroundService 5 | { 6 | protected override Task ExecuteAsync(CancellationToken stoppingToken) 7 | { 8 | return Task.CompletedTask; 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /MicroServices/Api.ServicesManager/Program.cs: -------------------------------------------------------------------------------- 1 | using Api.ServicesManager; 2 | 3 | namespace Api.TopShelfServicesManager 4 | { 5 | public class Program 6 | { 7 | public static void Main(string[] args) 8 | { 9 | CreateHostBuilder(args).Build().Run(); 10 | } 11 | public static IHostBuilder CreateHostBuilder(string[] args) => 12 | Host.CreateDefaultBuilder(args) 13 | .ConfigureWebHostDefaults(webBuilder => 14 | { 15 | webBuilder 16 | .UseStartup(); 17 | }); 18 | 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /MicroServices/Api.ServicesManager/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/launchsettings.json", 3 | "iisSettings": { 4 | "windowsAuthentication": false, 5 | "anonymousAuthentication": true, 6 | "iisExpress": { 7 | "applicationUrl": "http://localhost:23328", 8 | "sslPort": 44325 9 | } 10 | }, 11 | "profiles": { 12 | "http": { 13 | "commandName": "Project", 14 | "dotnetRunMessages": true, 15 | "launchBrowser": true, 16 | "launchUrl": "swagger", 17 | "applicationUrl": "http://localhost:5126", 18 | "environmentVariables": { 19 | "ASPNETCORE_ENVIRONMENT": "Development" 20 | } 21 | }, 22 | "https": { 23 | "commandName": "Project", 24 | "dotnetRunMessages": true, 25 | "launchBrowser": true, 26 | "launchUrl": "swagger", 27 | "applicationUrl": "https://localhost:7186;http://localhost:5126", 28 | "environmentVariables": { 29 | "ASPNETCORE_ENVIRONMENT": "Development" 30 | } 31 | }, 32 | "IIS Express": { 33 | "commandName": "IISExpress", 34 | "launchBrowser": true, 35 | "launchUrl": "swagger", 36 | "environmentVariables": { 37 | "ASPNETCORE_ENVIRONMENT": "Development" 38 | } 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /MicroServices/Api.ServicesManager/Services/QuartzApplicationServices.cs: -------------------------------------------------------------------------------- 1 | using Api.ServicesManager.Interfaces; 2 | using Api.ServicesManager.MicroService.Quartz; 3 | using Framework.loja.Interfaces; 4 | 5 | using static Api.ServicesManager.Contracts.QuartzApplicationServicesContract; 6 | 7 | namespace Api.ServicesManager.Services 8 | { 9 | public class QuartzApplicationServices : IApplicationService 10 | { 11 | private IHostedServices _services; 12 | public QuartzApplicationServices(IHostedServices services) 13 | { 14 | _services = services; 15 | } 16 | 17 | public async Task Handle(object command) => command switch 18 | { 19 | T1.StartQuartz cmd => _services.UpdateServiceState(true, typeof(QuartzMS)), 20 | T1.StopQuartz cmd => _services.UpdateServiceState(false, typeof(QuartzMS)), 21 | T1.GetQuartzState cmd =>await _services.GetState(typeof(QuartzMS)), 22 | _ => throw new InvalidOperationException("") 23 | }; 24 | 25 | 26 | 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /MicroServices/Api.ServicesManager/Services/SMApplicationServices.cs: -------------------------------------------------------------------------------- 1 | using Api.ServicesManager.Interfaces; 2 | using Api.ServicesManager.MicroService.Quartz; 3 | using Framework.loja.Interfaces; 4 | 5 | using static Api.ServicesManager.Contracts.SMApplicationServicesContract; 6 | 7 | 8 | namespace Api.ServicesManager.Services 9 | { 10 | 11 | public class SMApplicationServices : IApplicationService 12 | { 13 | private IHostedServices _host; 14 | public SMApplicationServices(IHostedServices host) 15 | { 16 | _host = host; 17 | } 18 | 19 | public async Task Handle(object command) => command switch 20 | { 21 | T1.StartAllServices cmd => _host.EnableAllServices(), 22 | T1.StopAllServices cmd => _host.DisableAllServices(), 23 | T1.GetAllServicesState cmd => await _host.GetAllServicesState(), 24 | _ => throw new InvalidOperationException("") 25 | }; 26 | 27 | 28 | 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /MicroServices/Api.ServicesManager/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | }, 8 | "AllowedHosts": "*", 9 | } 10 | -------------------------------------------------------------------------------- /MicroServices/Api.ServicesManager/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | }, 8 | "AllowedHosts": "*", 9 | } 10 | -------------------------------------------------------------------------------- /MicroServices/Integrations/QuartzScheduler/ConsoleLogProvider.cs: -------------------------------------------------------------------------------- 1 | using Quartz.Logging; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Diagnostics; 5 | using System.Linq; 6 | using System.Text; 7 | using System.Threading.Tasks; 8 | 9 | namespace MicroServices.Integrations.QuartzScheduler 10 | { 11 | public class ConsoleLogProvider : ILogProvider 12 | { 13 | public Logger GetLogger(string name) 14 | { 15 | return (level, func, exception, parameters) => 16 | { 17 | if (level >= LogLevel.Info && func != null) 18 | { 19 | Console.WriteLine("LOG SCHEDULER [" + DateTime.Now.ToLongTimeString() + "] [" + level + "] " + func(), parameters); 20 | Debug.WriteLine("LOG SCHEDULER [" + DateTime.Now.ToLongTimeString() + "] [" + level + "] " + func(), parameters); 21 | } 22 | return true; 23 | }; 24 | } 25 | 26 | public IDisposable OpenNestedContext(string message) 27 | { 28 | throw new NotImplementedException(); 29 | } 30 | 31 | public IDisposable OpenMappedContext(string key, object value, bool destructure = false) 32 | { 33 | throw new NotImplementedException(); 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /MicroServices/Integrations/QuartzScheduler/Contracts/QuartzSchedullerContracts.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace MicroServices.Integrations.QuartzScheduler.Contracts 8 | { 9 | public class QuartzSchedullerContracts 10 | { 11 | public class Q1 12 | { 13 | public record class ServiceStateResponse(); 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /MicroServices/Integrations/QuartzScheduler/Interfaces/IQuartzScheduler.cs: -------------------------------------------------------------------------------- 1 | using Quartz; 2 | using static MicroServices.Integrations.QuartzScheduler.Contracts.QuartzSchedullerContracts; 3 | namespace MicroServices.Integrations.QuartzScheduler.Interfaces 4 | { 5 | public interface IQuartzScheduler 6 | { 7 | Task Start(); 8 | Task Stop(); 9 | Task CreateJob(string jobName, string group , CronExpression cronExpression , Type t); 10 | IScheduler _scheduler { get; set; } 11 | Task GetServiceState(); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /MicroServices/Integrations/QuartzScheduler/Jobs/HelloWorldJob.cs: -------------------------------------------------------------------------------- 1 | using Quartz; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Diagnostics; 5 | using System.Linq; 6 | using System.Reflection.Emit; 7 | using System.Text; 8 | using System.Threading.Tasks; 9 | 10 | namespace MicroServices.Integrations.QuartzScheduler.Jobs 11 | { 12 | public class HelloWorldJob : IJob 13 | { 14 | public string path = Path.Combine(Directory.GetParent(AppContext.BaseDirectory).Parent.Parent.Parent.Parent.FullName, "Task Scheduler Test.file"); 15 | public async Task Execute(IJobExecutionContext context) 16 | { 17 | Console.WriteLine("HELLO WORLD"); 18 | Debug.WriteLine("HELLO WORLD"); 19 | 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /MicroServices/Integrations/QuartzScheduler/QuartzScheduler.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net8.0 5 | enable 6 | enable 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /MicroServices/Integrations/QuartzScheduler/ScheduleOnStart.cs: -------------------------------------------------------------------------------- 1 | using MicroServices.Integrations.QuartzScheduler.Jobs; 2 | using Quartz; 3 | 4 | namespace MicroServices.Integrations.QuartzScheduler 5 | { 6 | public record class ScheduledService(CronExpression cron , string jobName , string group , Type t); 7 | public class ScheduleOnStart 8 | { 9 | public List ServicesToScheduleOnStart { get; private set; } 10 | 11 | /// 12 | /// Constructor handles needed steps for quartz initialization

13 | /// Open console debug for watch ticks from cron

14 | /// Cron generator 15 | ///
16 | public ScheduleOnStart() 17 | { 18 | ServicesToScheduleOnStart = new List(); 19 | 20 | //Add here your services 21 | ServicesToScheduleOnStart.Add(new(new CronExpression("1 * * * * ?") , "HelloWorld" , "Group1" , typeof(HelloWorldJob))); 22 | 23 | //Validation 24 | EnsureValidState(); 25 | } 26 | private void EnsureValidState() 27 | { 28 | if (ServicesToScheduleOnStart.GroupBy(x => x.jobName).Count() > 1) 29 | throw new ArgumentException(); 30 | 31 | } 32 | 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /MicroServices/Integrations/QuartzScheduler/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "quartz.scheduler.instanceName" : "MyScheduler", 3 | "quartz.jobStore.type" :[ "Quartz.Simpl.RAMJobStore", "Quartz"], 4 | "quartz.threadPool.maxConcurrency" : 3 5 | } -------------------------------------------------------------------------------- /MicroServices/Integrations/RabbitMQ.loja/Configuration/Configurations.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Extensions.Configuration; 2 | using Microsoft.Extensions.Primitives; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Linq; 6 | using System.Text; 7 | using System.Threading.Tasks; 8 | 9 | namespace RabbitMQ.loja.Configuration 10 | { 11 | public class Configurations 12 | { 13 | public readonly IConfiguration _configuration; 14 | 15 | public Configurations() 16 | { 17 | string configFileName = "appsettings.json"; 18 | #if DEBUG 19 | configFileName = "appsettings.Development.json"; 20 | #endif 21 | var path = Path.Combine(Directory.GetParent(AppContext.BaseDirectory).Parent.Parent.Parent.Parent.FullName, "Integrations", "RabbitMQ.loja"); 22 | _configuration = new ConfigurationBuilder() 23 | .SetBasePath(path) 24 | .AddJsonFile(configFileName, false) 25 | .Build(); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /MicroServices/Integrations/RabbitMQ.loja/Interfaces/IFileUploadClient.cs: -------------------------------------------------------------------------------- 1 |  2 | using Dominio.loja.Dto.RabbitMQ; 3 | using Microsoft.AspNetCore.Http; 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Threading.Tasks; 9 | 10 | namespace RabbitMQ.loja.Interfaces 11 | { 12 | /// 13 | /// RabbitMQ FileUpload Client ,

14 | /// this client is responsible to send to FileUploadServer 15 | /// UploadQueueRequest should be generated from GetUploadQueuRequest

16 | /// 17 | ///
18 | public interface IFileUploadClient 19 | { 20 | 21 | void Dispose(); 22 | /// 23 | /// Sends a message to be processed on the server side and retrieves its response 24 | /// 25 | /// 26 | /// 27 | /// 28 | Task CallAsync(UploadQueueRequest message, CancellationToken cancellationToken = default); 29 | /// 30 | /// Retrieves the model to be used for CallAsync 31 | /// 32 | /// 33 | UploadQueueRequest GetUploadQueueRequest(IFormFile formFile, FileInfo fileInfo); 34 | 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /MicroServices/Integrations/RabbitMQ.loja/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "UploadQueue": { 3 | "QueueName": "UploadQueueDev", 4 | "HostName": "HostName" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /MicroServices/Integrations/RabbitMQ.loja/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "UploadQueue": { 3 | "QueueName": "UploadQueue", 4 | "HostName": "HostName" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /MicroServices/Integrations/TopShelf/Program.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.CompilerServices; 2 | namespace MicroServices.Integrations.TopShelf 3 | { 4 | public static class Program 5 | { 6 | public static void Main(string[] args) 7 | { 8 | 9 | 10 | } 11 | } 12 | } 13 | 14 | 15 | -------------------------------------------------------------------------------- /MicroServices/Integrations/TopShelf/TopShelf.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net8.0 6 | enable 7 | enable 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /MicroServices/Integrations/WFileUploader/Contracts/FileManagerLog.cs: -------------------------------------------------------------------------------- 1 |  2 | 3 | namespace WFileManager.Contracts 4 | { 5 | public class FileManagerLog 6 | { 7 | private record Event(DateTime eventTime, string description, bool success, string? type); 8 | private List Events { get; set; } 9 | public bool Success { get => !Events.Any(x => !x.success); } 10 | public virtual string ErrorLog { get => Events.Aggregate("", (agg, next) => next.success ? agg : $"{agg}\n {next.type??""} {next.description}"); } 11 | 12 | public FileManagerLog() 13 | { 14 | Events = new(); 15 | } 16 | public virtual void AddEvent(string description, bool success , string? type = null) => Events.Add(new(DateTime.Now, description, success , type)); 17 | 18 | 19 | 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /MicroServices/Integrations/WFileUploader/Contracts/Image.cs: -------------------------------------------------------------------------------- 1 | using System.Drawing; 2 | 3 | namespace WFileManager.Contracts 4 | { 5 | public class Images 6 | { 7 | public class UploadResponse : UploadContracts.UploadResponse 8 | { 9 | public int Width { get; private set; } 10 | public int Height { get; private set; } 11 | 12 | public UploadResponse(FileInfo file, string originalFileName, DirectoryInfo nonTemporaryDirectory) : base(file, originalFileName, nonTemporaryDirectory) 13 | { 14 | using (Bitmap bitmap = new Bitmap(base.FullName , true)) 15 | { 16 | Height = bitmap.Height; 17 | Width = bitmap.Width; 18 | } 19 | } 20 | public Bitmap GetBitMap() 21 | { 22 | var bitmap = new Bitmap(base.NonTemporaryFile.Exists ? base.NonTemporaryFile.FullName : base.FullName); 23 | return bitmap; 24 | } 25 | public override void Dispose(bool disposing) 26 | { 27 | if (!disposing) 28 | { 29 | base.Dispose(false); 30 | } 31 | } 32 | ~UploadResponse() 33 | { 34 | Dispose(base.Disposed); 35 | } 36 | } 37 | 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /MicroServices/Integrations/WFileUploader/Contracts/ReadContracts.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace WFileManager.Contracts 8 | { 9 | public class ReadContracts 10 | { 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /MicroServices/Integrations/WFileUploader/Enum/UploadOptions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace WFileManager.Enum 8 | { 9 | public enum UploadOptions 10 | { 11 | FormFileColletion = 0, 12 | FormFile = 1 , 13 | Stream = 2, 14 | FormFileArray = 3, 15 | Image = 4, 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /MicroServices/Integrations/WFileUploader/FileManager.cs: -------------------------------------------------------------------------------- 1 | using WFileManager.loja.Interfaces; 2 | 3 | namespace Integrations; 4 | 5 | public class FileManagerMS 6 | { 7 | public FileManagerMS() 8 | { 9 | 10 | } 11 | 12 | public Task> Start(IFileStrategy fileStrategy) where T : class 13 | { 14 | return fileStrategy.Start(); 15 | } 16 | 17 | public async void LogFile(IEnumerable files) 18 | { 19 | 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /MicroServices/Integrations/WFileUploader/Interfaces/IFileObserver.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace WFileManager.loja.Interfaces 8 | { 9 | public interface IFileObserver 10 | { 11 | 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /MicroServices/Integrations/WFileUploader/Interfaces/IFileStrategy.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using WFileManager.Contracts; 7 | 8 | namespace WFileManager.loja.Interfaces 9 | { 10 | public interface IFileStrategy 11 | { 12 | Task> Start() where T : class; 13 | FileManagerLog GetLog(); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /MicroServices/Integrations/WFileUploader/Utility/FileManagerUtility.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace WFileManager.loja.Utility 8 | { 9 | public class FileManagerUtility 10 | { 11 | 12 | public FileManagerUtility() 13 | { 14 | 15 | } 16 | public string GetFileExtension(string fileName) => fileName.Substring(fileName.LastIndexOf('.') , fileName.Length- fileName.LastIndexOf('.')); 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /MicroServices/Integrations/WFileUploader/WFileManager.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net8.0 5 | enable 6 | enable 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

Em desenvolvimento

2 |

BackEnd

3 |

TDD , SQLServer , Api , .Net8 ,efcore, efcore migrations , EPPLus , NPOI ,event drive domain, NLogger ,efcoreORM , DDD, RabbitMQ

4 |

Frontend

5 | 6 |

VueJs , Pinia , VuePrime , Tailwind , TypeScript , Vitest , TDD

7 |

api para mobile , loja cliente e loja admin

8 | 9 | -------------------------------------------------------------------------------- /Tests.Loja/Api/ApplicationService/UsersApplicationServiceTest.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace Tests.loja.Api.ApplicationService 9 | { 10 | [TestClass] 11 | class UsersApplicationServiceTest 12 | { 13 | 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Tests.Loja/Configuration.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Extensions.Configuration; 2 | 3 | namespace Tests.loja 4 | { 5 | public class Configuration 6 | { 7 | public readonly IConfiguration _configuration; 8 | public readonly DirectoryInfo _testDirPath; 9 | 10 | public Configuration(string project) 11 | { 12 | string configFileName = "appsettings.Development.json"; 13 | var path = Path.Combine(Directory.GetParent(AppContext.BaseDirectory).Parent.Parent.Parent.Parent.FullName, project); 14 | 15 | Path.Combine(Directory.GetParent(AppContext.BaseDirectory).Parent.Parent.Parent.Parent.FullName, project); 16 | _configuration = new ConfigurationBuilder() 17 | .SetBasePath(path) 18 | .AddJsonFile(configFileName, false) 19 | .Build(); 20 | 21 | _testDirPath = new(Path.Combine(Directory.GetParent(AppContext.BaseDirectory).Parent.Parent.Parent.Parent.FullName, "Tests.loja")); 22 | } 23 | public Configuration() 24 | { 25 | 26 | _testDirPath = new(Path.Combine(Directory.GetParent(AppContext.BaseDirectory).Parent.Parent.Parent.Parent.FullName, "Tests.loja")); 27 | } 28 | 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Tests.Loja/FrameworkTest/CustomAttributesTest/FirstLetterUppercaseAttributeTeste.cs: -------------------------------------------------------------------------------- 1 | using Dominio.loja.Entity; 2 | using Framework.loja; 3 | using Framework.loja.CustomAttributes; 4 | using Microsoft.VisualStudio.TestTools.UnitTesting; 5 | using System.ComponentModel.DataAnnotations; 6 | 7 | namespace Tests.loja.FrameworkTest.CustomAttributesTest 8 | { 9 | internal class TestEntity : Entity 10 | { 11 | [FirstLetterUppercase("Error")] 12 | public string Value { get; set; } 13 | 14 | protected override void When(object @event) 15 | { 16 | throw new NotImplementedException(); 17 | } 18 | } 19 | 20 | [TestClass] 21 | public class FirstLetterUppercaseAttributeTeste 22 | { 23 | 24 | [TestMethod] 25 | public void ReturnsFirstLetterUpperCased() 26 | { 27 | TestEntity test = new() 28 | { 29 | Value = "test" 30 | }; 31 | 32 | var context = new ValidationContext(test); 33 | 34 | try 35 | { 36 | Validator.ValidateObject(test, context, true); 37 | 38 | }catch(Exception ex) 39 | { 40 | Assert.IsNotNull(ex.Message); 41 | } 42 | 43 | 44 | 45 | } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /Tests.Loja/FrameworkTest/ExtensionMethodsTest/EntensionMethodsTest.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using Framework.loja.ExtensionMethods; 3 | 4 | 5 | namespace Tests.loja.FrameworkTest.ExtensionMethodsTest 6 | { 7 | [TestClass] 8 | public class EntensionMethodsTest 9 | { 10 | public EntensionMethodsTest() { } 11 | 12 | [TestMethod] 13 | public void VerifyIfAnObject_HasType_WithValue() 14 | { 15 | object obj = new { Prop = "Props" }; 16 | bool exists = obj.PropertyValueExists("Prop" , "Props"); 17 | 18 | Assert.IsTrue(exists); 19 | } 20 | 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Tests.Loja/FrameworkTest/UtilityTest/ReadableFileLengthTest.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using Framwork.loja.Utility.Files; 3 | using LogicExtensions; 4 | 5 | namespace Framework.loja.DomainTest.FileUploadTest 6 | { 7 | [TestClass] 8 | public class ReadableFileLengthTest 9 | { 10 | 11 | public ReadableFileLengthTest() { } 12 | 13 | [TestMethod] 14 | [DataRow(1)] 15 | [DataRow(1001)] 16 | [DataRow(1000001)] 17 | [DataRow(1000000001)] 18 | [DataRow(1000000000001)] 19 | public void ReadableFileLengthReturnsKB_MB_GB(long size) 20 | { 21 | string readableFileLength = (string)new ReadableFileLength(size); 22 | 23 | Assert.IsTrue(!readableFileLength.IsNullOrEmpty()); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Tests.Loja/MicroService/IntegrationsTest/WFileManagerTest/FileManagerLogTest.cs: -------------------------------------------------------------------------------- 1 | using LogicExtensions; 2 | using Microsoft.VisualStudio.TestTools.UnitTesting; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Linq; 6 | using System.Text; 7 | using System.Threading.Tasks; 8 | using WFileManager.Contracts; 9 | 10 | namespace Tests.loja.MicroService.IntegrationsTest.WFileManagerTest 11 | { 12 | [TestClass] 13 | public class FileManagerLogTest 14 | { 15 | 16 | public FileManagerLogTest() { } 17 | 18 | [TestMethod] 19 | public void TestFileManagerLogAndResultRetrieval() 20 | { 21 | FileManagerLog fml = new(); 22 | 23 | fml.AddEvent("Test", true, "TP"); 24 | fml.AddEvent("Test2", true, null); 25 | fml.AddEvent("Test3", true, "TP"); 26 | fml.AddEvent("Test4", true, "TP"); 27 | fml.AddEvent("Test5", false, "TP"); 28 | fml.AddEvent("Test6", true, "TP"); 29 | 30 | string elog = fml.ErrorLog; 31 | Assert.IsFalse(fml.Success); 32 | Assert.IsFalse(elog.IsNullOrEmpty()); 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /Tests.Loja/MicroService/IntegrationsTest/WFileManagerTest/FileManagerUtility.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | using WFileManager.loja.Utility; 8 | 9 | namespace Tests.loja.MicroServices.IntegrationsTest.WFileManagerTest 10 | { 11 | [TestClass] 12 | public class FileManagerUtilityTest 13 | { 14 | private readonly FileManagerUtility _utility; 15 | public FileManagerUtilityTest() => _utility = new FileManagerUtility(); 16 | 17 | [TestMethod] 18 | public void FileManagerUtilityTestReturnsExtension() 19 | { 20 | string ext = _utility.GetFileExtension("testCase.txt"); 21 | Assert.IsTrue(ext.Equals(".txt")); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Tests.Loja/TestAttributes/TestClassAttributes.cs: -------------------------------------------------------------------------------- 1 | using NPOI.SS.Formula.Functions; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace Tests.Loja.Attributes 9 | { 10 | [AttributeUsage(AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.Property, AllowMultiple=false)] 11 | public class TestClassAttribute : Attribute 12 | { 13 | public string value { get; set; } 14 | 15 | public DateTime LastModified { get; set; } 16 | public TestClassAttribute(string field) 17 | { 18 | value = field; 19 | LastModified = DateTime.Now; 20 | } 21 | public bool ValidateLength(int size ,string value ) 22 | { 23 | 24 | return value.Length > size; 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Tests.Loja/TestFiles/TestImages/testfile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/waltereidi/Loja/feba7bc63a0f5eb874a1e15b64c26e9e95bbe3e3/Tests.Loja/TestFiles/TestImages/testfile.png -------------------------------------------------------------------------------- /Tests.Loja/TestFilesReader.cs: -------------------------------------------------------------------------------- 1 | using NPOI.POIFS.NIO; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace Tests.loja 9 | { 10 | public class TestFilesReader : Configuration 11 | { 12 | public readonly DirectoryInfo TestImagesDir; 13 | 14 | public TestFilesReader() : base() 15 | { 16 | TestImagesDir = new(base._testDirPath.FullName + "/TestFiles/TestImages/"); 17 | 18 | } 19 | public MemoryStream GetTestImage() 20 | { 21 | var file = TestImagesDir.GetFiles().First(); 22 | 23 | var fs = new FileStream(file.FullName, FileMode.Open, FileAccess.Read); 24 | 25 | MemoryStream ms = new MemoryStream(); 26 | fs.CopyTo(ms); 27 | return ms; 28 | } 29 | public FileInfo GetTestImageFi() 30 | { 31 | var file = TestImagesDir.GetFiles().First(); 32 | var fi = new FileInfo(file.FullName); 33 | return fi; 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /Utils.loja/Enums/NPOISheetStyles.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Utils.loja.Enums 8 | { 9 | public enum NPOISheetStyles 10 | { 11 | LightOrange = 0, 12 | SkyBlue = 1, 13 | LightGreen = 2, 14 | Gray = 3, 15 | Aqua = 4, 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Utils.loja/Utils.loja.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net8.0 5 | enable 6 | enable 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | --------------------------------------------------------------------------------