Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
7a50218
Remove kernels
bram-pkg Sep 24, 2025
097ac18
Merge in config changes
bram-pkg Sep 24, 2025
701b37c
Update tailwind config
bram-pkg Sep 24, 2025
42a5538
Accept new configs
bram-pkg Sep 24, 2025
ba259ad
Middleware
bram-pkg Sep 24, 2025
c749412
SP
bram-pkg Sep 24, 2025
c51f15c
New bootstrap
bram-pkg Sep 24, 2025
925506b
New index php
bram-pkg Sep 24, 2025
dd069af
Remove htaccess
bram-pkg Sep 24, 2025
96d39f3
Add storage gitignores
bram-pkg Sep 24, 2025
0c98ac9
Move components
bram-pkg Sep 24, 2025
5765601
Remove api route
bram-pkg Sep 24, 2025
6167670
Add cars table
bram-pkg Sep 24, 2025
b42569d
New FE
bram-pkg Sep 24, 2025
b9bf601
New tests
bram-pkg Sep 24, 2025
bf921ad
Add laravel 12
bram-pkg Sep 24, 2025
726a2b9
Remove commands
bram-pkg Sep 24, 2025
c7fe4b2
split up config
bram-pkg Sep 24, 2025
834ff04
Add database migration
bram-pkg Sep 24, 2025
78ce7ec
Update PHPUnit
bram-pkg Sep 24, 2025
e6e3b27
Pint
bram-pkg Sep 24, 2025
7c8bd85
Newline create
bram-pkg Sep 24, 2025
700d496
Bump
bram-pkg Sep 24, 2025
4786318
Remove empty line
bram-pkg Sep 24, 2025
990ac59
Remove unused import
bram-pkg Sep 24, 2025
b434d5e
Remove quote
bram-pkg Sep 24, 2025
78e8796
Add controllers
bram-pkg Sep 24, 2025
0c79637
Rename to index
bram-pkg Sep 24, 2025
e8eb9c4
Add name
bram-pkg Sep 24, 2025
43f272a
Add mysql container
bram-pkg Sep 24, 2025
865680f
Bypass env check
bram-pkg Sep 24, 2025
0c3c0cd
Update lock
bram-pkg Sep 24, 2025
e173d35
Add composer
bram-pkg Sep 24, 2025
871e52c
Add host
bram-pkg Sep 24, 2025
7d2241c
Read all
bram-pkg Sep 24, 2025
eb6e32a
Fix
bram-pkg Sep 24, 2025
9ff468d
Disable vite
bram-pkg Sep 24, 2025
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
39 changes: 32 additions & 7 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,18 +1,43 @@
APP_NAME="Car & Classic"
APP_ENV=local
APP_KEY=base64:EUHJkn1qWRT4Q7cA3bJi4SS6/zOTgPB3zEcVxGFCl4s=
APP_KEY=base64:d+4LMuw3JXc3f6UHcqMaGi0HRGDKBQ7DK7E8SgMSwR0=
APP_DEBUG=true
APP_URL=http://localhost

APP_LOCALE=en
APP_FALLBACK_LOCALE=en
APP_FAKER_LOCALE=en_GB

APP_MAINTENANCE_DRIVER=file
# APP_MAINTENANCE_STORE=database

PHP_CLI_SERVER_WORKERS=4

BCRYPT_ROUNDS=12

LOG_CHANNEL=stack
LOG_STACK=single
LOG_DEPRECATIONS_CHANNEL=null
LOG_LEVEL=debug

DB_CONNECTION=sqlite
DB_CONNECTION=mysql
DB_HOST=mysql
DB_PORT=3306
DB_DATABASE=carandclassic
DB_USERNAME=carandclassic
DB_PASSWORD=password

BROADCAST_DRIVER=log
CACHE_DRIVER=file
FILESYSTEM_DISK=local
QUEUE_CONNECTION=sync
SESSION_DRIVER=file
SESSION_DRIVER=database
SESSION_LIFETIME=120
SESSION_ENCRYPT=false
SESSION_PATH=/
SESSION_DOMAIN=null

BROADCAST_CONNECTION=log
FILESYSTEM_DISK=local
QUEUE_CONNECTION=database

CACHE_STORE=database
# CACHE_PREFIX=

VITE_APP_NAME="${APP_NAME}"
18 changes: 0 additions & 18 deletions .env.testing

This file was deleted.

3 changes: 1 addition & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@
*.md diff=markdown
*.php diff=php

/.github export-ignore
CHANGELOG.md export-ignore
.styleci.yml export-ignore
README.md export-ignore
52 changes: 52 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Linting

on:
push:
branches:
- develop
- main
pull_request:
branches:
- develop
- main

permissions:
contents: write

jobs:
quality:
name: Code Quality
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'npm'

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.4'

- name: Install Dependencies
run: |
composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
npm ci

- name: Run Pint
run: vendor/bin/pint

- name: Format Frontend
run: npm run format

