@@ -1105,6 +1105,138 @@ EOF
11051105Generated: $( date)  
11061106EOF 
11071107
1108+     #  Copy or download all context files from the repository
1109+     SCRIPT_DIR=" $( dirname " $0 " ) " 
1110+     REPO_BASE_URL=" https://raw.githubusercontent.com/chrisbaswell/laravel-claude-code-setup/main" 
1111+     
1112+     #  Function to copy local file or download from repo
1113+     copy_or_download_context_file () {
1114+         local  filename=" $1 " 
1115+         local  description=" $2 " 
1116+         
1117+         print_status " Installing $description ..." 
1118+         if  [ -f  " $SCRIPT_DIR /.claude/context/$filename "   ];  then 
1119+             cp " $SCRIPT_DIR /.claude/context/$filename "   " .claude/context/" 
1120+             print_success " $description  copied from local repository" 
1121+         else 
1122+             print_status " $description  not found locally, downloading from repository..." 
1123+             if  curl -fsSL " $REPO_BASE_URL /.claude/context/$filename "   -o " .claude/context/$filename " ;  then 
1124+                 print_success " $description  downloaded successfully" 
1125+             else 
1126+                 print_warning " Failed to download $description , creating basic version" 
1127+                 return  1
1128+             fi 
1129+         fi 
1130+         return  0
1131+     }
1132+     
1133+     #  Install Laravel 12 guidelines
1134+     if  !  copy_or_download_context_file " laravel12_guidelines.md"   " Laravel 12 guidelines" ;  then 
1135+         cat >  " .claude/context/laravel12_guidelines.md"   <<  'EOF '
1136+ # Laravel 12 Development Guidelines 
1137+ 
1138+ ## Core Laravel 12 Features 
1139+ 
1140+ ### New Attribute Class for Accessors/Mutators 
1141+ Laravel 12 introduces the `Attribute` class for cleaner accessor and mutator definitions. 
1142+ 
1143+ ### Modern Application Configuration 
1144+ Use the streamlined Application class in `bootstrap/app.php`. 
1145+ 
1146+ ### Enhanced Validation 
1147+ Leverage Laravel 12's improved validation features. 
1148+ 
1149+ Generated: $(date) 
1150+ EOF 
1151+     fi 
1152+     
1153+     #  Install Livewire Volt guidelines
1154+     if  !  copy_or_download_context_file " livewire_volt_guidelines.md"   " Livewire Volt guidelines" ;  then 
1155+         cat >  " .claude/context/livewire_volt_guidelines.md"   <<  'EOF '
1156+ # Livewire Volt Development Guidelines 
1157+ 
1158+ ## Volt Functional Components 
1159+ Use Volt for modern, functional component development with Livewire. 
1160+ 
1161+ Generated: $(date) 
1162+ EOF 
1163+     fi 
1164+     
1165+     #  Install FluxUI guidelines
1166+     if  !  copy_or_download_context_file " fluxui_guidelines.md"   " FluxUI guidelines" ;  then 
1167+         cat >  " .claude/context/fluxui_guidelines.md"   <<  'EOF '
1168+ # FluxUI Development Guidelines 
1169+ 
1170+ ## Component Usage 
1171+ Always prefer FluxUI components over custom HTML/CSS. 
1172+ 
1173+ Generated: $(date) 
1174+ EOF 
1175+     fi 
1176+     
1177+     #  Install Livewire Alpine context
1178+     if  !  copy_or_download_context_file " livewire_alpine_context.md"   " Livewire Alpine context" ;  then 
1179+         cat >  " .claude/context/livewire_alpine_context.md"   <<  'EOF '
1180+ # Livewire + Alpine.js Integration 
1181+ 
1182+ ## Best Practices 
1183+ Combine Livewire with Alpine.js for optimal interactivity. 
1184+ 
1185+ Generated: $(date) 
1186+ EOF 
1187+     fi 
1188+     
1189+     #  Install project structure guide
1190+     if  !  copy_or_download_context_file " project_structure.md"   " project structure guide" ;  then 
1191+         cat >  " .claude/context/project_structure.md"   <<  'EOF '
1192+ # Project Structure Guide 
1193+ 
1194+ ## Laravel 12 Project Organization 
1195+ Follow Laravel 12 conventions for project structure. 
1196+ 
1197+ Generated: $(date) 
1198+ EOF 
1199+     fi 
1200+     
1201+     #  Install Playwright testing guide
1202+     if  !  copy_or_download_context_file " playwright_testing.md"   " Playwright testing guide" ;  then 
1203+         cat >  " .claude/context/playwright_testing.md"   <<  'EOF '
1204+ # Playwright Testing Guide 
1205+ 
1206+ ## End-to-End Testing 
1207+ Use Playwright for comprehensive E2E testing. 
1208+ 
1209+ Generated: $(date) 
1210+ EOF 
1211+     fi 
1212+     
1213+     #  Install web automation guide
1214+     if  !  copy_or_download_context_file " web_automation_guide.md"   " web automation guide" ;  then 
1215+         cat >  " .claude/context/web_automation_guide.md"   <<  'EOF '
1216+ # Web Automation Guide 
1217+ 
1218+ ## Playwright vs Fetch MCP 
1219+ Choose the right tool for web automation tasks. 
1220+ 
1221+ Generated: $(date) 
1222+ EOF 
1223+     fi 
1224+     
1225+     #  Install Herd development guide
1226+     if  !  copy_or_download_context_file " herd_development.md"   " Herd development guide" ;  then 
1227+         cat >  " .claude/context/herd_development.md"   <<  'EOF '
1228+ # Laravel Herd Development Guide 
1229+ 
1230+ ## Local Development with Herd 
1231+ Use Laravel Herd for zero-configuration local development. 
1232+ 
1233+ Generated: $(date) 
1234+ EOF 
1235+     fi 
1236+     
1237+     #  Install NetSuite context (optional)
1238+     copy_or_download_context_file " netsuite_context.md"   " NetSuite context"   ||  print_status " NetSuite context skipped (project-specific)" 
1239+ 
11081240    #  Create FluxUI quick reference
11091241    print_status " Creating FluxUI quick reference..." 
11101242    cat >  " .claude/context/fluxui-reference.md"   <<  EOF 
@@ -1387,21 +1519,55 @@ EOF
13871519
13881520    #  Verify all files were created
13891521    local  files_created=0
1390-     local  expected_files=(" context/project-context.md"   " context/coding-standards.md"   " context/fluxui-reference.md"   " shortcuts.sh"   " README.md"  )
1391-     
1392-     for  file  in  " ${expected_files[@]} " ;  do 
1522+     local  required_files=(
1523+         " context/project-context.md"   
1524+         " context/coding-standards.md"   
1525+         " context/fluxui-reference.md" 
1526+         " context/laravel12_guidelines.md" 
1527+         " context/livewire_volt_guidelines.md" 
1528+         " context/fluxui_guidelines.md" 
1529+         " context/livewire_alpine_context.md" 
1530+         " context/project_structure.md" 
1531+         " context/playwright_testing.md" 
1532+         " context/web_automation_guide.md" 
1533+         " context/herd_development.md" 
1534+         " shortcuts.sh"   
1535+         " README.md" 
1536+     )
1537+     
1538+     local  optional_files=(
1539+         " context/netsuite_context.md" 
1540+     )
1541+     
1542+     #  Count required files
1543+     for  file  in  " ${required_files[@]} " ;  do 
13931544        if  [ -f  " .claude/$file "   ];  then 
13941545            (( files_created++ )) 
13951546        else 
1396-             print_error " Failed to create .claude/$file " 
1547+             print_error " Failed to create required file: .claude/$file " 
1548+         fi 
1549+     done 
1550+     
1551+     #  Count optional files
1552+     local  optional_created=0
1553+     for  file  in  " ${optional_files[@]} " ;  do 
1554+         if  [ -f  " .claude/$file "   ];  then 
1555+             (( files_created++ )) 
1556+             (( optional_created++ )) 
13971557        fi 
13981558    done 
13991559
1400-     if  [ $files_created  -eq  ${# expected_files[@]}  ];  then 
1401-         print_success " Project context files created! ($files_created /${# expected_files[@]}  files)" 
1560+     local  total_possible_files=$(( ${# required_files[@]}  +  ${# optional_files[@]} )) 
1561+     
1562+     if  [ $files_created  -ge  ${# required_files[@]}  ];  then 
1563+         print_success " All required context files created! ($files_created /$total_possible_files  files total)" 
1564+         if  [ $optional_created  -gt  0 ];  then 
1565+             print_status " Optional files installed: $optional_created " 
1566+         fi 
14021567        return  0
14031568    else 
1404-         print_error " Only $files_created /${# expected_files[@]}  project files were created successfully" 
1569+         print_error " Only $files_created /$total_possible_files  project files were created successfully" 
1570+         print_error " Missing required files. Check the installation output above." 
14051571        return  1
14061572    fi 
14071573}
@@ -1497,7 +1663,7 @@ install_fluxui_and_volt() {
14971663#  Main installation function
14981664main () {
14991665    echo  " ================================================" 
1500-     echo  " Laravel Claude Code Setup Script v3.1 " 
1666+     echo  " Laravel Claude Code Setup Script v3.2 " 
15011667    echo  " Laravel 12 + FluxUI + Playwright MCP Server" 
15021668    echo  " ================================================" 
15031669    echo  " " 
0 commit comments