creasi / skeleton
Application Project Skeleton for Creasi.co
Installs: 2
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 6
Forks: 3
Open Issues: 8
Type:project
Requires
- php: >=8.1
- 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
- laravel/framework: ^10.0
- laravel/sanctum: ^3.0
- sentry/sentry-laravel: ^3.1
Requires (Dev)
- barryvdh/laravel-debugbar: ^3.7
- creasi/dusk-browserstack: ^0.2.0
- deployer/deployer: ^7.0
- laravel/dusk: ^7.0
- laravel/pint: ^1.1
- laravel/telescope: ^4.9
- laravel/tinker: ^2.7
- mockery/mockery: ^1.4.4
- nunomaduro/collision: ^7.5
- phpunit/phpunit: ^10.0
- spatie/laravel-ignition: ^2.1
- tightenco/ziggy: ^1.6
This package is auto-updated.
Last update: 2024-11-06 17:44:07 UTC
README
Application Skeleton
Requirements
- PHP
>= v8.1
and Composer>= v2.0
- Node.js
>= v16.0
and PNPMv8.x
- Database Server (MySQL, MariaDB or PostgreSQL)
Stacks
Setup
-
Clone the repository and
cd
into itgit clone git@github.com:creasico/laravel-project.git my-project && cd $_
-
Install
composer
andpnpm
dependencies -
Copy
.env.example
file to.env
file & generate new app key -
Create new database and update your
.env
file accordingly# for MySQL (presumably you've already have mysql client) $ mysql -e 'create database <db-name>' # for PostgreSQL (presumably you've already have postgresql client) $ createdb <db-bame>
-
All things set? then run
$ php artisan migrate --seed # run database migration $ pnpm build # compile front-end assets
-
You're good to go
Development
Front-end
This project is using windi.css
and vue.js
with inertia.js
as default front-end library, which mean any changes you've made, won't appears immadiately unless you run the following command
$ pnpm dev
Testing
This skeleton is already have pre-configured for testing using built-in and official testing utility of Laravel Framework, which is phpunit
and laravel dusk
.
Unit Tests
All we need to do is spare another database for testing. The reason behind it is while we run our tests, it will reset all of our existing development database. For more information please consult to the official documentation.
Once you've create new database, you can copy your .env
file to .env.testing
and update the database configuration with the newly created database.
$ composer test:unit # to run unit test
Integration Tests
Before you begin tests using laravel dusk, please make sure you've already install the webdriver with the following command
$ php artisan dusk:chrome-driver --detect
By default that command will install the latest ChromeDriver meaning you'll have to make sure that the installed version of ChromeDriver matches with version of your locally installed Google Chrome, then run
$ composer test:e2e # to run end-to-end test using larvel-dusk
By default laravel dusk will runs headlessly, if you willing to disable headless mode, just uncomment DUSK_HEADLESS_DISABLED
in your .env.testing
file. For more info please consult to the official documentation
Note The
.env.example
also preconfigured withBROWSERSTACK_USERNAME
andBROWSERSTACK_ACCESS_KEY
which is necessary to run integration testing on BrowserStack, feel free to comment out those variables if you don't want to run it locally. Please consult to their official documentation for local testing.
Contributing
- Commit Convention: This project follows Conventional Commits using @commitlint/config-conventional as standart, so make sure you follow the rules.
- Code Style: This project uses
Laravel Pint
withlaravel
preset and@antfu/eslint-config
as coding standard, so make sure you follow the rules. But don't worry, your VSCode should handle it for you. Please consult to this config for more info.
Sponsors
License
The project is an open-source software licensed under the MIT license.