Skip to content

Commit 4024d01

Browse files
authored
Merge pull request #353 from AustinMastLab/Biospex-350
Update Composer dependencies and enhance middleware configuration
2 parents 9f634f1 + e0506ce commit 4024d01

23 files changed

Lines changed: 1494 additions & 1357 deletions

File tree

AGENTS.md

Lines changed: 3 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,12 @@ The Laravel Boost guidelines are specifically curated by Laravel maintainers for
6060
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.
6161

6262
- php - 8.5
63-
- filament/filament (FILAMENT) - v4
64-
- laravel/framework (LARAVEL) - v12
63+
- filament/filament (FILAMENT) - v5
64+
- laravel/framework (LARAVEL) - v13
6565
- laravel/prompts (PROMPTS) - v0
6666
- laravel/reverb (REVERB) - v1
6767
- laravel/sanctum (SANCTUM) - v4
68-
- livewire/livewire (LIVEWIRE) - v3
68+
- livewire/livewire (LIVEWIRE) - v4
6969
- laravel/boost (BOOST) - v2
7070
- laravel/breeze (BREEZE) - v2
7171
- laravel/mcp (MCP) - v0
@@ -200,31 +200,6 @@ This project has domain-specific skills available in `**/skills/**`. You MUST ac
200200

201201
- If you receive an "Illuminate\Foundation\ViteException: Unable to locate file in Vite manifest" error, you can run `yarn run build` or ask the user to run `yarn run dev` or `composer run dev`.
202202

203-
=== laravel/v12 rules ===
204-
205-
# Laravel 12
206-
207-
- CRITICAL: ALWAYS use `search-docs` tool for version-specific Laravel documentation and updated code examples.
208-
- Since Laravel 11, Laravel has a new streamlined file structure which this project uses.
209-
210-
## Laravel 12 Structure
211-
212-
- In Laravel 12, middleware are no longer registered in `app/Http/Kernel.php`.
213-
- Middleware are configured declaratively in `bootstrap/app.php` using `Application::configure()->withMiddleware()`.
214-
- `bootstrap/app.php` is the file to register middleware, exceptions, and routing files.
215-
- `bootstrap/providers.php` contains application specific service providers.
216-
- The `app/Console/Kernel.php` file no longer exists; use `bootstrap/app.php` or `routes/console.php` for console configuration.
217-
- Console commands in `app/Console/Commands/` are automatically available and do not require manual registration.
218-
219-
## Database
220-
221-
- When modifying a column, the migration must include all of the attributes that were previously defined on the column. Otherwise, they will be dropped and lost.
222-
- Laravel 12 allows limiting eagerly loaded records natively, without external packages: `$query->latest()->limit(10);`.
223-
224-
### Models
225-
226-
- Casts can and likely should be set in a `casts()` method on a model rather than the `$casts` property. Follow existing conventions from other models.
227-
228203
=== livewire/core rules ===
229204

230205
# Livewire

CLAUDE.md

Lines changed: 3 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,12 @@ The Laravel Boost guidelines are specifically curated by Laravel maintainers for
6060
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.
6161

6262
- php - 8.5
63-
- filament/filament (FILAMENT) - v4
64-
- laravel/framework (LARAVEL) - v12
63+
- filament/filament (FILAMENT) - v5
64+
- laravel/framework (LARAVEL) - v13
6565
- laravel/prompts (PROMPTS) - v0
6666
- laravel/reverb (REVERB) - v1
6767
- laravel/sanctum (SANCTUM) - v4
68-
- livewire/livewire (LIVEWIRE) - v3
68+
- livewire/livewire (LIVEWIRE) - v4
6969
- laravel/boost (BOOST) - v2
7070
- laravel/breeze (BREEZE) - v2
7171
- laravel/mcp (MCP) - v0
@@ -200,31 +200,6 @@ This project has domain-specific skills available in `**/skills/**`. You MUST ac
200200

201201
- If you receive an "Illuminate\Foundation\ViteException: Unable to locate file in Vite manifest" error, you can run `yarn run build` or ask the user to run `yarn run dev` or `composer run dev`.
202202

