commit af53445c269342e69913f8514806d01f04520f03 Author: MasterJah Date: Fri Feb 20 13:30:03 2026 +0300 init: чистый старт Laravel + Vuexy diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..63c8c4c --- /dev/null +++ b/.editorconfig @@ -0,0 +1,38 @@ +# EditorConfig is awesome: https://EditorConfig.org + +# top-most EditorConfig file +root = true + +# Unix-style newlines with a newline ending every file +[*] +end_of_line = lf +insert_final_newline = true + +# Matches multiple files with brace expansion notation +# Set default charset +[*.{js,py}] +charset = utf-8 + +# 4 space indentation +[*.py] +indent_style = space +indent_size = 4 + +# 2 space indentation +[*.{vue,scss,ts}] +indent_style = space +indent_size = 2 + +# Tab indentation (no size specified) +[Makefile] +indent_style = tab + +# Indentation override for all JS under lib directory +[lib/**.js] +indent_style = space +indent_size = 2 + +# Matches the exact files either package.json or .travis.yml +[{package.json,.travis.yml}] +indent_style = space +indent_size = 2 diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..6d34b38 --- /dev/null +++ b/.env.example @@ -0,0 +1,67 @@ +APP_NAME=Laravel +APP_ENV=local +APP_KEY= +APP_DEBUG=true +APP_URL=http://localhost + +APP_LOCALE=en +APP_FALLBACK_LOCALE=en +APP_FAKER_LOCALE=en_US + +APP_MAINTENANCE_DRIVER=file +# APP_MAINTENANCE_STORE=database + +PHP_CLI_SERVER_WORKERS=4 + +BCRYPT_ROUNDS=12 + +LOG_CHANNEL=stack +LOG_STACK=single +LOG_DEPRECATIONS_CHANNEL=null +LOG_LEVEL=debug + +DB_CONNECTION=sqlite +# DB_HOST=127.0.0.1 +# DB_PORT=3306 +# DB_DATABASE=laravel +# DB_USERNAME=root +# DB_PASSWORD= + +SESSION_DRIVER=database +SESSION_LIFETIME=120 +SESSION_ENCRYPT=false +SESSION_PATH=/ +SESSION_DOMAIN=null + +BROADCAST_CONNECTION=log +FILESYSTEM_DISK=local +QUEUE_CONNECTION=database + +CACHE_STORE=database +# CACHE_PREFIX= + +MEMCACHED_HOST=127.0.0.1 + +REDIS_CLIENT=phpredis +REDIS_HOST=127.0.0.1 +REDIS_PASSWORD=null +REDIS_PORT=6379 + +MAIL_MAILER=log +MAIL_SCHEME=null +MAIL_HOST=127.0.0.1 +MAIL_PORT=2525 +MAIL_USERNAME=null +MAIL_PASSWORD=null +MAIL_FROM_ADDRESS="hello@example.com" +MAIL_FROM_NAME="${APP_NAME}" + +AWS_ACCESS_KEY_ID= +AWS_SECRET_ACCESS_KEY= +AWS_DEFAULT_REGION=us-east-1 +AWS_BUCKET= +AWS_USE_PATH_STYLE_ENDPOINT=false + +VITE_APP_NAME="${APP_NAME}" +VITE_API_BASE_URL= +VITE_MAPBOX_ACCESS_TOKEN= \ No newline at end of file diff --git a/.eslintrc.cjs b/.eslintrc.cjs new file mode 100644 index 0000000..17ba468 --- /dev/null +++ b/.eslintrc.cjs @@ -0,0 +1,238 @@ +module.exports = { + env: { + browser: true, + es2021: true, + }, + extends: [ + '@antfu/eslint-config-vue', + 'plugin:vue/vue3-recommended', + 'plugin:import/recommended', + 'plugin:import/typescript', + 'plugin:promise/recommended', + 'plugin:sonarjs/recommended', + 'plugin:@typescript-eslint/recommended', + 'plugin:case-police/recommended', + 'plugin:regexp/recommended', + + // 'plugin:unicorn/recommended', + ], + parser: 'vue-eslint-parser', + parserOptions: { + ecmaVersion: 13, + parser: '@typescript-eslint/parser', + sourceType: 'module', + }, + plugins: [ + 'vue', + '@typescript-eslint', + 'regex', + 'regexp', + ], + ignorePatterns: ['resources/ts/plugins/iconify/*.js', 'node_modules', 'dist', '*.d.ts', 'vendor', '*.json'], + rules: { + 'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off', + 'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off', + + // indentation (Already present in TypeScript) + 'comma-spacing': ['error', { before: false, after: true }], + 'key-spacing': ['error', { afterColon: true }], + 'n/prefer-global/process': ['off'], + 'sonarjs/cognitive-complexity': ['off'], + + 'vue/first-attribute-linebreak': ['error', { + singleline: 'beside', + multiline: 'below', + }], + + 'antfu/top-level-function': 'off', + '@typescript-eslint/no-explicit-any': 'off', + + // indentation (Already present in TypeScript) + 'indent': ['error', 2], + + // Enforce trailing comma (Already present in TypeScript) + 'comma-dangle': ['error', 'always-multiline'], + + // Enforce consistent spacing inside braces of object (Already present in TypeScript) + 'object-curly-spacing': ['error', 'always'], + + // Enforce camelCase naming convention + 'camelcase': 'error', + + // Disable max-len + 'max-len': 'off', + + // we don't want it + 'semi': ['error', 'never'], + + // add parens ony when required in arrow function + 'arrow-parens': ['error', 'as-needed'], + + // add new line above comment + 'newline-before-return': 'error', + + // add new line above comment + 'lines-around-comment': [ + 'error', + { + beforeBlockComment: true, + beforeLineComment: true, + allowBlockStart: true, + allowClassStart: true, + allowObjectStart: true, + allowArrayStart: true, + + // We don't want to add extra space above closing SECTION + ignorePattern: '!SECTION', + }, + ], + + // Ignore _ as unused variable + '@typescript-eslint/no-unused-vars': ['error', { varsIgnorePattern: '^_+$', argsIgnorePattern: '^_+$' }], + + 'array-element-newline': ['error', 'consistent'], + 'array-bracket-newline': ['error', 'consistent'], + + 'vue/multi-word-component-names': 'off', + + 'padding-line-between-statements': [ + 'error', + { blankLine: 'always', prev: 'expression', next: 'const' }, + { blankLine: 'always', prev: 'const', next: 'expression' }, + { blankLine: 'always', prev: 'multiline-const', next: '*' }, + { blankLine: 'always', prev: '*', next: 'multiline-const' }, + ], + + // Plugin: eslint-plugin-import + 'import/prefer-default-export': 'off', + 'import/newline-after-import': ['error', { count: 1 }], + 'no-restricted-imports': ['error', 'vuetify/components', { + name: 'vue3-apexcharts', + message: 'apexcharts are auto imported', + }], + + // For omitting extension for ts files + 'import/extensions': [ + 'error', + 'ignorePackages', + { + js: 'never', + jsx: 'never', + ts: 'never', + tsx: 'never', + }, + ], + + // ignore virtual files + 'import/no-unresolved': [2, { + ignore: [ + '~pages$', + 'virtual:meta-layouts', + '#auth$', + '#components$', + + // Ignore vite's ?raw imports + '.*\?raw', + ], + }], + + // Thanks: https://stackoverflow.com/a/63961972/10796681 + 'no-shadow': 'off', + '@typescript-eslint/no-shadow': ['error'], + + '@typescript-eslint/consistent-type-imports': 'error', + + // Plugin: eslint-plugin-promise + 'promise/always-return': 'off', + 'promise/catch-or-return': 'off', + + // ESLint plugin vue + 'vue/block-tag-newline': 'error', + 'vue/component-api-style': 'error', + 'vue/component-name-in-template-casing': ['error', 'PascalCase', { registeredComponentsOnly: false, ignores: ['/^swiper-/'] }], + 'vue/custom-event-name-casing': ['error', 'camelCase', { + ignores: [ + '/^(click):[a-z]+((\d)|([A-Z0-9][a-z0-9]+))*([A-Z])?/', + ], + }], + 'vue/define-macros-order': 'error', + 'vue/html-comment-content-newline': 'error', + 'vue/html-comment-content-spacing': 'error', + 'vue/html-comment-indent': 'error', + 'vue/match-component-file-name': 'error', + 'vue/no-child-content': 'error', + 'vue/require-default-prop': 'off', + + 'vue/no-duplicate-attr-inheritance': 'error', + 'vue/no-empty-component-block': 'error', + 'vue/no-multiple-objects-in-class': 'error', + 'vue/no-reserved-component-names': 'error', + 'vue/no-template-target-blank': 'error', + 'vue/no-useless-mustaches': 'error', + 'vue/no-useless-v-bind': 'error', + 'vue/padding-line-between-blocks': 'error', + 'vue/prefer-separate-static-class': 'error', + 'vue/prefer-true-attribute-shorthand': 'error', + 'vue/v-on-function-call': 'error', + 'vue/no-restricted-class': ['error', '/^(p|m)(l|r)-/'], + 'vue/valid-v-slot': ['error', { + allowModifiers: true, + }], + + // -- Extension Rules + 'vue/no-irregular-whitespace': 'error', + 'vue/template-curly-spacing': 'error', + + // -- Sonarlint + 'sonarjs/no-duplicate-string': 'off', + 'sonarjs/no-nested-template-literals': 'off', + + // -- Unicorn + // 'unicorn/filename-case': 'off', + // 'unicorn/prevent-abbreviations': ['error', { + // replacements: { + // props: false, + // }, + // }], + + // https://github.com/gmullerb/eslint-plugin-regex + 'regex/invalid': [ + 'error', + [ + { + regex: '@/assets/images', + replacement: '@images', + message: 'Use \'@images\' path alias for image imports', + }, + { + regex: '@/assets/styles', + replacement: '@styles', + message: 'Use \'@styles\' path alias for importing styles from \'resources/ts/assets/styles\'', + }, + { + regex: '@core/\\w', + message: 'You can\'t use @core when you are in @layouts module', + files: { + inspect: '@layouts/.*', + }, + }, + { + regex: 'useLayouts\\(', + message: '`useLayouts` composable is only allowed in @layouts & @core directory. Please use `useThemeConfig` composable instead.', + files: { + inspect: '^(?!.*(@core|@layouts)).*', + }, + }, + ], + + // Ignore files + '\.eslintrc\.cjs', + ], + }, + settings: { + 'import/resolver': { + node: true, + typescript: {}, + }, + }, +} diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..93c1acf --- /dev/null +++ b/.gitattributes @@ -0,0 +1,207 @@ +## GITATTRIBUTES FOR WEB PROJECTS +# +# These settings are for any web project. +# +# Details per file setting: +# text These files should be normalized (i.e. convert CRLF to LF). +# binary These files are binary and should be left untouched. +# +# Note that binary is a macro for -text -diff. +###################################################################### + +# Auto detect +## Handle line endings automatically for files detected as +## text and leave all files detected as binary untouched. +## This will handle all files NOT defined below. +* text=auto + +# Source code +*.bash text eol=lf +*.bat text eol=crlf +*.cmd text eol=crlf +*.coffee text +*.css text diff=css +*.htm text diff=html +*.html text diff=html +*.inc text +*.ini text +*.js text +*.json text +*.jsx text +*.less text +*.ls text +*.map text -diff +*.od text +*.onlydata text +*.php text diff=php +*.pl text +*.ps1 text eol=crlf +*.py text diff=python +*.rb text diff=ruby +*.sass text +*.scm text +*.scss text diff=css +*.sh text eol=lf +.husky/* text eol=lf +*.sql text +*.styl text +*.tag text +*.ts text +*.tsx text +*.xml text +*.xhtml text diff=html + +# Docker +Dockerfile text + +# Documentation +*.ipynb text eol=lf +*.markdown text diff=markdown +*.md text diff=markdown +*.mdwn text diff=markdown +*.mdown text diff=markdown +*.mkd text diff=markdown +*.mkdn text diff=markdown +*.mdtxt text +*.mdtext text +*.txt text +AUTHORS text +CHANGELOG text +CHANGES text +CONTRIBUTING text +COPYING text +copyright text +*COPYRIGHT* text +INSTALL text +license text +LICENSE text +NEWS text +readme text +*README* text +TODO text + +# Templates +*.dot text +*.ejs text +*.erb text +*.haml text +*.handlebars text +*.hbs text +*.hbt text +*.jade text +*.latte text +*.mustache text +*.njk text +*.phtml text +*.svelte text +*.tmpl text +*.tpl text +*.twig text +*.vue text + +# Configs +*.cnf text +*.conf text +*.config text +.editorconfig text +.env text +.gitattributes text +.gitconfig text +.htaccess text +*.lock text -diff +package.json text eol=lf +package-lock.json text eol=lf -diff +pnpm-lock.yaml text eol=lf -diff +.prettierrc text +yarn.lock text -diff +*.toml text +*.yaml text +*.yml text +browserslist text +Makefile text +makefile text + +# Heroku +Procfile text + +# Graphics +*.ai binary +*.bmp binary +*.eps binary +*.gif binary +*.gifv binary +*.ico binary +*.jng binary +*.jp2 binary +*.jpg binary +*.jpeg binary +*.jpx binary +*.jxr binary +*.pdf binary +*.png binary +*.psb binary +*.psd binary +# SVG treated as an asset (binary) by default. +*.svg text +# If you want to treat it as binary, +# use the following line instead. +# *.svg binary +*.svgz binary +*.tif binary +*.tiff binary +*.wbmp binary +*.webp binary + +# Audio +*.kar binary +*.m4a binary +*.mid binary +*.midi binary +*.mp3 binary +*.ogg binary +*.ra binary + +# Video +*.3gpp binary +*.3gp binary +*.as binary +*.asf binary +*.asx binary +*.avi binary +*.fla binary +*.flv binary +*.m4v binary +*.mng binary +*.mov binary +*.mp4 binary +*.mpeg binary +*.mpg binary +*.ogv binary +*.swc binary +*.swf binary +*.webm binary + +# Archives +*.7z binary +*.gz binary +*.jar binary +*.rar binary +*.tar binary +*.zip binary + +# Fonts +*.ttf binary +*.eot binary +*.otf binary +*.woff binary +*.woff2 binary + +# Executables +*.exe binary +*.pyc binary + +# RC files (like .babelrc or .eslintrc) +*.*rc text + +# Ignore files (like .npmignore or .gitignore) +*.*ignore text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6a3c0e1 --- /dev/null +++ b/.gitignore @@ -0,0 +1,66 @@ +/.phpunit.cache +/node_modules +/public/build +/public/hot +/public/storage +/storage/*.key +/storage/pail +/vendor +.env +.env.backup +.env.production +.phpactor.json +.phpunit.result.cache +Homestead.json +Homestead.yaml +npm-debug.log +yarn-error.log +/auth.json +/.fleet +/.idea +/.nova +/.zed + +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + +node_modules +.DS_Store +dist +dist-ssr +*.local + +/cypress/videos/ +/cypress/screenshots/ + +# 👉 Custom Git ignores + +# Editor directories and files +.vscode/* +!.vscode/extensions.json +!.vscode/settings.json +!.vscode/*.code-snippets +!.vscode/tours +.idea +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? +.yarn + +# iconify dist files +resources/ts/plugins/iconify/icons.css + +# Ignore MSW script +public/mockServiceWorker.js + +# Env files +.env* +!.env.example diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..4b10cef --- /dev/null +++ b/.npmrc @@ -0,0 +1,2 @@ +auto-install-peers=true +shamefully-hoist=true diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 0000000..b009dfb --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +lts/* diff --git a/.stylelintrc.json b/.stylelintrc.json new file mode 100644 index 0000000..ecf5829 --- /dev/null +++ b/.stylelintrc.json @@ -0,0 +1,46 @@ +{ + "extends": [ + "stylelint-config-standard-scss", + "stylelint-config-idiomatic-order", + "@stylistic/stylelint-config" + ], + "plugins": [ + "stylelint-use-logical-spec", + "@stylistic/stylelint-plugin" + ], + "overrides": [ + { + "files": [ + "**/*.scss" + ], + "customSyntax": "postcss-scss" + }, + { + "files": [ + "**/*.vue" + ], + "customSyntax": "postcss-html" + } + ], + "rules": { + "@stylistic/max-line-length": [ + 220, + { + "ignore": "comments" + } + ], + "@stylistic/indentation": 2, + "liberty/use-logical-spec": true, + "selector-class-pattern": null, + "color-function-notation": null, + "annotation-no-unknown": [ + true, + { + "ignoreAnnotations": [ + "default" + ] + } + ], + "media-feature-range-notation": null + } +} diff --git a/.vscode/anchor-comments.code-snippets b/.vscode/anchor-comments.code-snippets new file mode 100644 index 0000000..7342c88 --- /dev/null +++ b/.vscode/anchor-comments.code-snippets @@ -0,0 +1,23 @@ +{ + "Add hand emoji": { + "prefix": "cm-hand-emoji", + "body": [ + "👉" + ], + "description": "Add hand emoji" + }, + "Add info emoji": { + "prefix": "cm-info-emoji", + "body": [ + "ℹ️" + ], + "description": "Add info emoji" + }, + "Add warning emoji": { + "prefix": "cm-warning-emoji", + "body": [ + "❗" + ], + "description": "Add warning emoji" + } +} diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000..27843f1 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,15 @@ +{ + "recommendations": [ + "dbaeumer.vscode-eslint", + "editorconfig.editorconfig", + "xabikos.javascriptsnippets", + "stylelint.vscode-stylelint", + "fabiospampinato.vscode-highlight", + "github.vscode-pull-request-github", + "vue.volar", + "antfu.iconify", + "cipchk.cssrem", + "matijao.vue-nuxt-snippets", + "dongido.sync-env" + ] +} diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..d2ee012 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,96 @@ +{ + "editor.formatOnSave": true, + "files.insertFinalNewline": true, + "javascript.updateImportsOnFileMove.enabled": "always", + "[javascript]": { + "editor.defaultFormatter": "dbaeumer.vscode-eslint" + }, + "[typescript]": { + "editor.defaultFormatter": "dbaeumer.vscode-eslint", + "editor.autoClosingBrackets": "always" + }, + "[markdown]": { + "editor.defaultFormatter": "DavidAnson.vscode-markdownlint" + }, + "[scss]": { + "editor.defaultFormatter": "stylelint.vscode-stylelint" + }, + "[json]": { + "editor.defaultFormatter": "vscode.json-language-features" + }, + "[jsonc]": { + "editor.defaultFormatter": "vscode.json-language-features" + }, + "[vue]": { + "editor.defaultFormatter": "dbaeumer.vscode-eslint" + }, + "volar.preview.port": 3000, + "volar.completion.preferredTagNameCase": "pascal", + "eslint.options": {}, + "editor.codeActionsOnSave": { + "source.fixAll.eslint": "explicit", + "source.fixAll.stylelint": "explicit", + "source.organizeImports": "explicit" + }, + "eslint.alwaysShowStatus": true, + "eslint.format.enable": true, + "eslint.packageManager": "pnpm", + "stylelint.packageManager": "pnpm", + "stylelint.validate": [ + "css", + "scss", + "vue" + ], + "cSpell.words": [ + "addressline", + "Composables", + "Customizer", + "destr", + "flagpack", + "Iconify", + "nuxt", + "ofetch", + "psudo", + "stylelint", + "touchless", + "triggerer", + "vuetify" + ], + "commentAnchors.tags.anchors": { + "ℹ️": { + "scope": "hidden", + "highlightColor": "#3498DB", + "styleComment": true, + "isItalic": false + }, + "👉": { + "scope": "file", + "highlightColor": "#98C379", + "styleComment": true, + "isItalic": false + }, + "❗": { + "scope": "hidden", + "highlightColor": "#FF2D00", + "styleComment": true, + "isItalic": false + } + }, + "highlight.regexFlags": "gi", + "highlight.regexes": { + "(100vh|translate|margin:|padding:|margin-left|margin-right|rotate|text-align|border-top|border-right|border-bottom|border-left|float|background-position|transform|width|height|top|left|bottom|right|float|clear|(p|m)(l|r)-|border-(start|end)-(start|end)-radius)": [ + { + "borderWidth": "1px", + "borderColor": "tomato", + "borderStyle": "solid" + } + ], + "(overflow-x:|overflow-y:)": [ + { + "borderWidth": "1px", + "borderColor": "green", + "borderStyle": "solid" + } + ] + } +} diff --git a/.vscode/vue-ts.code-snippets b/.vscode/vue-ts.code-snippets new file mode 100644 index 0000000..360713a --- /dev/null +++ b/.vscode/vue-ts.code-snippets @@ -0,0 +1,18 @@ +{ + "Vue TS - DefineProps": { + "prefix": "dprops", + "body": [ + "defineProps<${1:Props}>()" + ], + "description": "DefineProps in script setup" + }, + "Vue TS - Props interface": { + "prefix": "iprops", + "body": [ + "interface Props {", + " ${1}", + "}" + ], + "description": "Create props interface in script setup" + } +} diff --git a/.vscode/vue.code-snippets b/.vscode/vue.code-snippets new file mode 100644 index 0000000..814d167 --- /dev/null +++ b/.vscode/vue.code-snippets @@ -0,0 +1,63 @@ +{ + "script": { + "prefix": "vue-sfc-ts", + "body": [ + "", + "", + "", + "", + "", + "" + ], + "description": "Vue SFC Typescript" + }, + "template": { + "scope": "vue", + "prefix": "template", + "body": [ + "" + ], + "description": "Create