Skip to content

feat!: update module to be compatible with saucebase 2.0#32

Merged
sauce-base merged 7 commits into
mainfrom
dev-v2
Jun 4, 2026
Merged

feat!: update module to be compatible with saucebase 2.0#32
sauce-base merged 7 commits into
mainfrom
dev-v2

Conversation

@roble

@roble roble commented Jun 3, 2026

Copy link
Copy Markdown
Collaborator

This pull request makes several structural and configuration improvements to the Settings module, focusing on standardizing module naming, enhancing backend and frontend integration, and cleaning up legacy or redundant files. The most important changes include updating the module's autoload paths, registering the service provider in composer.json, refactoring navigation and route registration, and removing obsolete provider files and the module.json manifest.

Module structure and configuration:

  • Updated composer.json to set the autoload path for Modules\Settings to src/ instead of app/, registered the SettingsServiceProvider, set the module description and version, and added "minimum-stability": "stable" for package stability. The license was also set to proprietary. [1] [2] [3]
  • Removed the obsolete module.json manifest, fully transitioning module metadata and provider registration to composer.json.

Provider and routing cleanup:

  • Removed the legacy SettingsServiceProvider and RouteServiceProvider files, as provider registration now occurs via composer.json and route registration is handled directly in the route files. [1] [2]
  • Refactored routes/web.php and routes/api.php to wrap route groups in appropriate middleware and closure signatures for better clarity and compatibility. [1] [2] [3]

Navigation and frontend integration:

  • Changed navigation registration in routes/navigation.php to use lazy route resolution (passing closures instead of direct calls to route()), improving boot-time performance and reliability. [1] [2] [3] [4]
  • Moved frontend setup logic from resources/js/app.ts to a new resources/js/vue/app.ts file, and updated the entry point to re-export from the new location. [1] [2]

Testing and developer tooling:

  • Standardized the module name in test scripts and commands to lowercase settings for consistency across the codebase and CI configuration. [1] [2] [3]
  • Added a new db:seed task for seeding the Settings module database and updated code generation and E2E test commands in Taskfile.yml to use the lowercase module name.

Other improvements:

  • Added a navigation group sort order method to SettingsPlugin for improved ordering in Filament navigation.
  • Updated the copyright year in LICENSE.

These changes modernize the Settings module's structure, improve maintainability, and ensure consistency across backend and frontend code.

Copilot AI review requested due to automatic review settings June 3, 2026 18:05

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR modernizes the Settings module for Saucebase 2.0 by shifting module metadata/provider registration into composer.json, standardizing module naming, and reorganizing backend/frontend structure around src/ (PHP) and resources/js/vue/ (Vue/Inertia).

Changes:

  • Moved module autoloading to src/, registered the module service provider via composer.json, and removed module.json + legacy providers.
  • Refactored module routing/navigation registration and introduced new Settings/Profile/Password controllers + request validators.
  • Migrated frontend entrypoint to resources/js/vue/app.ts and added new Inertia/Vue pages for Settings + Profile management.

Reviewed changes

Copilot reviewed 15 out of 27 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
Taskfile.yml Standardizes module name casing in tooling; adds db seed task.
src/Providers/SettingsServiceProvider.php New service provider location for package discovery.
src/Http/Requests/UpdateProfileInfoRequest.php Adds validation rules for profile info updates.
src/Http/Requests/UpdateProfileAvatarRequest.php Adds avatar upload validation rules.
src/Http/Requests/UpdatePasswordRequest.php Adds password change validation rules.
src/Http/Controllers/SettingsController.php Adds Settings landing controller (Inertia render).
src/Http/Controllers/ProfileController.php Adds Profile show/edit/update controllers for Inertia.
src/Http/Controllers/PasswordController.php Adds password change flow + notification trigger.
src/Filament/SettingsPlugin.php Adds nav group sort customization for Filament plugin.
src/Filament/Pages/GeneralSettings.php Introduces placeholder Filament settings page.
routes/web.php Wraps module web routes with explicit middleware groups.
routes/navigation.php Switches to lazy route resolution for navigation items.
routes/api.php Wraps API routes in explicit middleware groups (still uses apiResource).
resources/js/vue/pages/Profile/Edit.vue Adds profile edit UI incl. avatar upload/delete UX.
resources/js/vue/pages/Profile/ChangePassword.vue Adds change-password UI.
resources/js/vue/pages/Profile.vue Adds profile overview + social account connections UI.
resources/js/vue/pages/Index.vue Adds Settings index page UI scaffold.
resources/js/vue/components/PageHeader.vue Adds module-level page header component w/ back link.
resources/js/vue/app.ts New module frontend setup entry (icons + css import).
resources/js/app.ts Re-exports from new resources/js/vue/app.ts entrypoint.
module.json Removed legacy module manifest.
LICENSE Updates copyright year.
composer.json Updates autoload path/provider registration and adds package metadata.
CLAUDE.md Updates module docs/testing commands and module overview.
app/Providers/SettingsServiceProvider.php Removes legacy provider file under app/.
app/Providers/RouteServiceProvider.php Removes legacy route service provider under app/.
.github/workflows/test.yml Standardizes module name casing for CI workflow input.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread routes/api.php
Comment on lines +6 to +9
Route::middleware('api')->group(function (): void {
Route::middleware(['auth:sanctum'])->prefix('api/v1/settings')->group(function (): void {
Route::apiResource('settings', SettingsController::class, ['as' => 'api']);
});
Comment thread resources/js/vue/app.ts
Comment on lines +7 to +12
/**
* Settings module setup
* Called during app initialization before mounting
*
* NOTE: Navigation registration has been moved to backend SettingsServiceProvider.
*/
Comment thread composer.json
Comment on lines +3 to +6
"description": "Settings module",
"type": "saucebase-module",
"license": "proprietary",
"version": "1.3.1",
@sauce-base sauce-base merged commit 8bbe9e7 into main Jun 4, 2026
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants