Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: inisiasi penggunaan package creasi/laravel-base #25

Merged
merged 41 commits into from
Oct 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
6750cc8
feat: initialize `creasi/laravel-base`
feryardiant Jul 14, 2023
590a811
chore: load translation view composer from `base` package
feryardiant Jul 14, 2023
df36f16
chore: fix ugly login form on `light` color scheme
feryardiant Jul 14, 2023
97f632e
chore(deps): update dependencies
feryardiant Sep 15, 2023
0aeaa57
chore(deps): update dependencies
feryardiant Sep 17, 2023
1228c28
chore(frontend): use `SENTRY_DSN` instead ov `VITE_SENTRY_DSN`
feryardiant Sep 17, 2023
6a899ea
chore(frontend): declare module' type definition on each modules
feryardiant Sep 17, 2023
14961c0
chore: remove composer `post-update-cmd` script
feryardiant Sep 17, 2023
2ad5abe
chore(config): exclude `telescope` route from `ziggy:generate`
feryardiant Sep 17, 2023
deae86a
chore(pwa): disable fullscreen display
feryardiant Sep 17, 2023
5cd727a
chore: ensure axios type def is globally accessible
feryardiant Sep 17, 2023
f2b69b2
chore(dev): disable `valetTls` and some clean up
feryardiant Sep 17, 2023
f8f6e99
chore(dev): update windi config to include laravel' built-in pagination
feryardiant Sep 17, 2023
ac10ab2
chore(ci): messing around with ci configs
feryardiant Sep 17, 2023
22c5f68
chore: make axios throws the errors instead of keep it in silence
feryardiant Sep 17, 2023
51291d0
chore(deps): clean up unused dependency
feryardiant Sep 17, 2023
804b599
refactor: rearrange app modules and utilities for better consistency
feryardiant Sep 18, 2023
93bc470
chore: add support to serve vite in https
feryardiant Sep 18, 2023
487cbe4
chore: configure NaiveUI Message, Notification and Dialog Provider
feryardiant Sep 18, 2023
728087b
chore: add option to disable debugbar
feryardiant Sep 18, 2023
6890392
feat: enable naive-ui discrete api
feryardiant Sep 18, 2023
72aa557
chore: patch 6890392 mark naive-ui discrete api as readonly?
feryardiant Sep 18, 2023
dc5d11c
chore: update ziggy route function override
feryardiant Sep 18, 2023
1092c6e
feat: make use of `defineOptions()` to assign page title
feryardiant Sep 18, 2023
d67d22a
chore: add type definition for component option 1092c6e
feryardiant Sep 18, 2023
08f49a2
chore: set `fallbackLocale` to `en`
feryardiant Sep 18, 2023
8cbaa1a
refactor: move `app-wrapper.vue` to `app/wrapper.vue`
feryardiant Sep 18, 2023
3b4b8f1
chore: clean up `shim.d.ts` and add page component name
feryardiant Sep 18, 2023
c1ec6bd
refactor: decouple page section into dedicated components
feryardiant Sep 19, 2023
61e9e23
chore(dev): force dev host to IPv4
feryardiant Sep 20, 2023
6e5d922
chore: improve accessibility on login form
feryardiant Sep 21, 2023
548a418
chore: add a bit flexibility to build the assets
feryardiant Sep 22, 2023
f67d0fa
chore: update route param definition
feryardiant Sep 22, 2023
63a24cc
chore: rearrange utils based on context
feryardiant Sep 22, 2023
b2b40df
chore(ci): update action workflow configs
feryardiant Sep 23, 2023
c0b74e7
chore(ui): define additional page component options
feryardiant Sep 23, 2023
f7f4135
chore(dev): add `xdebug.php-debug` as extension recommendation
feryardiant Sep 27, 2023
20afc07
chore(deploy): update deployment config
feryardiant Sep 27, 2023
ed075b2
feat(ui): improve accessibility on auth forms
feryardiant Sep 29, 2023
f189e7a
fix(tests): fix end-to-end test on browserstack
feryardiant Sep 29, 2023
89d0c1e
feat(dev): enable debug config
feryardiant Oct 3, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 1 addition & 15 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -52,25 +52,11 @@ AWS_USE_PATH_STYLE_ENDPOINT=false

# DUSK_HEADLESS_DISABLED=true
# TELESCOPE_ENABLED=false
# DEBUGBAR_ENABLED=false

BROWSERSTACK_USERNAME=
BROWSERSTACK_ACCESS_KEY=

SENTRY_DSN=

VITE_API_URL="${APP_URL}/api"
VITE_SENTRY_DSN="${SENTRY_DSN}"

# 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}"
21 changes: 8 additions & 13 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Prepare Environments
run: |
Expand All @@ -60,9 +58,11 @@ jobs:
cache: pnpm
node-version: 18.x

- name: Get Composer cache directory
- name: Prepare composer
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
run: |
composer config -g github-oauth.github.com ${{ secrets.PAT }}
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: Cache Composer dependencies
uses: actions/cache@v3
Expand All @@ -72,20 +72,15 @@ jobs:
restore-keys: ${{ runner.os }}-composer-

- name: Install PHP dependencies
uses: nick-invision/retry@v2
with:
timeout_minutes: 5
max_attempts: 3
command: |
composer config -g github-oauth.github.com ${{ secrets.PAT }}
composer install --prefer-dist --no-interaction --no-progress
composer ziggy:generate
run: composer install --prefer-dist --no-interaction --no-progress

- name: Install node.js dependencies
run: pnpm install

- name: Build frontend
run: pnpm build --mode ${{ vars.APP_ENV }}
run: |
composer ziggy:generate
pnpm build --mode ${{ vars.APP_ENV }}