203-
=== laravel/v12 rules ===
204-
205-
# Laravel 12
206-
207-
- CRITICAL: ALWAYS use `search-docs` tool for version-specific Laravel documentation and updated code examples.
208-
- Since Laravel 11, Laravel has a new streamlined file structure which this project uses.
209-
210-
## Laravel 12 Structure
211-
212-
- In Laravel 12, middleware are no longer registered in `app/Http/Kernel.php`.
213-
- Middleware are configured declaratively in `bootstrap/app.php` using `Application::configure()->withMiddleware()`.
214-
- `bootstrap/app.php` is the file to register middleware, exceptions, and routing files.
215-
- `bootstrap/providers.php` contains application specific service providers.
216-
- The `app/Console/Kernel.php` file no longer exists; use `bootstrap/app.php` or `routes/console.php` for console configuration.
217-
- Console commands in `app/Console/Commands/` are automatically available and do not require manual registration.
218-
219-
## Database
220-
221-
- When modifying a column, the migration must include all of the attributes that were previously defined on the column. Otherwise, they will be dropped and lost.
222-
- Laravel 12 allows limiting eagerly loaded records natively, without external packages: `$query->latest()->limit(10);`.
223-
224-
### Models
225-
226-
- Casts can and likely should be set in a `casts()` method on a model rather than the `$casts` property. Follow existing conventions from other models.
227-
228203
=== livewire/core rules ===
229204

230205
# Livewire

app/Events/SnsTopicSubscriptionEvent.php

Lines changed: 0 additions & 41 deletions
This file was deleted.
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
<?php
2+
3+
/*
4+
* Copyright (C) 2014 - 2026, Biospex
5+
* biospex@gmail.com
6+
*
7+
* This program is free software: you can redistribute it and/or modify
8+
* it under the terms of the GNU General Public License as published by
9+
* the Free Software Foundation, either version 3 of the License, or
10+
* (at your option) any later version.
11+
*
12+
* This program is distributed in the hope that it will be useful,
13+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15+
* GNU General Public License for more details.
16+
*
17+
* You should have received a copy of the GNU General Public License
18+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
19+
*/
20+
21+
namespace App\Filament\Components;
22+
23+
use Filament\Forms\Components\CodeEditor;
24+
use Filament\Forms\Components\CodeEditor\Enums\Language;
25+
26+
class JsonEditor extends CodeEditor
27+
{
28+
protected function setUp(): void
29+
{
30+
parent::setUp();
31+
32+
$this->language(Language::Json);
33+
$this->columnSpanFull();
34+
35+
// Validate that the input is valid JSON
36+
$this->rule(function () {
37+
return function (string $attribute, mixed $value, \Closure $fail) {
38+
if (is_string($value) && ! blank($value)) {
39+
json_decode($value);
40+
if (json_last_error() !== JSON_ERROR_NONE) {
41+
$fail("The {$this->getLabel()} must be a valid JSON string.");
42+
}
43+
}
44+
};
45+
});
46+
47+
// Format array data from database for the UI
48+
$this->formatStateUsing(function ($state) {
49+
if (is_string($state)) {
50+
$decoded = json_decode($state, associative: true);
51+
52+
return json_last_error() === JSON_ERROR_NONE ? json_encode($decoded, JSON_PRETTY_PRINT) : $state;
53+
}
54+
55+
return is_array($state) ? json_encode($state, JSON_PRETTY_PRINT) : $state;
56+
});
57+
58+
// Handle saving back as an array
59+
$this->dehydrateStateUsing(function (?string $state) {
60+
if (blank($state)) {
61+
return null;
62+
}
63+
$decoded = json_decode($state, associative: true);
64+
65+
return json_last_error() === JSON_ERROR_NONE ? $decoded : $state;
66+
});
67+
68+
// Keep Livewire state in sync
69+
$this->afterStateUpdated(function (?string $state, $set, $component) {
70+
$set($component->getStatePath(), $state ? json_decode($state, associative: true) : null);
71+
});
72+
}
73+
}

app/Filament/Resources/AmCharts/Schemas/AmChartForm.php

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,29 @@
11
<?php
22

3+
/*
4+
* Copyright (C) 2014 - 2026, Biospex
5+
* biospex@gmail.com
6+
*
7+
* This program is free software: you can redistribute it and/or modify
8+
* it under the terms of the GNU General Public License as published by
9+
* the Free Software Foundation, either version 3 of the License, or
10+
* (at your option) any later version.
11+
*
12+
* This program is distributed in the hope that it will be useful,
13+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15+
* GNU General Public License for more details.
16+
*
17+
* You should have received a copy of the GNU General Public License
18+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
19+
*/
20+
321
namespace App\Filament\Resources\AmCharts\Schemas;
422

23+
use App\Filament\Components\JsonEditor;
524
use Filament\Forms\Components\Select;
625
use Filament\Forms\Components\TextInput;
726
use Filament\Schemas\Schema;
8-
use ValentinMorice\FilamentJsonColumn\JsonColumn;
927