- name: Lint Frontend
run: npm run lint

# - name: Commit Changes
# uses: stefanzweifel/git-auto-commit-action@v5
# with:
# commit_message: fix code style
# commit_options: '--no-verify'
92 changes: 50 additions & 42 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "Tests"
name: Tests

on:
push:
Expand All @@ -8,65 +8,73 @@ on:
branches:
- main

permissions: { }

jobs:
php:
name: "Run PHP tests"
name: PHPUnit
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v3
- name: Checkout
uses: actions/checkout@v5
with:
persist-credentials: false

- name: "Set up PHP"
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "8.2"
php-version: 8.4
tools: composer:v2
coverage: xdebug

- name: "Get Composer Cache Directory"
id: composer-cache
run: |
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Install Dependencies
run: composer install --no-interaction --prefer-dist --optimize-autoloader

- uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-
- name: Copy Environment File
run: cp .env.example .env

- name: Generate Application Key
run: php artisan key:generate

- name: "Install Composer dependencies"
run: composer install --no-scripts
- name: Tests
env:
DB_CONNECTION: sqlite
DB_DATABASE: ':memory:'
CACHE_DRIVER: array
SESSION_DRIVER: array
QUEUE_CONNECTION: sync
run: vendor/bin/phpunit

- name: "Run tests"
run: php artisan test
js:
name: "Run JS tests"
name: Vitest
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v3

- uses: actions/setup-node@v3
- name: Checkout
uses: actions/checkout@v5
with:
node-version: latest

- name: "Get yarn cache directory path"
id: yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
persist-credentials: false

- uses: actions/cache@v3
id: yarn-cache
- name: Setup Node
uses: actions/setup-node@v4
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
node-version: '22'
cache: 'npm'

- name: "Install Yarn dependencies"
run: yarn install
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.4'

- name: "Build assets"
run: yarn build
- name: Install Dependencies
run: |
composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
npm ci

- name: "Run tests"
- name: Build Assets
env:
LARAVEL_BYPASS_ENV_CHECK: "1"
run: yarn test --run

LARAVEL_BYPASS_ENV_CHECK: 1
run: npm run test
10 changes: 9 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,19 +1,27 @@
/.phpunit.cache
/bootstrap/ssr
/node_modules
/public/build
/public/hot
/public/storage
/resources/js/actions
/resources/js/routes
/resources/js/wayfinder
/storage/*.key
/storage/pail
/vendor
.env
.env.backup
.env.production
.phpactor.json
.phpunit.result.cache
Homestead.json
Homestead.yaml
auth.json
npm-debug.log
yarn-error.log
/auth.json
/.fleet
/.idea
/.nova
/.vscode
/.zed
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
resources/js/components/ui/*
resources/views/mail/*
19 changes: 19 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"semi": true,
"singleQuote": true,
"singleAttributePerLine": false,
"htmlWhitespaceSensitivity": "css",
"printWidth": 150,
"plugins": ["prettier-plugin-organize-imports", "prettier-plugin-tailwindcss"],
"tailwindFunctions": ["clsx", "cn", "cva"],
"tailwindStylesheet": "resources/css/app.css",
"tabWidth": 4,
"overrides": [
{
"files": "**/*.yml",
"options": {
"tabWidth": 2
}
}
]
}
23 changes: 11 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@

### Package contains

- Laravel 10
- PHPUnit 10
- Laravel 12
- PHPUnit 12
- Vue.js 3
- TailwindCSS 3
- TailwindCSS 4
- Vite.js
- Vitest
- SQLite DB
- MySQL 8

### Get familiar with code

Expand All @@ -27,14 +27,13 @@
- Front-end test using `vitest` and `@vue/test-utils`: `resources/js/Components/Car.spec.js`
- Back-end tests using `phpunit`: `tests/`

## Set up environment
## Set up the environment

### Prerequisites

- PHP 8.1 or newer
- PHP 8.4 or newer
- Composer
- Node.js 18
- Yarn
- Node.js 22

### Install dependencies and migrate database

Expand All @@ -47,20 +46,20 @@ docker run --rm \
-u "$(id -u):$(id -g)" \
-v "$(pwd):/var/www/html" \
-w /var/www/html \
laravelsail/php82-composer:latest \
laravelsail/php84-composer:latest \
composer install --ignore-platform-reqs

vendor/bin/sail yarn install
vendor/bin/sail npm install
vendor/bin/sail artisan migrate --force
vendor/bin/sail artisan db:seed
```

### Start the project

- Back-end: `vendor/bin/sail up -d`
- Front-end: `vendor/bin/sail yarn dev`
- Front-end: `vendor/bin/sail npm run dev`

### Run tests

- Back-end: `vendor/bin/sail test`
- Front-end: `vendor/bin/sail yarn test`
- Front-end: `vendor/bin/sail npm run test`
25 changes: 0 additions & 25 deletions app/Console/Kernel.php

This file was deleted.

Loading