Skip to content

Commit

Permalink
release stable v1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
reyptr27 committed Jul 29, 2024
1 parent b478c94 commit 3bd2444
Show file tree
Hide file tree
Showing 143 changed files with 7,913 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
module.exports = {
extends: ["eslint:recommended", "plugin:vue/vue3-recommended", "plugin:vue/vue3-essential", "plugin:vue/vue3-strongly-recommended"],
rules: {
"no-undef": 0,
"no-unused-vars": 0,
"vue/multi-word-component-names": 0,
"vue/no-v-html": 0,
"vue/require-default-prop": 0,
indent: ["error", 4],
quotes: ["error", "double"],
"object-curly-spacing": ["error", "always"],
semi: ["error", "always"],
"comma-spacing": ["error", { before: false, after: true }],
},
};
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github: [reyptr27]
82 changes: 82 additions & 0 deletions .github/workflows/coding-standards.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: "Coding Standards"
on: [push]
jobs:
coding-standards:
runs-on: ubuntu-latest

strategy:
matrix:
php-version:
- "8.2"
node-version:
- 20.14.0

steps:
- name: Checkout code
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}

- name: "Install Node"
uses: actions/setup-node@v1
with:
node-version: "${{ matrix.node-version }}"

- name: "Install PHP with extensions"
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
php-version: "${{ matrix.php-version }}"

- name: Cache node modules
id: cache-npm
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- if: ${{ steps.cache-npm.outputs.cache-hit == 'false' }}
name: List the state of node modules
continue-on-error: true
run: npm list

- name: "Install locked dependencies with npm"
run: "npm ci --ignore-scripts"

- name: "Cache dependencies installed with composer"
uses: "actions/cache@v2"
with:
path: "~/.composer/cache"
key: "php-${{ matrix.php-version }}-composer-${{ hashFiles('composer.lock') }}"
restore-keys: "php-${{ matrix.php-version }}-composer-"

- name: "Install locked dependencies with composer"
run: "composer install --no-interaction --no-progress --no-suggest"

- name: "Create cache directory for friendsofphp/php-cs-fixer"
run: mkdir -p .build/php-cs-fixer

- name: "Cache cache directory for friendsofphp/php-cs-fixer"
uses: "actions/cache@v2"
with:
path: "~/.build/php-cs-fixer"
key: "php-${{ matrix.php-version }}-php-cs-fixer-${{ github.sha }}"
restore-keys: "php-${{ matrix.php-version }}-php-cs-fixer-"

- name: "Run eslint"
run: "npm run eslint"

- name: "Run friendsofphp/php-cs-fixer"
run: "composer php-cs-fixer"

- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Fix styling
108 changes: 108 additions & 0 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
name: run-tests

on: [push, pull_request]

jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
php: [8.2, 8.1]
laravel: ["11"]
dependency-version: [prefer-lowest, prefer-stable]

name: L${{ matrix.laravel}} - P${{ matrix.php }} - ${{ matrix.dependency-version }}

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Cache node modules
id: cache-npm
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- if: ${{ steps.cache-npm.outputs.cache-hit == 'false' }}
name: List the state of node modules
continue-on-error: true
run: npm list

- name: "Install locked dependencies with npm"
run: |
npm ci --ignore-scripts
- name: Build package
run: |
npm run build
npm pack
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, mysql, mysqli, pdo_mysql
coverage: none

- name: Downgrade to Laravel 9
run: |
cd app
rm composer.json
mv composer-l9.json composer.json
if: "matrix.laravel == '9'"

- name: Prepare demo app
run: |
cd app
cp .env.example .env
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-suggest
npm ci --ignore-scripts
npm run build
touch database/database.sqlite
php artisan migrate:fresh --seed
php artisan dusk:chrome-driver `/opt/google/chrome/chrome --version | cut -d " " -f3 | cut -d "." -f1`
- name: Start Chrome Driver
run: |
cd app
./vendor/laravel/dusk/bin/chromedriver-linux &
- name: Run Laravel Server
run: |
cd app
php artisan serve &
- name: Execute tests
run: |
cd app
php artisan dusk
- name: Upload Screenshots
if: failure()
uses: actions/upload-artifact@v2
with:
name: screenshots
path: app/tests/Browser/screenshots

- name: Upload Console Logs
if: failure()
uses: actions/upload-artifact@v2
with:
name: console
path: app/tests/Browser/console

