Skip to content

Commit 4e1994c

Browse files
committed
chore: switch from Bun to pnpm
- Replace Bun with pnpm in GitHub workflows (lint & tests) - Update composer.json scripts to use pnpm commands - Add @css alias to vite.config.ts and tsconfig.json - Update .oxlintrc.json to ignore generated type files - Fix app.ts import to use @css alias - Add new index.vue page - Update CLAUDE.md and README.md documentation - Remove bun.lock, add pnpm-lock.yaml - Move auto-imports.d.ts and components.d.ts to resources/js/types/
1 parent 760bf0d commit 4e1994c

File tree

32 files changed

+3553
-2121
lines changed

32 files changed

+3553
-2121
lines changed

.github/workflows/lint.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,21 @@ jobs:
2424
with:
2525
php-version: "8.4"
2626

27-
- name: Setup Bun
28-
uses: oven-sh/setup-bun@v2
27+
- name: Setup pnpm
28+
uses: pnpm/action-setup@v4
2929
with:
30-
bun-version: "latest"
30+
version: "latest"
31+
32+
- name: Setup Node
33+
uses: actions/setup-node@v4
34+
with:
35+
node-version: "latest"
36+
cache: "pnpm"
3137

3238
- name: Install Dependencies
3339
run: |
3440
composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
35-
bun i
41+
pnpm install
3642
3743
- name: Setup Mago
3844
uses: nhedger/setup-mago@v1
@@ -44,7 +50,7 @@ jobs:
4450
composer analyze --reporting-format=github
4551
4652
- name: Lint & Format Frontend
47-
run: bun run lint && bun run format
53+
run: pnpm run lint && pnpm run format
4854

4955
# - name: Commit Changes
5056
# uses: stefanzweifel/git-auto-commit-action@v5

.github/workflows/tests.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,15 @@ jobs:
3232
uses: actions/setup-node@v4
3333
with:
3434
node-version: "22"
35+
cache: "pnpm"
3536

36-
- name: Setup Bun
37-
uses: oven-sh/setup-bun@v2
37+
- name: Setup pnpm
38+
uses: pnpm/action-setup@v4
3839
with:
39-
bun-version: "latest"
40+
version: "latest"
4041

4142
- name: Install Node Dependencies
42-
run: bun i
43+
run: pnpm install
4344

4445
- name: Install Dependencies
4546
run: composer install --no-interaction --prefer-dist --optimize-autoloader
@@ -51,7 +52,7 @@ jobs:
5152
run: php artisan key:generate
5253

5354
- name: Build Assets
54-
run: bun run build
55+
run: pnpm run build
5556

5657
- name: Tests
5758
run: ./vendor/bin/pest

