CMS Framework - v2.3.0

CMS Framework Documentation

Welcome to the CMS Framework documentation! This Laravel package provides a comprehensive content management system foundation with built-in user management, role-based access control, notifications, and extensible architecture.

Overview

The CMS Framework is designed to help developers quickly build content management systems with robust features. It provides:

  • User Management System: Complete CRUD operations for users with role-based access control
  • Content Management: Blog posts, pages, custom content types, and taxonomies
  • Site Editor (2.0.0): WordPress-style templates, template parts, patterns, global styles, and menus
  • Visual Editor Integration (2.0.0): Opt-in bridge to the optional artisanpack-ui/visual-editor package
  • Notification System: In-app notifications with email support and user preferences
  • Settings Management: Application-wide configuration with type casting and sanitization
  • Admin Framework: Menu system, widgets, and authorization helpers
  • Theme & Plugin Architecture: Theme discovery, activation, ZIP upload, lifecycle hooks, and plugin support
  • RBAC (2.0.0): Roles and permissions powered by the shared artisanpack-ui/rbac package
  • AI Features (2.3.0): Five content-authoring agents (title, excerpt, tags, category, slug) exposed via Livewire and REST for React/Vue front-ends
  • RESTful API: Clean API endpoints for all operations with standardized error responses
  • Bulk Actions: Bulk operations for posts, pages, and users
  • On-Demand Relationships: Control eager loading via the include query parameter
  • OpenAPI Documentation: Auto-generated API documentation with Swagger UI
  • TypeScript Types: Publishable type definitions for frontend integration
  • Type-Safe Enums: ContentStatus, FieldType, ColumnType, SettingType, and UpdateType enums
  • Laravel Integration: Seamless integration with Laravel applications

Getting Started


Core Modules

Users Module

Complete user management with roles and permissions.

Admin Module

Building blocks for your admin area with automatic route registration.

Core Module

Cross-cutting services for assets and utilities.

  • Core - Overview of core services
  • core/Assets - Asset registration and management

Settings Module

Application-wide configuration storage with type casting.

Notifications Module

Complete notification system with email support and preferences.

Themes Module

Flexible theme management with WordPress-style template hierarchy.

Site Editor Module (2.0.0)

WordPress-style site-editor back-end — templates, parts, patterns, global styles, and menus.


Content Modules

Blog Module

Full-featured blog with posts, categories, and tags.

  • Blog - Module overview
  • blog/Query Runtime - QueryRuntime service for core/query block loops (2.0.0)
  • Posts with drafts, scheduling, and publishing
  • Categories with hierarchical structure
  • Tags for flexible content organization
  • Author relationships and archives

Pages Module

Hierarchical page management with templates.

  • Pages with parent-child relationships
  • Template support for custom layouts
  • Categories and tags for pages
  • Breadcrumb generation

Content Types Module

Custom content type builder for extensible content.


AI Features (2.3.0)

Content-authoring agents built on the artisanpack-ui/ai foundation. Five agents (post title, excerpt, tag/category suggestion, SEO slug) exposed through a Livewire component and REST endpoints so Livewire, React, and Vue front-ends can all trigger them without any framework-specific glue.

  • AI Features — Feature keys, trigger surfaces, per-agent contracts, and extension points

Extension Modules

Plugins Module (Experimental)

Plugin architecture for extending functionality.

  • Plugin discovery and manifest validation
  • Activation/deactivation lifecycle
  • Migration support for plugins
  • Update checking and version management
  • Security: path traversal prevention, input sanitization

Core Updater

System update management for keeping the CMS current.

  • Version checking from GitHub, GitLab, or custom sources
  • Backup creation before updates
  • Rollback support

Developer Resources

Guides

API Documentation

Reference


Module Quick Reference

Module Purpose Status
Users User management — now powered by artisanpack-ui/rbac Stable
Admin Admin menu, pages, widgets Stable
Core Assets, utilities Stable
Settings Application configuration + WP-shape site.* envelope (2.0.0) Stable
Notifications In-app and email notifications Stable
Themes Theme management + ZIP upload + lifecycle hooks (2.0.0) Stable
Site Editor Templates, parts, patterns, global styles, menus New in 2.0.0
Blog Posts, categories, tags, QueryRuntime for core/query (2.0.0) Stable
Pages Hierarchical pages Stable
Content Types Custom content types Stable
Plugins Plugin system Experimental
Core Updater System updates Experimental

API Endpoints Overview

All API endpoints use the /api/cms prefix with Sanctum authentication.

User Management

  • GET/POST /users - List/create users
  • GET/PUT/DELETE /users/{id} - User operations
  • POST /users/bulk - Bulk user actions (delete, activate, deactivate)
  • GET/POST /roles - Role management
  • GET/POST /permissions - Permission management

Content

  • GET/POST /posts - Blog post management
  • POST /posts/bulk - Bulk post actions (delete, publish, draft)
  • GET/POST /pages - Page management
  • POST /pages/bulk - Bulk page actions (delete, publish, draft)
  • GET/POST /content-types - Content type management

System

  • GET/POST /settings - Settings management
  • GET/PUT /settings/site - WP-shape site-meta envelope (2.0.0)
  • GET/POST /notifications - Notification operations
  • GET/POST /themes - Theme management
  • POST /themes - Upload a theme as a ZIP archive (2.0.0)
  • GET/POST /plugins - Plugin management (experimental)

Site Editor (2.0.0)

  • GET/POST/PUT/DELETE /templates - Templates (file + DB merged)
  • GET/POST/PUT/DELETE /template-parts - Template parts (with area)
  • GET/POST/PUT/DELETE /blocks - Synced patterns (WP wp_block shape)
  • GET/POST/PUT/DELETE /block-patterns/patterns - Unsynced patterns (theme + user)
  • GET/PUT/DELETE /global-styles - Singleton-per-theme global styles
  • GET /global-styles/variations - Theme-shipped style variations
  • GET /global-styles/css - Resolved CSS payload
  • GET/POST/PUT/DELETE /menus - Navigation menus
  • GET/POST/PUT/DELETE /menu-items - Menu items
  • GET/PUT/DELETE /menu-locations - Menu location assignments

Documentation

  • GET /docs/api/cms - Swagger UI (when OpenAPI enabled)
  • GET /docs/api/cms.json - Raw OpenAPI specification

See api/README for complete API documentation.


Configuration

The framework uses configuration files to customize behavior:

// config/artisanpack/cms-framework.php
return [
    'user_model' => \App\Models\User::class,
];

See Configuration for all available options.


Support

For issues, feature requests, and contributions:


This documentation covers CMS Framework v2.0.0