Skip to content

Commit

Permalink
🎉 Begin the Sikessem Starter template
Browse files Browse the repository at this point in the history
  • Loading branch information
siguici committed Jul 7, 2023
0 parents commit 6cfc350
Show file tree
Hide file tree
Showing 122 changed files with 18,476 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
root = true

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

[*.json]
insert_final_newline = ignore

[*.md]
trim_trailing_whitespace = false

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

[docker-compose.yml]
indent_size = 4
73 changes: 73 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
APP_NAME=Sikessem
APP_TITLE="Sikessem starter template"
APP_DESCRIPTION="Welcome to Sikessem's starter application template."
APP_ENV=local
APP_KEY=
APP_DEBUG=true
APP_URL=http://localhost

LOG_CHANNEL=stack
LOG_DEPRECATIONS_CHANNEL=null
LOG_LEVEL=debug

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=sikessem
DB_USERNAME=root
DB_PASSWORD=

FTP_HOST=ftp.sikessem.com
FTP_PORT=21
FTP_ROOT=./
FTP_USERNAME=sikessem
FTP_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=mailpit
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_HOST=
PUSHER_PORT=443
PUSHER_SCHEME=https
PUSHER_APP_CLUSTER=mt1

VITE_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
VITE_PUSHER_HOST="${PUSHER_HOST}"
VITE_PUSHER_PORT="${PUSHER_PORT}"
VITE_PUSHER_SCHEME="${PUSHER_SCHEME}"
VITE_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"

VITE_CONFIG_SERVER_PROTOCOL='http'
VITE_CONFIG_SERVER_HOST='localhost'
VITE_CONFIG_SERVER_PORT=4000
VITE_CONFIG_SERVER_BASE=
VITE_CONFIG_SERVER_ROOT=
VITE_CONFIG_BUILD_DIRECTORY='static'
15 changes: 15 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
* text=auto

*.blade.php diff=html
*.css diff=css
*.html diff=html
*.php diff=php
*.md diff=markdown
*.mdx diff=markdown
*.js diff=javascript
*.jsx diff=javascript
*.ts diff=typescript
*.tsx diff=typescript

/.github export-ignore
CHANGELOG.md export-ignore
119 changes: 119 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
name: CI

permissions:
contents: read

on: ['push', 'pull_request']

jobs:
ci:
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: true
matrix:
operating-system: [ubuntu-latest]
php-version: [8.1, 8.2]
node-version: [18.0, 20.0]
dependency-version: [prefer-lowest, prefer-stable]
name: 👷 CI PHP-${{ matrix.php-version }} ${{ matrix.dependency-version }} with Node-${{ matrix.node-version }} on ${{ matrix.operating-system }}

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Cache dependencies
id: composer-cache
run: |
echo "::set-output name=dir::$(composer config cache-files-dir)"
- uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.operating-system }}-dependencies-php-${{ matrix.php-version }}-composer-${{ hashFiles('composer.json') }}
restore-keys: |
${{ runner.operating-system }}-dependencies-php-${{ matrix.php-version }}-composer-
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: curl, dom, gd, intl, mbstring, openssl, pdo, pdo_mysql, tokenizer, zip
ini-values: error_reporting=E_ALL
tools: composer:v2, php-cs-fixer, phpunit, vimeo/psalm
coverage: pcov

- name: Install Composer dependencies
run: |
set -e
composer install -q --no-ansi --no-cache --no-interaction --no-scripts --no-progress --prefer-dist
composer update --${{ matrix.dependency-version }} --no-interaction --prefer-dist --no-progress
- name: Update Dependencies with latest stable
if: matrix.dependency-version == 'prefer-stable'
run: composer update --prefer-stable

- name: Update Dependencies with lowest stable
if: matrix.dependency-version == 'prefer-lowest'
run: composer update --prefer-stable --prefer-lowest

