Skip to content

Commit 280f2bf

Browse files
authored
Install Laravel Boost and configure Claude Code (#291)
1 parent cb0a0db commit 280f2bf

File tree

4 files changed

+103
-0
lines changed

4 files changed

+103
-0
lines changed

.claude/settings.local.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"enabledMcpjsonServers": [
3+
"laravel-boost",
4+
"herd"
5+
],
6+
"permissions": {
7+
"allow": [
8+
"Bash(vendor/bin/testbench tinker:*)"
9+
]
10+
}
11+
}

.mcp.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"mcpServers": {
3+
"laravel-boost": {
4+
"command": "php",
5+
"args": [
6+
"./artisan",
7+
"boost:mcp"
8+
]
9+
},
10+
"herd": {
11+
"command": "php",
12+
"args": [
13+
"/Applications/Herd.app/Contents/Resources/herd-mcp.phar"
14+
],
15+
"env": {
16+
"SITE_PATH": "/Users/james/Code/cachet-core/vendor/orchestra/testbench-core/laravel"
17+
}
18+
}
19+
}
20+
}

CLAUDE.md

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
<laravel-boost-guidelines>
2+
=== foundation rules ===
3+
4+
# Laravel Boost Guidelines
5+
6+
The Laravel Boost guidelines are specifically curated by Laravel maintainers for this application. These guidelines should be followed closely to enhance the user's satisfaction building Laravel applications.
7+
8+
## Foundational Context
9+
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.
10+
11+
- php - 8.3.22
12+
13+
14+
## Conventions
15+
- You must follow all existing code conventions used in this application. When creating or editing a file, check sibling files for the correct structure, approach, naming.
16+
- Use descriptive names for variables and methods. For example, `isRegisteredForDiscounts`, not `discount()`.
17+
- Check for existing components to reuse before writing a new one.
18+
19+
## Verification Scripts
20+
- Do not create verification scripts or tinker when tests cover that functionality and prove it works. Unit and feature tests are more important.
21+
22+
## Application Structure & Architecture
23+
- Stick to existing directory structure - don't create new base folders without approval.
24+
- Do not change the application's dependencies without approval.
25+
26+
## Frontend Bundling
27+
- If the user doesn't see a frontend change reflected in the UI, it could mean they need to run `npm run build`, `npm run dev`, or `composer run dev`. Ask them.
28+
29+
## Replies
30+
- Be concise in your explanations - focus on what's important rather than explaining obvious details.
31+
32+
## Documentation Files
33+
- You must only create documentation files if explicitly requested by the user.
34+
35+
36+
=== boost rules ===
37+
38+
## Laravel Boost
39+
- Laravel Boost is an MCP server that comes with powerful tools designed specifically for this application. Use them.
40+
41+
## Artisan
42+
- Use the `list-artisan-commands` tool when you need to call an Artisan command to double check the available parameters.
43+
44+
## URLs
45+
- 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.
46+
47+
## Tinker / Debugging
48+
- You should use the `tinker` tool when you need to execute PHP to debug code or query Eloquent models directly. Because Cachet is a Laravel package, developed with Testbench, you should run Tinker with `vendor/bin/testbench tinker`.
49+
- Use the `database-query` tool when you only need to read from the database.
50+
51+
## Reading Browser Logs With the `browser-logs` Tool
52+
- You can read browser logs, errors, and exceptions using the `browser-logs` tool from Boost.
53+
- Only recent browser logs will be useful - ignore old logs.
54+
55+
## Searching Documentation (Critically Important)
56+
- Boost comes with a powerful `search-docs` tool you should use before any other approaches. This tool automatically passes a list of installed packages and their versions to the remote Boost API, so it returns only version-specific documentation specific for the user's circumstance. You should pass an array of packages to filter on if you know you need docs for particular packages.
57+
- The 'search-docs' tool is perfect for all Laravel related packages, including Laravel, Inertia, Livewire, Filament, Tailwind, Pest, Nova, Nightwatch, etc.
58+
- You must use this tool to search for Laravel-ecosystem documentation before falling back to other approaches.
59+
- Search the documentation before making code changes to ensure we are taking the correct approach.
60+
- Use multiple, broad, simple, topic based queries to start. For example: `['rate limiting', 'routing rate limiting', 'routing']`.
61+
- Do not add package names to queries, package information is already shared. Use `test resource table`, not `filament 4 test resource table`.
62+
63+
### Available Search Syntax
64+
- You can and should pass multiple queries at once. The most relevant results will be returned first.
65+
66+
1. Simple Word Searches with auto-stemming - query=authentication - finds 'authenticate' and 'auth'
67+
2. Multiple Words (AND Logic) - query=rate limit - finds knowledge containing both "rate" AND "limit"
68+
3. Quoted Phrases (Exact Position) - query="infinite scroll" - Words must be adjacent and in that order
69+
4. Mixed Queries - query=middleware "rate limit" - "middleware" AND exact phrase "rate limit"
70+
5. Multiple Queries - queries=["authentication", "middleware"] - ANY of these terms
71+
</laravel-boost-guidelines>

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
"require-dev": {
4444
"dedoc/scramble": "^0.12",
4545
"larastan/larastan": "^3.4",
46+
"laravel/boost": "^1.0",
4647
"laravel/pail": "^1.1",
4748
"laravel/pint": "^1.24",
4849
"orchestra/testbench": "^9.15.1",

0 commit comments

Comments
 (0)