- name: Deploy
uses: deployphp/action@v1
Expand Down
24 changes: 9 additions & 15 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,9 @@ jobs:
runs-on: ubuntu-latest
name: Build

env:
VITE_SENTRY_DSN: ${{ secrets.SENTRY_DSN }}

steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand Down Expand Up @@ -134,9 +129,11 @@ jobs:
name: public
path: public/build

- name: Get Composer cache directory
- name: Prepare composer
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
run: |
composer config -g github-oauth.github.com ${{ secrets.PAT }}
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: Cache Composer dependencies
uses: actions/cache@v3
Expand All @@ -146,10 +143,7 @@ jobs:
restore-keys: ${{ runner.os }}-composer-

- name: Install PHP dependencies
run: |
composer config -g github-oauth.github.com ${{ secrets.PAT }}
composer update --prefer-dist --no-interaction --no-progress
composer ziggy:generate
run: composer update --prefer-dist --no-interaction --no-progress

- name: Run unit tests
run: php artisan test --ansi --coverage
Expand Down Expand Up @@ -210,9 +204,11 @@ jobs:
name: public
path: public/build

- name: Get Composer cache directory
- name: Prepare composer
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
run: |
composer config -g github-oauth.github.com ${{ secrets.PAT }}
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: Cache Composer dependencies
uses: actions/cache@v3
Expand All @@ -223,9 +219,7 @@ jobs:

- name: Install PHP dependencies
run: |
composer config -g github-oauth.github.com ${{ secrets.PAT }}
composer install --prefer-dist --no-interaction --no-progress
composer ziggy:generate

- name: Setup BrowserStack env # Invokes the setup-env action
uses: browserstack/github-actions/setup-env@master
Expand Down
4 changes: 2 additions & 2 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"recommendations": [
"adrianwilczynski.alpine-js-intellisense",
"amiralizadeh9480.laravel-extra-intellisense",
"bmewburn.vscode-intelephense-client",
"cpylua.language-postcss",
Expand All @@ -15,6 +14,7 @@
"onecentlin.laravel-blade",
"rangav.vscode-thunder-client",
"voorjaar.windicss-intellisense",
"vue.volar"
"vue.volar",
"xdebug.php-debug"
]
}
14 changes: 14 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Listen for Xdebug",
"type": "php",
"request": "launch",
"port": 9003
}
]
}
16 changes: 16 additions & 0 deletions app/Http/Controllers/TestController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php

namespace App\Http\Controllers;

use Inertia\Inertia;

class TestController extends Controller
{
/**
* @return \Inertia\Response
*/
public function __invoke()
{
return Inertia::render('test');
}
}
19 changes: 7 additions & 12 deletions app/Providers/AppServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
namespace App\Providers;

use App\View\Composers\NavigationsComposer;
use App\View\Composers\TranslationsComposer;
use Illuminate\Support\Facades\Mail;
use Illuminate\Support\Facades\View;
use Illuminate\Support\ServiceProvider;

Expand All @@ -21,6 +19,7 @@ public function register()
$this->app->register(\Laravel\Telescope\TelescopeServiceProvider::class);
// $this->app->register(TelescopeServiceProvider::class);
}
// .
}

/**
Expand All @@ -30,17 +29,13 @@ public function register()
*/
public function boot()
{
/**
* While not in production, send all email tho the following address instead.
*
* @see https://laravel.com/docs/9.x/mail#using-a-global-to-address
*/
if (! $this->app->environment('production') && $devMail = env('MAIL_DEVELOPMENT')) {
Mail::alwaysTo($devMail);
}
$this->bootViewComposers();

View::composer('app', NavigationsComposer::class);
// .
}

View::composer('app', TranslationsComposer::class);
private function bootViewComposers(): void
{
View::composer('*', NavigationsComposer::class);
}
}
6 changes: 3 additions & 3 deletions app/View/Composers/NavigationsComposer.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,17 @@ protected function main()
'type' => 'divider',
],
[
'route' => null,
'route' => 'parent.home',
'label' => 'Sample Menu',
'icon' => 'tabler:box',
'children' => [
[
'route' => null,
'route' => 'parent.child-1.home',
'label' => 'Sample SubMenu 1',
'icon' => 'tabler:box',
],
[
'route' => null,
'route' => 'parent.child-2.home',
'label' => 'Sample SubMenu 2',
'icon' => 'tabler:box',
],
Expand Down
26 changes: 0 additions & 26 deletions app/View/Composers/TranslationsComposer.php

This file was deleted.

14 changes: 10 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,16 @@
"support": {
"source": "https://github.com/creasico/laravel-project"
},
"repositories": [
{
"type": "vcs",
"url": "[email protected]:creasico/laravel-base.git"
}
],
"require": {
"php": ">=8.1",
"creasi/laravel-nusa": "^0.0.5",
"creasi/laravel-base": "dev-main",
"creasi/laravel-nusa": "^0.1.2",
"fakerphp/faker": "^1.9.1",
"guzzlehttp/guzzle": "^7.2",
"inertiajs/inertia-laravel": "^0.6.9",
Expand Down Expand Up @@ -52,8 +59,7 @@
"scripts": {
"post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"@php artisan package:discover --ansi",
"@php artisan vendor:publish --tag creasi-config --ansi"
"@php artisan package:discover --ansi"
],
"post-root-package-install": [
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
Expand All @@ -62,7 +68,7 @@
"@php artisan key:generate --ansi"
],
"dep": [
"vendor/bin/dep -f scripts/deploy.php"
"vendor/bin/dep --ansi -f scripts/deploy.php"
],
"fix": [
"pint --preset laravel --ansi"
Expand Down
Loading