.oxlintrc.json

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,16 @@
55
"./node_modules/ultracite/config/oxlint/vue/.oxlintrc.json"
66
],
77
"ignorePatterns": [
8-
"resources/js/auto-imports.d.ts",
9-
"resources/js/components.d.ts"
8+
"resources/js/types/auto-imports.d.ts",
9+
"resources/js/types/components.d.ts",
10+
"vite.config.ts",
11+
"postcss.config.js",
12+
"tailwind.config.js",
13+
"tailwind.config.ts",
14+
"tsconfig.json",
15+
"tsconfig.*.json",
16+
"*.config.js",
17+
"*.config.ts"
1018
],
1119
"rules": {
1220
"eslint-plugin-unicorn/filename-case": "off",

CLAUDE.md

Lines changed: 31 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -9,27 +9,29 @@ The Laravel Boost guidelines are specifically curated by Laravel maintainers for
99

1010
This application is a Laravel application and its main Laravel ecosystems package & versions are below. You are an expert with them all. Ensure you abide by these specific packages & versions.
1111

12-
- php - 8.4.17
13-
- inertiajs/inertia-laravel (INERTIA) - v2
12+
- php - 8.5.4
13+
- inertiajs/inertia-laravel (INERTIA_LARAVEL) - v2
1414
- laravel/framework (LARAVEL) - v12
1515
- laravel/prompts (PROMPTS) - v0
1616
- laravel/wayfinder (WAYFINDER) - v0
17+
- laravel/boost (BOOST) - v2
1718
- laravel/mcp (MCP) - v0
19+
- laravel/pail (PAIL) - v1
1820
- laravel/pint (PINT) - v1
1921
- laravel/sail (SAIL) - v1
2022
- pestphp/pest (PEST) - v4
2123
- phpunit/phpunit (PHPUNIT) - v12
22-
- @inertiajs/vue3 (INERTIA) - v2
24+
- @inertiajs/vue3 (INERTIA_VUE) - v2
2325
- vue (VUE) - v3
24-
- @laravel/vite-plugin-wayfinder (WAYFINDER) - v0
26+
- @laravel/vite-plugin-wayfinder (WAYFINDER_VITE) - v0
2527

2628
## Skills Activation
2729

2830
This project has domain-specific skills available. You MUST activate the relevant skill whenever you work in that domain—don't wait until you're stuck.
2931

3032
- `wayfinder-development` — Activates whenever referencing backend routes in frontend components. Use when importing from @/actions or @/routes, calling Laravel routes from TypeScript, or working with Wayfinder route functions.
3133
- `pest-testing` — Tests applications using the Pest 4 PHP framework. Activates when writing tests, creating unit or feature tests, adding assertions, testing Livewire components, browser testing, debugging test failures, working with datasets or mocking; or when the user mentions test, spec, TDD, expects, assertion, coverage, or needs to verify functionality works.
32-
- `inertia-vue-development` — Develops Inertia.js v2 Vue client-side applications. Activates when creating Vue pages, forms, or navigation; using <Link>, <Form>, useForm, or router; working with deferred props, prefetching, or polling; or when user mentions Vue with Inertia, Vue pages, Vue forms, or Vue navigation.
34+
- `inertia-vue-development` — Develops Inertia.js v2 Vue client-side applications. Activates when creating Vue pages, forms, or navigation; using <Link>, <Form>, useForm, or router; working with deferred props, prefetching, or polling; or when user mentions Vue with Inertia, Vue pages, Vue forms, or Vue navigation.
3335

3436
## Conventions
3537

@@ -48,7 +50,7 @@ This project has domain-specific skills available. You MUST activate the relevan
4850

4951
## Frontend Bundling
5052

51-
- If the user doesn't see a frontend change reflected in the UI, it could mean they need to run `bun run build`, `bun run dev`, or `composer run dev`. Ask them.
53+
- If the user doesn't see a frontend change reflected in the UI, it could mean they need to run `pnpm run build`, `pnpm run dev`, or `composer run dev`. Ask them.
5254

5355
## Documentation Files
5456

@@ -64,18 +66,23 @@ This project has domain-specific skills available. You MUST activate the relevan
6466

6567
- Laravel Boost is an MCP server that comes with powerful tools designed specifically for this application. Use them.
6668

67-
## Artisan
69+
## Artisan Commands
6870

69-
- Use the `list-artisan-commands` tool when you need to call an Artisan command to double-check the available parameters.
71+
- Run Artisan commands directly via the command line (e.g., `php artisan route:list`, `php artisan tinker --execute "..."`).
72+
- Use `php artisan list` to discover available commands and `php artisan [command] --help` to check parameters.
7073

7174
## URLs
7275

7376
- Whenever you share a project URL with the user, you should use the `get-absolute-url` tool to ensure you're using the correct scheme, domain/IP, and port.
7477

75-
## Tinker / Debugging
78+
## Debugging
7679

77-
- You should use the `tinker` tool when you need to execute PHP to debug code or query Eloquent models directly.
7880
- Use the `database-query` tool when you only need to read from the database.
81+
- Use the `database-schema` tool to inspect table structure before writing migrations or models.
82+
- To execute PHP code for debugging, run `php artisan tinker --execute "your code here"` directly.
83+
- To read configuration values, read the config files directly or run `php artisan config:show [key]`.
84+
- To inspect routes, run `php artisan route:list` directly.
85+
- To check environment variables, read the `.env` file directly.
7986

8087
## Reading Browser Logs With the `browser-logs` Tool
8188

@@ -106,20 +113,22 @@ This project has domain-specific skills available. You MUST activate the relevan
106113
## Constructors
107114

108115
- Use PHP 8 constructor property promotion in `__construct()`.
109-
- <code-snippet>public function \_\_construct(public GitHub $github) { }</code-snippet>
116+
- `public function __construct(public GitHub $github) { }`
110117
- Do not allow empty `__construct()` methods with zero parameters unless the constructor is private.
111118

112119
## Type Declarations
113120

114121
- Always use explicit return type declarations for methods and functions.
115122
- Use appropriate PHP type hints for method parameters.
116123

117-
<code-snippet name="Explicit Return Types and Method Params" lang="php">
124+
<!-- Explicit Return Types and Method Params -->
125+
126+
```php
118127
protected function isAccessible(User $user, ?string $path = null): bool
119128
{
120129
...
121130
}
122-
</code-snippet>
131+
```
123132

124133
## Enums
125134

@@ -138,23 +147,21 @@ protected function isAccessible(User $user, ?string $path = null): bool
138147
# Inertia
139148

140149
- Inertia creates fully client-side rendered SPAs without modern SPA complexity, leveraging existing server-side patterns.
141-
- Components live in `resources/js/Pages` (unless specified in `vite.config.js`). Use `Inertia::render()` for server-side routing instead of Blade views.
150+
- Components live in `resources/js/pages` (unless specified in `vite.config.js`). Use `Inertia::render()` for server-side routing instead of Blade views.
142151
- ALWAYS use `search-docs` tool for version-specific Inertia documentation and updated code examples.
143152
- IMPORTANT: Activate `inertia-vue-development` when working with Inertia Vue client-side patterns.
144153

145-
=== inertia-laravel/v2 rules ===
146-
147154
# Inertia v2
148155

149156
- Use all Inertia features from v1 and v2. Check the documentation before making changes to ensure the correct approach.
150-
- New features: deferred props, infinite scrolling (merging props + `WhenVisible`), lazy loading on scroll, polling, prefetching.
157+
- New features: deferred props, infinite scroll, merging props, polling, prefetching, once props, flash data.
151158
- When using deferred props, add an empty state with a pulsing or animated skeleton.
152159

153160
=== laravel/core rules ===
154161

155162
# Do Things the Laravel Way
156163

157-
- Use `php artisan make:` commands to create new files (i.e. migrations, controllers, models, etc.). You can list available Artisan commands using the `list-artisan-commands` tool.
164+
- Use `php artisan make:` commands to create new files (i.e. migrations, controllers, models, etc.). You can list available Artisan commands using `php artisan list` and check their parameters with `php artisan [command] --help`.
158165
- If you're creating a generic PHP class, use `php artisan make:class`.
159166
- Pass `--no-interaction` to all Artisan commands to ensure they work without user input. You should also pass the correct `--options` to ensure correct behavior.
160167

@@ -168,7 +175,7 @@ protected function isAccessible(User $user, ?string $path = null): bool
168175

169176
### Model Creation
170177

171-
- When creating new models, create useful factories and seeders for them too. Ask the user if they need any other things, using `list-artisan-commands` to check the available options to `php artisan make:model`.
178+
- When creating new models, create useful factories and seeders for them too. Ask the user if they need any other things, using `php artisan make:model --help` to check the available options.
172179

173180
### APIs & Eloquent Resources
174181

@@ -203,7 +210,7 @@ protected function isAccessible(User $user, ?string $path = null): bool
203210

204211
## Vite Error
205212

206-
- If you receive an "Illuminate\Foundation\ViteException: Unable to locate file in Vite manifest" error, you can run `bun run build` or ask the user to run `bun run dev` or `composer run dev`.
213+
- If you receive an "Illuminate\Foundation\ViteException: Unable to locate file in Vite manifest" error, you can run `pnpm run build` or ask the user to run `pnpm run dev` or `composer run dev`.
207214

208215
=== laravel/v12 rules ===
209216

@@ -246,8 +253,8 @@ Wayfinder generates TypeScript functions for Laravel routes. Import from `@/acti
246253

247254
# Laravel Pint Code Formatter
248255

249-
- You must run `vendor/bin/pint --dirty` before finalizing changes to ensure your code matches the project's expected style.
250-
- Do not run `vendor/bin/pint --test`, simply run `vendor/bin/pint` to fix any formatting issues.
256+
- If you have modified any PHP files, you must run `vendor/bin/pint --dirty --format agent` before finalizing changes to ensure your code matches the project's expected style.
257+
- Do not run `vendor/bin/pint --test --format agent`, simply run `vendor/bin/pint --format agent` to fix any formatting issues.
251258

252259
=== pest/core rules ===
253260

@@ -266,4 +273,5 @@ Wayfinder generates TypeScript functions for Laravel routes. Import from `@/acti
266273
Vue components must have a single root element.
267274

268275
- IMPORTANT: Activate `inertia-vue-development` when working with Inertia Vue client-side patterns.
269-
</laravel-boost-guidelines>
276+
277+
</laravel-boost-guidelines>

README.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ A modern Laravel starter kit with Inertia, Vue 3, and an enhanced developer expe
55
## Tech Stack
66

77
- **PHP** 8.4+ with Laravel 12
8-
- **Runtime**: Bun
8+
- **Runtime**: pnpm
99
- **Frontend**: Vue 3 with Inertia v2
1010
- **Styling**: Tailwind CSS 4
1111
- **State Management**: VueUse
@@ -73,7 +73,7 @@ const post = show(1); // { url: "/posts/1", method: "get" }
7373
### Prerequisites
7474

7575
- PHP 8.4+
76-
- Bun
76+
- pnpm
7777
- Composer
7878

7979
### Installation
@@ -83,24 +83,24 @@ const post = show(1); // { url: "/posts/1", method: "get" }
8383
composer install
8484

8585
# Install JavaScript dependencies
86-
bun install
86+
pnpm install
8787

8888
# Start development servers
89-
bun run dev
89+
pnpm run dev
9090
```
9191

9292
### Available Commands
9393

94-
| Command | Description |
95-
| ------------------- | ---------------------------- |
96-
| `bun run dev` | Start Vite dev server |
97-
| `bun run build` | Build for production |
98-
| `bun run build:ssr` | Build for SSR |
99-
| `bun run format` | Format JS/TS/Vue (ultracite) |
100-
| `bun run lint` | Lint JS/TS/Vue (ultracite) |
101-
| `composer lint` | Lint PHP (mago) |
102-
| `composer format` | Format PHP (mago) |
103-
| `php artisan test` | Run Pest tests |
94+
| Command | Description |
95+
| -------------------- | ---------------------------- |
96+
| `pnpm run dev` | Start Vite dev server |
97+
| `pnpm run build` | Build for production |
98+
| `pnpm run build:ssr` | Build for SSR |
99+
| `pnpm run format` | Format JS/TS/Vue (ultracite) |
100+
| `pnpm run lint` | Lint JS/TS/Vue (ultracite) |
101+
| `composer lint` | Lint PHP (mago) |
102+
| `composer format` | Format PHP (mago) |
103+
| `php artisan test` | Run Pest tests |
104104

105105
## Project Structure
106106

app/Http/Controllers/Controller.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
declare(strict_types = 1);
3+
declare(strict_types=1);
44

55
namespace App\Http\Controllers;
66

app/Http/Middleware/HandleInertiaRequests.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
declare(strict_types = 1);
3+
declare(strict_types=1);
44

55
namespace App\Http\Middleware;
66

app/Models/User.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
declare(strict_types = 1);
3+
declare(strict_types=1);
44

55
namespace App\Models;
66

app/Providers/AppServiceProvider.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
declare(strict_types = 1);
3+
declare(strict_types=1);
44

55
namespace App\Providers;
66

@@ -18,9 +18,7 @@ class AppServiceProvider extends ServiceProvider
1818
/**
1919
* Register any application services.
2020
*/
21-
public function register(): void
22-
{
23-
}
21+
public function register(): void {}
2422

2523
/**
2624
* Bootstrap any application services.

0 commit comments

Comments
 (0)