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.
Sharp is a Laravel-first CMS framework designed for structured content management, making it an excellent fit for projects requiring:
Key strengths:
Potential misfits:
| 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:
pragmarx/google2fa-laravel, bacon/bacon-qr-code (optional).blade-ui-kit/blade-icons (or owenvoke/blade-fontawesome for legacy FA4).| 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:
Sharp is optimized for the following Laravel stack:
Non-negotiables:
| 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. |
| 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:
blade-icons or blade-fontawesome.How can I help you explore Laravel packages today?