Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
bahamasangare authored Feb 4, 2024
0 parents commit 3988bbe
Show file tree
Hide file tree
Showing 128 changed files with 19,950 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/Tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
name: Tests

permissions:
contents: read

on: ['push', 'pull_request']

jobs:
tests:
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.experimental }}
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest]
bun: [1.0]
php: [8.2, 8.3]
dependencies: [lowest, highest]
experimental: [false]
name: 👷 Test on PHP-${{ matrix.php }} ${{ matrix.dependencies }} and Bun-${{ matrix.bun }} under ${{ matrix.os }}

steps:
- name: 🚚 Get latest code
uses: actions/checkout@v4

- name: 🎉 Setup Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: ${{ matrix.bun }}

- name: ✨ Install JavaScript dependencies
run: |
bun install
bun run e2e.install
- name: ⚡️ Cache dependencies
id: composer-cache
run: |
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-dependencies-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
restore-keys: |
${{ runner.os }}-dependencies-php-${{ matrix.php }}-composer-
- name: 🔨 Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
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 PHP dependencies
run: |
composer install -q --no-ansi --no-cache --no-interaction --no-scripts --no-progress --prefer-dist
composer update --${{ matrix.dependency-version }} --no-interaction --prefer-dist
- name: 🧑‍💻 Configure environment
run: |
cp .env.example .env.test
set -e
sed -i "s|^\(APP_ENV=\s*\).*$|\1test|" .env.test
printf "The complete `.env.test` ... \n\n"
cat .env.test
- name: 📦️ Allow executables
run: |
set -e
chmod +x ./run
chmod +x ./artisan
- name: 🔒️ Generate Key
run: |
set -e
./run key:generate --env=test
./run queue:restart --env=test
- name: 🔐 Directory Permissions
run: |
chmod -R 777 storage bootstrap/cache
chmod -R 777 storage/
- name: 🧹 Clear Caches
run: set -e && ./run optimize:clear --env=test

- name: ✅ Check code style
run: bun check

- name: 🧪 Test components
run: bun run test

- name: 🍱 Compile assets
run: bun run build

- name: 📂 List distribution folder
run: ls public/static

- name: ⚡️ Optimize Stuffs
run: set -e && ./run optimize --env=test

- name: ✅ Check code lint
run: composer check

- name: ⚗️ Run static analysis
run: composer analyse

- name: 🧪 Test features
run: |
set -e && ./run serve --env=test > /dev/null 2>&1 &
composer test
- name: 💚 Test the whole application
run: composer debug

- name: 🚀 Execute end-to-end testing
run: bun e2e
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
25 changes: 25 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Release Notes for the Sikessem Starter

All notable changes to [Starter](https://github.com/sikessem/starter) will be documented in this file.

## [Unreleased](https://github.com/sikessem/starter/compare/v0.2.0...HEAD)

**Full Changelog:** [v0.1.0...v0.2.0](https://github.com/sikessem/starter/compare/v0.1.0...v0.2.0)

## [v0.2.0](https://github.com/sikessem/starter/releases/tag/v0.2.0) - 2023-11-21

- Improved documentation
- Improved the tests workflow

## [v0.1.0](https://github.com/sikessem/starter/releases/tag/v0.1.0) - 2023-11-19

- Improved the structure of the `resources` directory

## [v0.0.1](https://github.com/sikessem/starter/releases/tag/v0.0.1) - 2023-11-07

- Updated the [sikessem/framework](https://github.com/sikessem/framework) to the latest version.
- Fixed and improved README by @szepeviktor in https://github.com/sikessem/starter/pull/1.
- Fixed #2: Renamed the `app/res/views/` and `app/res/` directories to `templates/` and `resources/` respectively.
- Moved files from the `app/src/` directory to the `app/` directory to respect the Laravel project structure.
- Added a new directory `src/` with the namespace `My\` for developing application-independent packages.
- Fixed #3: Improved workflows by separating assets building and app serving into jobs and added a workflow for end-to-end testing.
Loading

0 comments on commit 3988bbe

Please sign in to comment.