Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
whoami15 committed Aug 13, 2023
1 parent ba5c35c commit 1537877
Show file tree
Hide file tree
Showing 46 changed files with 10,310 additions and 4,815 deletions.
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

[*.{vue,js,json,css,scss}]
indent_size = 2

[*.md]
trim_trailing_whitespace = false

Expand Down
4 changes: 4 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules
./vendor
./public
./public/dist
40 changes: 40 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
module.exports = {
extends: ["eslint:recommended", "plugin:vue/vue3-recommended", "prettier"],
plugins: ["unused-imports"],
rules: {
"vue/component-tags-order": [
"error",
{
order: ["script", "template", "style"],
},
],
"vue/multi-word-component-names": "off",
"vue/component-api-style": ["error", ["script-setup", "composition"]],
"vue/component-name-in-template-casing": "error",
"vue/define-macros-order": [
"warn",
{
order: ["defineProps", "defineEmits"],
},
],
"vue/define-emits-declaration": ["error", "type-based"],
"vue/define-props-declaration": ["error", "type-based"],
"vue/match-component-import-name": "error",
"vue/no-ref-object-destructure": "error",
"vue/no-unused-refs": "error",
"vue/no-useless-v-bind": "error",
"vue/padding-line-between-tags": "warn",
"vue/prefer-separate-static-class": "error",
"vue/prefer-true-attribute-shorthand": "error",
"vue/no-v-html": "off",

"no-undef": "off",
"no-unused-vars": "off",
"no-console": ["warn"],
},
parser: "vue-eslint-parser",
parserOptions: {
ecmaVersion: 2021,
sourceType: "module",
},
};
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
shamefully-hoist=true
Empty file added .prettierignore
Empty file.
14 changes: 14 additions & 0 deletions app/Enums/NotificationType.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?php

declare(strict_types=1);

namespace App\Enums;

enum NotificationType: string
{
case SUCCESS = 'success';
case ERROR = 'error';
case WARNING = 'warning';
case INFO = 'info';
case DEFAULT = 'default';
}
12 changes: 11 additions & 1 deletion app/Providers/AppServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

namespace App\Providers;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Http\Resources\Json\JsonResource;
use Illuminate\Support\Facades\App;
use Illuminate\Support\Facades\Schema;
use Illuminate\Support\ServiceProvider;

class AppServiceProvider extends ServiceProvider
Expand All @@ -19,6 +23,12 @@ public function register(): void
*/
public function boot(): void
{
//
JsonResource::withoutWrapping();

Model::shouldBeStrict(! App::isProduction());

Model::unguard();

Schema::defaultStringLength(191);
}
}
33 changes: 33 additions & 0 deletions app/Providers/InertiaServiceProvider.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?php

namespace App\Providers;

use App\Enums\NotificationType;
use Illuminate\Http\RedirectResponse;
use Illuminate\Support\ServiceProvider;

class InertiaServiceProvider extends ServiceProvider
{
public function register(): void
{
RedirectResponse::macro('flash', function (NotificationType $type, string $body) {
session()->flash('notification', [
'type' => $type,
'body' => $body,
]);

/** @var RedirectResponse $this */
return $this;
});

RedirectResponse::macro('success', function (string $body) {
/** @var RedirectResponse $this */
return $this->flash(NotificationType::SUCCESS, $body);
});

RedirectResponse::macro('error', function (string $body) {
/** @var RedirectResponse $this */
return $this->flash(NotificationType::ERROR, $body);
});
}
}
1 change: 1 addition & 0 deletions bootstrap/helpers.php
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<?php
63 changes: 49 additions & 14 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,45 @@
"license": "MIT",
"require": {
"php": "^8.1",
"guzzlehttp/guzzle": "^7.2",
"inertiajs/inertia-laravel": "^0.6.8",
"bepsvpt/secure-headers": "^7.4",
"doctrine/dbal": "^3.6.5",
"guzzlehttp/guzzle": "^7.7",
"hammerstone/fast-paginate": "^0.1.12",
"inertiajs/inertia-laravel": "^0.6.9",
"laravel/breeze": "^1.23",
"laravel/framework": "^10.10",
"laravel/sanctum": "^3.2",
"laravel/tinker": "^2.8",
"tightenco/ziggy": "^1.0"
"laravel/framework": "^10.18",
"laravel/sanctum": "^3.2.5",
"laravel/tinker": "^2.8.1",
"protonemedia/laravel-xss-protection": "^1.4",
"spatie/laravel-ray": "^1.32.6",
"symfony/http-client": "^6.3.2",
"symfony/mailgun-mailer": "^6.3.2",
"tightenco/ziggy": "^1.6.1"
},
"require-dev": {
"fakerphp/faker": "^1.9.1",
"laravel/pint": "^1.0",
"laravel/sail": "^1.18",
"mockery/mockery": "^1.4.4",
"nunomaduro/collision": "^7.0",
"phpunit/phpunit": "^10.1",
"spatie/laravel-ignition": "^2.0"
"barryvdh/laravel-debugbar": "^3.8.2",
"barryvdh/laravel-ide-helper": "^2.13",
"fakerphp/faker": "^1.23.0",
"jasonmccreary/laravel-test-assertions": "^2.3",
"laravel/pint": "^1.10.6",
"laravel/sail": "^1.23.2",
"mockery/mockery": "^1.6.6",
"nunomaduro/collision": "^7.8.1",
"nunomaduro/larastan": "^2.6.4",
"phpunit/phpunit": "^10.3.1",
"roave/security-advisories": "dev-latest",
"spatie/laravel-ignition": "^2.2",
"tightenco/duster": "^2.2"
},
"autoload": {
"psr-4": {
"App\\": "app/",
"Database\\Factories\\": "database/factories/",
"Database\\Seeders\\": "database/seeders/"
}
},
"files": [
"bootstrap/helpers.php"
]
},
"autoload-dev": {
"psr-4": {
Expand All @@ -48,6 +64,25 @@
],
"post-create-project-cmd": [
"@php artisan key:generate --ansi"
],
"test": [
"phpunit --colors=always"
],
"test-coverage": [
"XDEBUG_MODE=coverage phpunit --colors=always --coverage-html=tests/html-coverage"
],
"ide-helper-update": [
"@php artisan clear-compiled",
"@php artisan ide-helper:generate",
"@php artisan ide-helper:eloquent",
"@php artisan ide-helper:meta",
"@php artisan ide-helper:models --write"
],
"lint": [
"vendor/bin/duster fix"
],
"larastan": [
"@php vendor/bin/phpstan analyse --memory-limit=2G"
]
},
"extra": {
Expand Down
Loading

0 comments on commit 1537877

Please sign in to comment.