feat: full CMS module (pages, posts, media, menus)#54
Open
willard wants to merge 1 commit into
Open
Conversation
Adds a content management module so shop owners can publish static
pages, blog posts, media, and configure storefront navigation without
editing Vue files.
Backend
- Polymorphic `taggables` pivot shared by Products and Posts
- Static Pages with Tiptap rich-text bodies, SEO fields, templates
- Blog Posts with tag taxonomy, featured images, related posts
- Media Library with alt-text editing and file uploads
- Admin-editable header + footer menus, dynamic storefront rendering
- mews/purifier for server-side HTML sanitization
- New policies for Page, Post, Media, Menu with resource.action
permissions; seeded for super-admin, admin, manager roles
Frontend
- Tiptap editor wrapper with MediaPicker integration
- Admin CRUD pages for Pages, Posts, Media, Menus
- Storefront `/pages/{slug}`, `/blog`, `/blog/{slug}` routes
- Dynamic footer + header from menus shared via Inertia middleware
- AppSidebar gains Content section gated by new permissions
Tests
- 49 new PHPUnit feature tests (pages, posts, media, menus,
polymorphic tags regression, storefront scoping)
- 14 new Vitest admin page tests
- Full suite: 792 PHPUnit, 483 Vitest, Pint pass
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
product_tagpivot to a polymorphictaggablestable so Products and Posts share the tag taxonomy/pages/{slug},/blog,/blog/{slug}and a dynamic footer/header driven by the Menus adminBackend
Page,Post,Media,MenuItemPublishStatus,PageTemplate,MenuLocationHandleInertiaRequestssharesmenusglobally for the storefrontFrontend
TiptapEditor.vuecomponent with MediaPicker integrationTests
Test plan
php artisan test --compact— full PHPUnit suite passesnpm run test:run— Vitest passesvendor/bin/pint --test --format agent— style check/pages/{slug}renders/blogand/blog/{slug}🤖 Generated with Claude Code