You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .claude_config
+6-1Lines changed: 6 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,7 @@
6
6
"env": {
7
7
"ALLOWED_DIRECTORIES": [
8
8
".",
9
+
"./.claude",
9
10
"./app",
10
11
"./resources",
11
12
"./database",
@@ -105,7 +106,11 @@
105
106
{
106
107
"pattern": "**/bootstrap/app.php",
107
108
"instructions": "Use Laravel 12 Application class patterns for configuring middleware, events, and exceptions. Register middleware through withMiddleware(), events through withEvents(), and exception handling through withExceptions(). Follow the streamlined bootstrap configuration approach."
109
+
},
110
+
{
111
+
"pattern": "**/.claude/**/*.md",
112
+
"instructions": "These are project context files containing coding standards, development guidelines, and project-specific documentation. Reference these files when asked about project conventions, standards, tech stack, or development patterns. These files contain the definitive coding standards and development guidelines for this Laravel 12 project."
108
113
}
109
114
],
110
-
"customInstructions": "You are an expert Laravel 12 developer using FluxUI for component-based development and Livewire Volt for functional components. You build production-quality applications using Laravel 12, Livewire 3.x with Volt, Alpine.js, FluxUI, and Tailwind CSS. Always prefer Livewire Volt functional components over traditional class-based components. Use Laravel 12 features like the new Attribute class for accessors/mutators, enhanced validation, improved model features, and modern syntax. Use FluxUI components for all UI elements instead of building custom components. Follow PSR-12 standards, use typed properties, constructor property promotion, and maintain clean, readable code with proper separation of concerns."
115
+
"customInstructions": "You are an expert Laravel 12 developer using FluxUI for component-based development and Livewire Volt for functional components. You build production-quality applications using Laravel 12, Livewire 3.x with Volt, Alpine.js, FluxUI, and Tailwind CSS. Always prefer Livewire Volt functional components over traditional class-based components. Use Laravel 12 features like the new Attribute class for accessors/mutators, enhanced validation, improved model features, and modern syntax. Use FluxUI components for all UI elements instead of building custom components. Follow PSR-12 standards, use typed properties, constructor property promotion, and maintain clean, readable code with proper separation of concerns.\n\nIMPORTANT: When asked about coding standards, project conventions, tech stack, or development patterns, always check the .claude/context/ directory first. This directory contains comprehensive project documentation including coding-standards.md, project-context.md, and various development guidelines that define the specific standards for this project."
Copy file name to clipboardExpand all lines: README.md
+17Lines changed: 17 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,6 +31,8 @@ This Laravel 12 project has been configured with Claude Code and optimized MCP s
31
31
-**Node.js 20+** - For frontend asset compilation
32
32
-**Claude Code** - AI development assistant
33
33
34
+
> **Important**: The setup script creates a `.claude_config` file that enables Claude Code to access the project's context files in the `.claude/` directory. This allows Claude to reference your project's coding standards and development guidelines.
35
+
34
36
### Installation Options
35
37
36
38
**Option 1: One-line installation (recommended)**
@@ -414,6 +416,21 @@ npx playwright install
414
416
# Solution: This is expected - the official server is deprecated but still functional
415
417
```
416
418
419
+
**Claude Code Can't Access Context Files**
420
+
```bash
421
+
# Issue: Claude Code can't find .claude/context files when asked about coding standards
422
+
# Cause: Missing .claude_config file or .claude directory not in ALLOWED_DIRECTORIES
423
+
424
+
# Solution 1: Ensure .claude_config exists in project root
425
+
ls -la .claude_config
426
+
427
+
# Solution 2: If missing, re-run setup script
428
+
./setup.sh
429
+
430
+
# Solution 3: Restart Claude Code to reload configuration
431
+
# Close and reopen Claude Code after creating .claude_config
432
+
```
433
+
417
434
**Understanding Database MCP Server Installation**
418
435
```bash
419
436
# The setup process has two phases for database integration:
"instructions": "Use kebab-case for config file names, snake_case for config keys. Avoid env() helper outside config files. Use Laravel 12 configuration patterns and new config features."
1296
+
},
1297
+
{
1298
+
"pattern": "**/*.php",
1299
+
"instructions": "Follow Laravel 12 conventions strictly. Use PSR-12 standards, constructor property promotion, typed properties, and the new Attribute class for accessors/mutators. Use FluxUI components for UI elements. Follow modern Laravel patterns including new validation syntax and enhanced model features."
1300
+
},
1301
+
{
1302
+
"pattern": "**/app/Models/*.php",
1303
+
"instructions": "Use Laravel 12 model features: Attribute class for accessors/mutators, #[Scope] attribute for query scopes, proper casting with enum support, new validation methods, and enhanced relationship definitions. Always use typed properties and constructor promotion where applicable."
1304
+
},
1305
+
{
1306
+
"pattern": "**/routes/*.php",
1307
+
"instructions": "Use kebab-case URLs, camelCase route names and parameters. Use route tuple notation [Controller::class, 'method']. Put HTTP verbs first when defining routes. Use Laravel 12 route model binding enhancements."
1308
+
},
1309
+
{
1310
+
"pattern": "**/app/Http/Controllers/*.php",
1311
+
"instructions": "Use plural resource names for controllers. Stick to CRUD keywords (index, create, store, show, edit, update, destroy). Extract new controllers for non-CRUD actions. Use Laravel 12 request validation and response patterns."
1312
+
},
1313
+
{
1314
+
"pattern": "**/resources/views/**/*.blade.php",
1315
+
"instructions": "Use camelCase for view files. Prefer FluxUI components over custom HTML/CSS. Use Flux components for forms, buttons, modals, etc. Indent with 4 spaces. Use {{ __() }} for translations."
1316
+
},
1317
+
{
1318
+
"pattern": "**/app/Livewire/*.php",
1319
+
"instructions": "Follow Livewire 3.x best practices with Laravel 12. Use Livewire Volt for class-based components - prefer functional components over traditional class components. Use FluxUI components in Livewire views. Use public properties for data binding. Implement proper validation with Laravel 12 validation features. Use wire:model for form inputs."
"instructions": "Create Livewire Volt functional components using <?php use() ?> syntax at the top of blade files. Prefer Volt functional components over traditional class-based components. Use FluxUI components exclusively. Follow Volt patterns for state management and actions."
1324
+
},
1325
+
{
1326
+
"pattern": "**/resources/js/**/*.js",
1327
+
"instructions": "Use Alpine.js patterns that complement FluxUI components. Keep JavaScript minimal and declarative. Use x-data, x-show, x-if appropriately. Follow Alpine.js conventions and work seamlessly with FluxUI."
1328
+
},
1329
+
{
1330
+
"pattern": "**/resources/css/**/*.css",
1331
+
"instructions": "Use Tailwind CSS utility classes. FluxUI provides most styling - only add custom CSS when FluxUI components don't cover the use case. Follow FluxUI design system principles."
1332
+
},
1333
+
{
1334
+
"pattern": "**/database/migrations/*.php",
1335
+
"instructions": "Use Laravel 12 migration features including new column types, enhanced indexing, and improved foreign key constraints. Use descriptive migration names following Laravel conventions."
1336
+
},
1337
+
{
1338
+
"pattern": "**/tests/**/*.php",
1339
+
"instructions": "Follow Laravel 12 testing conventions with Pest PHP preferred. Use Feature tests for HTTP requests, Unit tests for models and services. Use Laravel 12 testing helpers and assertions."
1340
+
},
1341
+
{
1342
+
"pattern": "**/bootstrap/app.php",
1343
+
"instructions": "Use Laravel 12 Application class patterns for configuring middleware, events, and exceptions. Register middleware through withMiddleware(), events through withEvents(), and exception handling through withExceptions(). Follow the streamlined bootstrap configuration approach."
1344
+
},
1345
+
{
1346
+
"pattern": "**/.claude/**/*.md",
1347
+
"instructions": "These are project context files containing coding standards, development guidelines, and project-specific documentation. Reference these files when asked about project conventions, standards, tech stack, or development patterns. These files contain the definitive coding standards and development guidelines for this Laravel 12 project."
1348
+
}
1349
+
],
1350
+
"customInstructions": "You are an expert Laravel 12 developer using FluxUI for component-based development and Livewire Volt for functional components. You build production-quality applications using Laravel 12, Livewire 3.x with Volt, Alpine.js, FluxUI, and Tailwind CSS. Always prefer Livewire Volt functional components over traditional class-based components. Use Laravel 12 features like the new Attribute class for accessors/mutators, enhanced validation, improved model features, and modern syntax. Use FluxUI components for all UI elements instead of building custom components. Follow PSR-12 standards, use typed properties, constructor property promotion, and maintain clean, readable code with proper separation of concerns.\n\nIMPORTANT: When asked about coding standards, project conventions, tech stack, or development patterns, always check the .claude/context/ directory first. This directory contains comprehensive project documentation including coding-standards.md, project-context.md, and various development guidelines that define the specific standards for this project."
1351
+
}
1352
+
EOF
1353
+
print_success "Claude configuration created (.claude_config)"
1354
+
print_status "This file enables Claude Code to access your .claude/context/ files"
1355
+
1263
1356
# Create FluxUI quick reference
1264
1357
print_status "Creating FluxUI quick reference..."
1265
1358
cat >".claude/context/fluxui-reference.md"<<EOF
@@ -1558,6 +1651,10 @@ EOF
1558
1651
"README.md"
1559
1652
)
1560
1653
1654
+
local project_files=(
1655
+
".claude_config"
1656
+
)
1657
+
1561
1658
local optional_files=(
1562
1659
"context/netsuite_context.md"
1563
1660
)
@@ -1571,6 +1668,15 @@ EOF
1571
1668
fi
1572
1669
done
1573
1670
1671
+
# Count project files (in root directory)
1672
+
forfilein"${project_files[@]}";do
1673
+
if [ -f"$file" ];then
1674
+
((files_created++))
1675
+
else
1676
+
print_error "Failed to create required file: $file"
1677
+
fi
1678
+
done
1679
+
1574
1680
# Count optional files
1575
1681
local optional_created=0
1576
1682
forfilein"${optional_files[@]}";do
@@ -1580,9 +1686,10 @@ EOF
1580
1686
fi
1581
1687
done
1582
1688
1583
-
local total_possible_files=$((${#required_files[@]}+${#optional_files[@]}))
1689
+
local total_expected_files=$((${#required_files[@]}+${#project_files[@]}))
1690
+
local total_possible_files=$((${#required_files[@]}+${#project_files[@]}+${#optional_files[@]}))
1584
1691
1585
-
if [ $files_created-ge${#required_files[@]} ];then
1692
+
if [ $files_created-ge$total_expected_files ];then
1586
1693
print_success "All required context files created! ($files_created/$total_possible_files files total)"
0 commit comments