- name: Set CI Environment
run: |
cp .env.example .env.ci
set -e
sed -i "s|^\(APP_ENV=\s*\).*$|\1ci|" .env.ci
printf "The complete `.env.ci` ... \n\n"
cat .env.ci
- name: Generate Key
run: |
set -e
php artisan key:generate --env=ci
php artisan queue:restart --env=ci
- name: Directory Permissions
run: |
chmod -R 777 storage bootstrap/cache
chmod -R 777 storage/
- name: Clear Caches
run: php artisan optimize:clear --env=ci

- name: Optimize Stuffs
run: set -e && php artisan optimize:clear --env=ci

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- name: Install JavaScript dependencies
run: |
corepack enable
pnpm install
pnpm e2e.install
- name: 🍱 Compile assets
run: pnpm build

- name: 🧹 Check code lint
run: |
pnpm check
composer check
- name: ⚗️ Run static analysis
run: |
composer analyse
- name: ✅ Test features
run: |
php artisan optimize --env=ci
set -e && php artisan serve --env=ci > /dev/null 2>&1 &
pnpm test
composer test
- name: 🚀 Execute end-to-end testing
run: pnpm e2e

- name: 🧪 Test the whole application
run: |
composer debug
pnpm debug
60 changes: 60 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Build
/lib/
/lib-types/
/server/
/public/hot
/public/storage
/public/static/
/storage/*.key

# Development
/node_modules/
/vendor/
Homestead.json
Homestead.yaml

# Environment
.env
.env.backup
/pg.load

# Cache
*.cache
.mf
.vscode/
.rollup.cache
tsconfig.tsbuildinfo

# Logs
logs/
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
error_log*

# Backups
*.backup
backup_*

# Editor
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

# Yarn
.yarn/*
!.yarn/releases

# Tests
/test-results/
/playwright-report/
/playwright/.cache/
/coverage
65 changes: 65 additions & 0 deletions .htaccess
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
<IfModule mod_autoindex.c>
Options -Indexes
</IfModule>

<IfModule mod_rewrite.c>
# Configure rewrite rules
Options +FollowSymLinks
RewriteEngine On
RewriteBase /

# Force the domain to serve securely
#RewriteCond %{HTTP:X-Forwarded-Proto} !https
#RewriteCond %{SERVER_PORT} 80
#RewriteCond %{HTTPS} off
#RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
#Header always set Content-Security-Policy "upgrade-insecure-requests;"

# Force www in the URL
RewriteCond %{HTTP_HOST} ^[^.]+.[^.]+$
RewriteRule .* https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

# Remove www in the URL
#RewriteCond %{HTTP_HOST} ^www.((?:[^.]+.)+[^.]+)$
#RewriteRule .* https://%1 [L,R=301]

# Redirect to the public directory
RewriteRule (.*) /public/$1 [L]
</IfModule>

# BEGIN cPanel-generated php ini directives, do not edit
# Manual editing of this file may result in unexpected behavior.
# To make changes to this file, use the cPanel MultiPHP INI Editor (Home >> Software >> MultiPHP INI Editor)
# For more information, read our documentation (https://go.cpanel.net/EA4ModifyINI)
<IfModule php8_module>
php_flag display_errors On
php_value max_execution_time 300
php_value max_input_time 300
php_value max_input_vars 1000
php_value memory_limit 1024M
php_value post_max_size 256M
php_value session.gc_maxlifetime 1440
php_value session.save_path "/var/cpanel/php/sessions/ea-php81"
php_value upload_max_filesize 256M
php_flag zlib.output_compression Off
</IfModule>
<IfModule lsapi_module>
php_flag display_errors On
php_value max_execution_time 300
php_value max_input_time 300
php_value max_input_vars 1000
php_value memory_limit 1024M
php_value post_max_size 256M
php_value session.gc_maxlifetime 1440
php_value session.save_path "/var/cpanel/php/sessions/ea-php81"
php_value upload_max_filesize 256M
php_flag zlib.output_compression Off
</IfModule>
# END cPanel-generated php ini directives, do not edit

# php -- BEGIN cPanel-generated handler, do not edit
# Set the “ea-php81” package as the default “PHP” programming language.
<IfModule mime_module>
AddHandler application/x-httpd-ea-php81___lsphp .php .php8 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit
Loading

0 comments on commit 6cfc350

Please sign in to comment.