1028
class AmChartForm
1129
{
@@ -20,8 +38,8 @@ public static function configure(Schema $schema): Schema
2038
->required()
2139
->numeric()
2240
->default(0),
23-
JsonColumn::make('series'),
24-
JsonColumn::make('data'),
41+
JsonEditor::make('series'),
42+
JsonEditor::make('data'),
2543
]);
2644
}
2745
}

app/Filament/Resources/GeoLocateCommunities/Schemas/GeoLocateCommunityForm.php

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

3+
/*
4+
* Copyright (C) 2014 - 2026, Biospex
5+
* biospex@gmail.com
6+
*
7+
* This program is free software: you can redistribute it and/or modify
8+
* it under the terms of the GNU General Public License as published by
9+
* the Free Software Foundation, either version 3 of the License, or
10+
* (at your option) any later version.
11+
*
12+
* This program is distributed in the hope that it will be useful,
13+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15+
* GNU General Public License for more details.
16+
*
17+
* You should have received a copy of the GNU General Public License
18+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
19+
*/
20+
321
namespace App\Filament\Resources\GeoLocateCommunities\Schemas;
422

23+
use App\Filament\Components\JsonEditor;
524
use Filament\Forms\Components\Select;
625
use Filament\Forms\Components\TextInput;
726
use Filament\Schemas\Schema;
8-
use ValentinMorice\FilamentJsonColumn\JsonColumn;
927

1028
class GeoLocateCommunityForm
1129
{
@@ -18,7 +36,7 @@ public static function configure(Schema $schema): Schema
1836
->required(),
1937
TextInput::make('name')
2038
->required(),
21-
JsonColumn::make('data')
39+
JsonEditor::make('data')
2240
->required(),
2341
]);
2442
}

app/Filament/Resources/GeoLocateDataSources/Schemas/GeoLocateDataSourceForm.php

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

3+
/*
4+
* Copyright (C) 2014 - 2026, Biospex
5+
* biospex@gmail.com
6+
*
7+
* This program is free software: you can redistribute it and/or modify
8+
* it under the terms of the GNU General Public License as published by
9+
* the Free Software Foundation, either version 3 of the License, or
10+
* (at your option) any later version.
11+
*
12+
* This program is distributed in the hope that it will be useful,
13+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15+
* GNU General Public License for more details.
16+
*
17+
* You should have received a copy of the GNU General Public License
18+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
19+
*/
20+
321
namespace App\Filament\Resources\GeoLocateDataSources\Schemas;
422

23+
use App\Filament\Components\JsonEditor;
524
use Filament\Forms\Components\Select;
625
use Filament\Forms\Components\TextInput;
726
use Filament\Schemas\Schema;
8-
use ValentinMorice\FilamentJsonColumn\JsonColumn;
927

1028
class GeoLocateDataSourceForm
1129
{
@@ -26,7 +44,7 @@ public static function configure(Schema $schema): Schema
2644
->relationship('geoLocateCommunity', 'name'),
2745
Select::make('download_id')
2846
->relationship('download', 'file'),
29-
JsonColumn::make('data_source'),
47+
JsonEditor::make('data_source'),
3048
TextInput::make('data'),
3149
]);
3250
}

app/Filament/Resources/GeoLocateForms/Schemas/GeoLocateFormForm.php

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

3+
/*
4+
* Copyright (C) 2014 - 2026, Biospex
5+
* biospex@gmail.com
6+
*
7+
* This program is free software: you can redistribute it and/or modify
8+
* it under the terms of the GNU General Public License as published by
9+
* the Free Software Foundation, either version 3 of the License, or
10+
* (at your option) any later version.
11+
*
12+
* This program is distributed in the hope that it will be useful,
13+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15+
* GNU General Public License for more details.
16+
*
17+
* You should have received a copy of the GNU General Public License
18+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
19+
*/
20+
321
namespace App\Filament\Resources\GeoLocateForms\Schemas;
422

23+
use App\Filament\Components\JsonEditor;
524
use Filament\Forms\Components\Select;
625
use Filament\Forms\Components\TextInput;
726
use Filament\Schemas\Schema;
8-
use ValentinMorice\FilamentJsonColumn\JsonColumn;
927

1028
class GeoLocateFormForm
1129
{
@@ -18,7 +36,7 @@ public static function configure(Schema $schema): Schema
1836
->required(),
1937
TextInput::make('name')
2038
->required(),
21-
JsonColumn::make('fields')
39+
JsonEditor::make('fields')
2240
->required(),
2341
]);
2442
}

0 commit comments

Comments
 (0)