- name: Upload Logs
if: failure()
uses: actions/upload-artifact@v2
with:
name: logs
path: app/storage/logs
35 changes: 35 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
.DS_Store
node_modules
/dist

# local env files
.env.local
.env.*.local

# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*

# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

# PHP
build
composer.lock
docs
vendor
coverage
.phpunit.result.cache
app/public/css/app.css
app/public/js/app.js
app/public/mix-manifest.json

reyptr27-laravel-inertia-table-*.tgz
55 changes: 55 additions & 0 deletions .php-cs-fixer.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<?php

$finder = Symfony\Component\Finder\Finder::create()
->in([
__DIR__ . '/php',
__DIR__ . '/app/app',
__DIR__ . '/app/config',
__DIR__ . '/app/database',
__DIR__ . '/app/lang',
__DIR__ . '/app/routes',
__DIR__ . '/app/tests',
])
->name('*.php')
->ignoreDotFiles(true)
->ignoreVCS(true);

return (new PhpCsFixer\Config())
->setRules([
'@PHP70Migration' => true,
'@PHP71Migration' => true,
'@PHP73Migration' => true,
'@PHP74Migration' => true,
'@PHP80Migration' => true,
'@PSR2' => true,
'array_indentation' => true,
'binary_operator_spaces' => ['default' => 'align_single_space_minimal'],
'blank_line_before_statement' => ['statements' => ['break', 'continue', 'declare', 'return', 'throw', 'try']],
'class_attributes_separation' => ['elements' => ['method' => 'one']],
'concat_space' => ['spacing' => 'one'],
'increment_style' => ['style' => 'post'],
'method_argument_space' => ['on_multiline' => 'ensure_fully_multiline', 'keep_multiple_spaces_after_comma' => true],
'method_chaining_indentation' => true,
'multiline_whitespace_before_semicolons' => ['strategy' => 'no_multi_line'],
'no_extra_blank_lines' => true,
'no_trailing_comma_in_singleline_array' => true,
'no_unused_imports' => true,
'no_whitespace_before_comma_in_array' => true,
'not_operator_with_successor_space' => false,
'ordered_imports' => true,
'phpdoc_scalar' => true,
'phpdoc_single_line_var_spacing' => true,
'phpdoc_var_without_name' => true,
'return_type_declaration' => ['space_before' => 'none'],
'semicolon_after_instruction' => false,
'simple_to_complex_string_variable' => true,
'strict_comparison' => true,
'ternary_operator_spaces' => true,
'trailing_comma_in_multiline' => true,
'trim_array_spaces' => true,
'unary_operator_spaces' => true,
'yoda_style' => false,
])
->setFinder($finder)
->setRiskyAllowed(true)
->setUsingCache(false);
Empty file added CONTRIBUTING.md
Empty file.
18 changes: 18 additions & 0 deletions app/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 4
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false

[*.{yml,yaml}]
indent_size = 2

[docker-compose.yml]
indent_size = 4
53 changes: 53 additions & 0 deletions app/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
APP_NAME=Laravel
APP_ENV=local
APP_KEY=base64:Ianw0xnfJCVCZsjGZOu8phM+yL2R1sP7y5TQAEKat0M=
APP_DEBUG=true
APP_URL=http://127.0.0.1:8000
ASSET_URL=http://127.0.0.1:8000

LOG_CHANNEL=stack
LOG_DEPRECATIONS_CHANNEL=null
LOG_LEVEL=debug

DB_CONNECTION=sqlite
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=
DB_USERNAME=root
DB_PASSWORD=

BROADCAST_DRIVER=log
CACHE_DRIVER=file
FILESYSTEM_DISK=local
QUEUE_CONNECTION=sync
SESSION_DRIVER=file
SESSION_LIFETIME=120

MEMCACHED_HOST=127.0.0.1

REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379

MAIL_MAILER=smtp
MAIL_HOST=mailhog
MAIL_PORT=1025
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
MAIL_FROM_ADDRESS="[email protected]"
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

PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
PUSHER_APP_CLUSTER=mt1

MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
10 changes: 10 additions & 0 deletions app/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
* text=auto

*.blade.php diff=html
*.css diff=css
*.html diff=html
*.md diff=markdown
*.php diff=php

/.github export-ignore
CHANGELOG.md export-ignore
Loading

0 comments on commit 3bd2444

Please sign in to comment.