Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Sharp Laravel Package

code16/sharp

Sharp is a Laravel package for building a CMS/admin back office with a clean UI and strong DX. Manage structured data, search/filter/sort, run custom commands, and handle auth/validation—fully driven by PHP code, no frontend, data-agnostic.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture Fit

Sharp is a Laravel-first CMS framework designed for structured content management, making it an excellent fit for projects requiring:

  • Decoupled content modeling (entities, fields, validation) without tight coupling to frontend frameworks.
  • API-driven content operations (CRUD, search, filtering) via PHP, enabling headless or hybrid architectures.
  • Laravel conventions (Eloquent, Blade, Inertia.js integration) for seamless adoption.
  • Data-agnostic persistence, allowing flexibility in storage (database, APIs, or custom logic).

Key strengths:

  • Code-first approach: No frontend code required for basic CMS functionality; UI is auto-generated via Inertia.js.
  • Extensibility: Custom entities, commands, and handlers (e.g., 2FA, search engines) via PHP.
  • Security: Built-in 2FA (notification/TOTP), authorization, and validation layers.
  • Modern Laravel: Optimized for Laravel 11+ and PHP 8.3+, leveraging features like enums, attributes, and first-class Inertia support.

Potential misfits:

  • Non-Laravel projects: Requires Laravel 11+; not suitable for Symfony, WordPress, or custom PHP stacks.
  • Highly dynamic UIs: While Inertia.js provides reactivity, complex SPAs may need additional frontend work.
  • Legacy systems: Migration from Sharp 8.x to 9.x introduces breaking changes (e.g., config builder, middleware updates).

Integration Feasibility

Aspect Feasibility Notes
Laravel Compatibility High Designed for Laravel 11+; leverages Eloquent, Blade, and Inertia.js.
Database Agnosticism High Works with any persistence layer (Eloquent, APIs, custom logic).
Frontend Integration Medium Inertia.js required for UI; Blade templates for server-side rendering.
Authentication High Supports Laravel’s auth system + custom 2FA (notification/TOTP).
Validation High Built-in Laravel validation; custom rules via entities.
Search/Filtering High Pluggable search engines (e.g., Algolia, Scout, custom).
Custom Commands High Extendable via PHP traits/commands (e.g., 2FA activation, bulk actions).

Dependencies:

  • Core: Laravel 11+, PHP 8.3+.
  • 2FA (TOTP): pragmarx/google2fa-laravel, bacon/bacon-qr-code (optional).
  • Icons: blade-ui-kit/blade-icons (or owenvoke/blade-fontawesome for legacy FA4).

Technical Risk

Risk Area Severity Mitigation
Migration Complexity High Sharp 9.x introduces breaking changes (config builder, middleware, icons).
Frontend Lock-in Medium Inertia.js required for UI; custom Blade templates may need adjustments.
Performance Low Optimized for Laravel; scaling depends on underlying storage (e.g., DB queries).
Learning Curve Medium Steep for teams unfamiliar with Laravel’s ecosystem or Inertia.js.
Customization Depth Medium Extensible but may require PHP expertise for advanced use cases (e.g., custom 2FA).
Long-term Support Low Actively maintained (last release: 2026-04-01); MIT license.

Critical Questions:

  1. Does the project require Laravel 11+ and PHP 8.3+? If not, Sharp is non-starter.
  2. Is Inertia.js acceptable for the frontend? If a SPA framework (e.g., React/Vue) is preferred, additional integration work is needed.
  3. Are there existing content models? Sharp’s entity system may require refactoring if current data structures don’t align.
  4. What’s the upgrade path from Sharp 8.x? Teams using older versions must account for migration effort (config, middleware, icons).
  5. How will custom logic (e.g., workflows, APIs) be handled? Sharp’s data-agnostic design allows flexibility but may need custom handlers.
  6. Are there third-party dependencies (e.g., search engines) that need alignment? Sharp supports Scout/Algolia but may require configuration.

Integration Approach

Stack Fit

Sharp is optimized for the following Laravel stack:

  • Backend: Laravel 11+, PHP 8.3+, Eloquent, Blade.
  • Frontend: Inertia.js (React/Vue/Svelte) or Blade templates.
  • Auth: Laravel’s built-in auth + Sharp’s 2FA extensions.
  • Storage: Eloquent (default) or custom persistence layers.
  • Search: Laravel Scout, Algolia, or custom search engines.
  • Validation: Laravel’s validator + Sharp’s entity-based rules.

Non-negotiables:

  • Laravel 11+ (Sharp 9.x drops support for older versions).
  • PHP 8.3+ (features like enums, attributes).
  • Inertia.js or Blade for UI (unless using headless mode).

Migration Path

Phase Tasks Tools/Commands
Pre-integration - Audit Laravel version (11+ required). composer show laravel/framework
- Assess existing content models (map to Sharp entities).
- Plan 2FA strategy (notification/TOTP/custom). Review docs/guide/authentication-2fa.md
Setup - Install Sharp: composer require code16/sharp.
- Publish assets: php artisan vendor:publish --tag=sharp-assets --force.
- Clear caches: php artisan view:clear.
- Configure via SharpConfigBuilder (replace config/sharp.php).
Entity Migration - Define entities (models + fields) in PHP. Extend Code16\Sharp\Entities\Entity
- Migrate data from legacy systems to Eloquent models. Laravel migrations, Eloquent imports.
Frontend Integration - Set up Inertia.js (if not already used). npm install @inertiajs/inertia-laravel
- Customize Blade templates or Inertia components. Override Sharp’s views in resources/views/vendor/sharp.
2FA Implementation - Choose 2FA method (notification/TOTP/custom). Review docs/guide/authentication-2fa.md
- Add required columns to users table (for TOTP). Migration example provided in docs.
- Register commands for 2FA activation/deactivation. Extend SingleInstanceWizardCommand, SingleInstanceCommand.
Testing - Test CRUD operations, validation, and authorization. Laravel’s testing tools (Pest/PHPUnit).
- Verify 2FA flows (login, recovery, custom handlers). Manual testing + feature tests.
Deployment - Deploy with composer install --optimize-autoloader.
- Clear caches: php artisan config:clear, php artisan view:clear.

Compatibility

Component Compatibility Notes
Laravel Packages High Works with most Laravel packages (e.g., Scout, Sanctum, Cashier).
Frontend Frameworks Medium Inertia.js required; React/Vue/Svelte components must be Inertia-compatible.
Database Systems High Eloquent (MySQL, PostgreSQL, SQLite) or custom persistence.
Auth Systems High Integrates with Laravel’s auth; supports 2FA extensions.
Search Engines High Scout, Algolia, or custom search engines.
Validation Rules High Laravel’s validator + custom entity rules.
Legacy Systems Medium Data migration may require custom scripts.

Known Conflicts:

  • Sharp 8.x to 9.x: Breaking changes (config builder, middleware, icons).
  • FontAwesome 4: Requires migration to blade-icons or blade-fontawesome.
  • **Custom Middle
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport
twbs/bootstrap4
php-http/client-implementation
phpcr/phpcr-implementation
cucumber/gherkin-monorepo
haydenpierce/class-finder
psr/simple-cache-implementation