Skip to content

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

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

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

Conversation

@roble

@roble roble commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

This pull request refactors the Blog module to align with the new Saucebase module system, improves consistency, and updates documentation and code to reflect recent architectural and naming changes. Key updates include switching to Composer-based module registration, standardizing naming conventions, updating seeder logic, and improving developer tooling.

Module system migration and configuration:

  • Migrated module registration to Composer by removing module.json, updating composer.json to include BlogServiceProvider, set the autoload path to src/, and added version/license info. The workflow now uses composer.json for versioning instead of module.json. ([[1]](https://github.com/saucebase-dev/blog/pull/3/files#diff-e6fdaf48ec339e2166f48043597d67d91464d12ef34fb958b12d6c93ba5f6fe3L1-L15), [[2]](https://github.com/saucebase-dev/blog/pull/3/files#diff-d2ab9925cad7eac58e0ff4cc0d251a937ecf49e4b6bf57f8b95aab76648a9d34L3-R6), [[3]](https://github.com/saucebase-dev/blog/pull/3/files#diff-d2ab9925cad7eac58e0ff4cc0d251a937ecf49e4b6bf57f8b95aab76648a9d34L13-R23), [[4]](https://github.com/saucebase-dev/blog/pull/3/files#diff-d2ab9925cad7eac58e0ff4cc0d251a937ecf49e4b6bf57f8b95aab76648a9d34L28-R33), [[5]](https://github.com/saucebase-dev/blog/pull/3/files#diff-87db21a973eed4fef5f32b267aa60fcee5cbdf03c67fafdc2a9b553bb0b15f34L15-R15))
  • Removed legacy service provider files (BlogServiceProvider.php, RouteServiceProvider.php) as registration is now handled via Composer autoload. ([[1]](https://github.com/saucebase-dev/blog/pull/3/files#diff-5878fada921ef9d100878b903aedd705b8a2b95f6ec643dc56497d53a36df371L1-L16), [[2]](https://github.com/saucebase-dev/blog/pull/3/files#diff-846ccd1dd2844a1dab103a38b7919ae15e1d9cde8fae8507369b324ea1718689L1-L17))

Naming and convention updates:

  • Standardized all references to the module as blog (lowercase), including workflow files, test commands, code generation, and Playwright test configs. ([[1]](https://github.com/saucebase-dev/blog/pull/3/files#diff-faff1af3d8ff408964a57b2e475f69a6b7c7b71c9978cccc8f471798caac2c88L16-R16), [[2]](https://github.com/saucebase-dev/blog/pull/3/files#diff-cd2d359855d0301ce190f1ec3b4c572ea690c83747f6df61c9340720e3d2425eL12-R25), [[3]](https://github.com/saucebase-dev/blog/pull/3/files#diff-6ebdb617a8104a7756d0cf36578ab01103dc9f07e4dc6feb751296b9c402faf7L60-R60))
  • Moved frontend entry from app.ts to vue/app.ts and updated CSS import paths for module isolation. ([[1]](https://github.com/saucebase-dev/blog/pull/3/files#diff-743ef4ebcd98b1f3998b49616e0389aa03b0e0e007101d73bc6aa07b09c783a4L1-R1), [[2]](https://github.com/saucebase-dev/blog/pull/3/files#diff-29313a9a39e44564e58410a58b8b3c5a6cda9f9cabf5539440213ca433996843R1-R11))
  • Renamed Vue components directory from components to vue/components for better structure. ([resources/js/vue/components/LatestPostsSection.vueL14-R16](https://github.com/saucebase-dev/blog/pull/3/files#diff-52cbb51767cb5f0df08f4f45114a8b6c9d3787a7b0f9e816d7b51eedc1d07f47L14-R16))

Seeder and content improvements:

  • Refactored BlogDatabaseSeeder to use a DRY createPost method for attaching cover images, and updated post content to reflect the new stack (Laravel, Inertia.js, Vue/React, Tailwind). ([[1]](https://github.com/saucebase-dev/blog/pull/3/files#diff-75ee097d37f3b90af6fbe72718633f7b62ca17c91f9ccad128734d6d47561134L23-R33), [[2]](https://github.com/saucebase-dev/blog/pull/3/files#diff-75ee097d37f3b90af6fbe72718633f7b62ca17c91f9ccad128734d6d47561134L43-R92), [[3]](https://github.com/saucebase-dev/blog/pull/3/files#diff-ccad8b4ee6013765c2bc672aa0515f8e99e42949c914cce01e0cb2b4e882775dR1-R13))
  • Updated content to reference the new module system (internachi/modular), clarified stack options (Vue or React), and improved instructions for enabling modules and running migrations. ([[1]](https://github.com/saucebase-dev/blog/pull/3/files#diff-cbca8a065bbb2c71aeb75ed66396e9ac8b13af467be6e632a3a27f32e7e12da4L5-R7), [[2]](https://github.com/saucebase-dev/blog/pull/3/files#diff-9ef2065c6d498e321f5fab8b4484c206d541b94e1a9b7e7ecc2c860a9b0a7f1bL1-R15), [[3]](https://github.com/saucebase-dev/blog/pull/3/files#diff-9ef2065c6d498e321f5fab8b4484c206d541b94e1a9b7e7ecc2c860a9b0a7f1bL24-R24), [[4]](https://github.com/saucebase-dev/blog/pull/3/files#diff-a59e45bf32bceb547a313caf4f8ac11f086225474159720b644b96e557dd4edcL9-R20))
  • Removed outdated or incorrect features from documentation (e.g., two-factor authentication, notification preferences). ([[1]](https://github.com/saucebase-dev/blog/pull/3/files#diff-539f4573179500140fb0e834e24d600082e1d7c974cbeea9db6d13abf1a7f8e6L11), [[2]](https://github.com/saucebase-dev/blog/pull/3/files#diff-539f4573179500140fb0e834e24d600082e1d7c974cbeea9db6d13abf1a7f8e6L36))
  • Corrected file paths in documentation to match new conventions (modules/authmodules/auth, etc.). ([database/seeders/content/post-6-copy-and-own.htmlL13-R13](https://github.com/saucebase-dev/blog/pull/3/files#diff-a214194647816e46ad25f1cf9307caac89dd073d9d6d180f0278c4436e319a5fL13-R13))

Developer tooling:

  • Added a new db:seed Taskfile command for seeding the Blog module database. ([Taskfile.ymlL12-R25](https://github.com/saucebase-dev/blog/pull/3/files#diff-cd2d359855d0301ce190f1ec3b4c572ea690c83747f6df61c9340720e3d2425eL12-R25))

License and metadata:

  • Updated copyright year in LICENSE and added license/type/version to composer.json. ([[1]](https://github.com/saucebase-dev/blog/pull/3/files#diff-c693279643b8cd5d248172d9c22cb7cf4ed163a3c98c8a3f69c2717edd3eacb7L3-R3), [[2]](https://github.com/saucebase-dev/blog/pull/3/files#diff-d2ab9925cad7eac58e0ff4cc0d251a937ecf49e4b6bf57f8b95aab76648a9d34L3-R6))

roble added 8 commits April 25, 2026 21:58
… new structure

- Changed version_file from 'module.json' to 'composer.json' in release workflow.
- Updated module name from 'Blog' to 'blog' in test workflow.
- Modified E2E test command to use lowercase 'blog'.
- Removed BlogServiceProvider and RouteServiceProvider files.
- Updated composer.json to include new providers and set module description and version.
- Refactored BlogDatabaseSeeder to use a createPost method for post creation.
- Added DatabaseSeeder for the Blog module.
- Deleted module.json and created new data classes: AuthorData, CategoryData, PostData.
- Created PostStatus enum and BlogPlugin for Filament integration.
- Implemented CategoryResource and PostResource with respective pages and schemas.
- Developed BlogController for handling blog-related requests.
- Created models for Category and Post with necessary relationships and media handling.
Refactor Blog module structure and implement database seeding
Restructure blog module and improve content clarity
Copilot AI review requested due to automatic review settings June 3, 2026 18:05

Copilot AI left a comment

Copy link
Copy Markdown

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 migrates the Blog module to Saucebase 2.0’s Composer-based module system, while reorganizing module structure (PHP + Vue), updating seed content/docs, and standardizing module identifiers to blog.

Changes:

  • Switched module registration/versioning to composer.json and removed module.json + legacy providers.
  • Added/refactored core module code (models, data DTOs, controller, Filament resources) and reorganized frontend entrypoints under resources/js/vue/.
  • Updated seeders and seeded HTML content to reflect the new stack/module system and revised docs/tooling commands.

Reviewed changes

Copilot reviewed 27 out of 48 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
Taskfile.yml Updates module test commands to @blog* and adds a db:seed task.
src/Providers/BlogServiceProvider.php Introduces Composer-registered module service provider.
src/Models/Post.php Adds Post Eloquent model with status casting, slugs, media cover, and published scope.
src/Models/Category.php Adds Category Eloquent model with slugs and relationship to posts.
src/Http/Controllers/BlogController.php Adds blog index/show endpoints using Inertia + SSR.
src/Filament/Resources/Blog/Tables/PostsTable.php Adds Filament table config for managing posts.
src/Filament/Resources/Blog/Tables/CategoriesTable.php Adds Filament table config for managing categories.
src/Filament/Resources/Blog/Schemas/PostForm.php Adds Filament form schema for post create/edit.
src/Filament/Resources/Blog/Schemas/CategoryForm.php Adds Filament form schema for category create/edit.
src/Filament/Resources/Blog/PostResource.php Adds Filament resource wrapper for posts.
src/Filament/Resources/Blog/Pages/ListPosts.php Adds Filament page for listing posts with a shortcut to categories.
src/Filament/Resources/Blog/Pages/ListCategories.php Adds Filament page for listing categories.
src/Filament/Resources/Blog/Pages/EditPost.php Adds Filament edit page with “View Post” action and delete action.
src/Filament/Resources/Blog/Pages/EditCategory.php Adds Filament edit page for categories.
src/Filament/Resources/Blog/Pages/CreatePost.php Adds Filament create page and defaults author to current user.
src/Filament/Resources/Blog/Pages/CreateCategory.php Adds Filament create page for categories.
src/Filament/Resources/Blog/CategoryResource.php Adds Filament resource wrapper for categories.
src/Filament/BlogPlugin.php Adds Filament plugin integration for the Blog module.
src/Enums/PostStatus.php Adds PostStatus enum with Filament label/color + TS transformer attribute.
src/Data/PostData.php Adds PostData DTO for consistent API/SSR payloads and TS type generation.
src/Data/CategoryData.php Adds CategoryData DTO for frontend payloads and TS types.
src/Data/AuthorData.php Adds AuthorData DTO for frontend payloads and TS types.
routes/web.php Wraps blog web routes in a web middleware group for module scoping.
routes/navigation.php Updates navigation registration to defer route generation via closure.
routes/api.php Wraps module API routing in an api middleware group (no endpoints).
resources/js/vue/pages/Show.vue Formatting/structure updates for blog post show page components/meta tags.
resources/js/vue/pages/Index.vue Formatting updates and minor class reordering for the blog index page.
resources/js/vue/components/PostMeta.vue Formatting updates for author/date display component.
resources/js/vue/components/PostCard.vue Minor class ordering/formatting for post card component.
resources/js/vue/components/LatestPostsSection.vue Formatting for latest-posts section header markup.
resources/js/vue/app.ts New Vue entrypoint for module setup (icons + module CSS).
resources/js/types/page-props.d.ts Updates commented Inertia module augmentation target.
resources/js/app.ts Re-exports module setup from the new Vue entrypoint.
module.json Removes legacy module metadata in favor of Composer metadata.
LICENSE Updates copyright year.
database/seeders/DatabaseSeeder.php Adds module-level DatabaseSeeder delegating to BlogDatabaseSeeder.
database/seeders/content/post-6-copy-and-own.html Updates seeded content paths to lowercase module directories.
database/seeders/content/post-5-auth-billing-privacy.html Removes outdated seeded feature claims (2FA, notifications).
database/seeders/content/post-4-your-first-module.html Updates module enablement instructions and framework wording.
database/seeders/content/post-3-vilt-stack.html Updates seeded content to reflect new stack/module system terminology.
database/seeders/content/post-1-what-is-saucebase.html Updates seeded intro content to new module system and framework options.
database/seeders/BlogDatabaseSeeder.php Refactors seeding to a DRY helper and updates post titles/content.
composer.json Moves module metadata/versioning to Composer + adds provider registration + autoload path src/.
CLAUDE.md Updates E2E command example to @blog*.
app/Providers/RouteServiceProvider.php Removes legacy route service provider (module system now Composer-driven).
app/Providers/BlogServiceProvider.php Removes legacy blog service provider (module system now Composer-driven).
.github/workflows/test.yml Updates reusable test workflow input to use module: blog.
.github/workflows/release.yml Switches release workflow version source from module.json to composer.json.

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

Comment thread routes/api.php
Comment on lines 1 to +4
<?php

// No API routes for Blog module
Route::middleware('api')->group(function (): void {
// No API routes for Blog module
Comment thread composer.json
Comment on lines +3 to +6
"description": "Blog module",
"type": "saucebase-module",
"license": "proprietary",
"version": "0.1.0",
@sauce-base
sauce-base merged commit fa6fd7c into main Jun 4, 2026
5 of 7 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