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

Filemanager Laravel Package

livewire-filemanager/filemanager

Livewire Filemanager is a simple, friendly file manager for Laravel. Manage files and folders with drag & drop, search, dark mode, multiple languages, and API endpoints. Built on Livewire and Spatie Media Library for seamless integration.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture Fit

  • Livewire Integration: Perfect fit for Laravel applications leveraging Livewire for reactive UI. The package extends Livewire’s declarative paradigm, reducing frontend-backend complexity (e.g., real-time file previews without AJAX polling).
  • Spatie Media Library Synergy: Aligns with Laravel’s ecosystem by building on Spatie’s battle-tested media handling. Avoids reinventing file storage/processing logic (e.g., thumbnails, conversions).
  • Modular Design: Component-based architecture (<x-livewire-filemanager />) enables granular adoption (e.g., embed only the upload dialog in a specific feature).
  • API-First: REST endpoints decouple file operations from UI, enabling:
    • Microservices: Offload file processing to a dedicated service (e.g., Laravel Queues for thumbnail generation).
    • Headless CMS: Integrate with frontend frameworks (React/Vue) via API.
    • Mobile Apps: Sync files between web and native clients.

Integration Feasibility

  • Low Friction: Composer install + 3 migrations (folders, media, livewire-filemanager) + Tailwind/Alpine setup. <2 hours for basic integration.
  • Dependency Alignment:
    • Livewire: Required for reactivity (drag-and-drop, real-time updates).
    • Spatie Media Library: Mandatory for file storage/metadata. If already in use, integration is seamless; otherwise, adds ~500ms to initial setup.
    • TailwindCSS/AlpineJS: Optional but recommended for UI consistency. Can be replaced with custom CSS if needed.
  • Storage Backend: Supports local, S3, or custom drivers via Spatie. No vendor lock-in.

Technical Risk

Risk Mitigation Impact
Spatie Media Library Requires existing config or setup. Publish migrations/config if missing. Medium (1–2 hours)
Livewire Version Tested on Livewire 3.x. Downgrade if using 2.x (not recommended). Low (deprecation risk)
Queue Thumbnails Thumbnail generation uses queues by default. Ensure QUEUE_CONNECTION is configured. Critical (blocker if misconfigured)
HTTPS Requirement File URLs (e.g., copy-to-clipboard) require HTTPS. Use trusted-proxies in Laravel if behind a proxy. Medium (dev/prod gap)
ACL Complexity ACL requires config publishing and Spatie Media Library model updates. High for advanced setups
Tailwind CDN Production uses PLAY CDN by default. Replace with local Tailwind build. Low (UI consistency risk)
Breaking Changes v1.0.0 renamed fileuploader to filemanager. Run filemanager:migrate-config if upgrading. Medium (legacy projects)

Key Questions

  1. Storage Strategy:
    • Are you using Spatie Media Library already? If not, what’s your current file storage solution (e.g., local, S3)?
    • Do you need multi-tenant isolation? If so, how are tenants scoped (e.g., database, subdomains)?
  2. Performance:
    • Will thumbnails be generated synchronously or asynchronously (queues)?
    • What’s the expected file volume (e.g., 10K files)? Consider indexing folders for search performance.
  3. Security:
    • How will file access be restricted (e.g., per-user, per-role)? ACL is optional but requires upfront config.
    • Are there compliance requirements (e.g., GDPR, HIPAA) for file retention/audit logs?
  4. UI/UX:
    • Do you need custom branding (e.g., logo, color scheme)? The package uses Tailwind, so overrides are possible.
    • Should drag-and-drop support be limited to specific folders (e.g., /uploads only)?
  5. API Usage:
    • Will the API be used by non-Laravel clients (e.g., mobile apps)? If so, document rate-limiting and auth (Sanctum/Passport).
    • Do you need webhook support for file events (e.g., file.uploaded)?

Integration Approach

Stack Fit

  • Laravel Ecosystem: Optimized for Laravel 10/11/12/13 with Livewire 3.x. Leverage existing auth (e.g., Gates/Policies) for access control.
  • Frontend:
    • TailwindCSS: Required for styling. Can be customized via tailwind.config.js (v3) or app.css (v4).
    • AlpineJS: Used for client-side interactivity (e.g., modals). Lightweight dependency.
    • Livewire: Core dependency for reactivity. Ensure your app uses Livewire 3.x.
  • Storage:
    • Spatie Media Library: Handles file storage, conversions, and metadata. Supports local, S3, and custom drivers.
    • Queues: Recommended for thumbnail generation to avoid blocking requests.
  • API:
    • Laravel Sanctum: Default auth for API endpoints. Can be extended with Passport for OAuth2.

Migration Path

Step Action Time Estimate Dependencies
1. Prerequisites Ensure PHP 8.2+, Laravel 10+, Livewire 3.x, and Composer installed. 10 mins Dev environment
2. Install Package composer require livewire-filemanager/filemanager 1 min Composer
3. Publish Migrations Run php artisan vendor:publish --tag=livewire-filemanager-migrations and Spatie’s migrations. 5 mins Database
4. Run Migrations php artisan migrate 1 min Database
5. Configure Tailwind Update tailwind.config.js to include vendor views (see README). 10 mins TailwindCSS
6. Add Component Include <x-livewire-filemanager /> and @filemanagerStyles/@filemanagerScripts in Blade. 5 mins Livewire
7. Queue Setup Configure QUEUE_CONNECTION in .env (e.g., database, redis) and start workers. 15 mins Laravel Queues
8. Optional: ACL Publish config (livewire-filemanager.php) and enable acl_enabled. Update Spatie’s media_model. 20 mins Spatie Media Library
9. Optional: API Configure Sanctum/Passport for API auth. Test endpoints (e.g., /api/filemanager/v1/folders). 30 mins Laravel Sanctum/Passport
10. Optional: Routes Add Route::get('{path}', [FileController::class, 'show']) for public file access. 5 mins Laravel Routing

Compatibility

  • Laravel Versions: Tested on 10–13. Downgrade Livewire if using Laravel 9 (not recommended).
  • PHP Versions: Requires PHP 8.2+. Use php82 in Docker if needed.
  • Livewire: Must use Livewire 3.x. Downgrade if using 2.x (unsupported).
  • Spatie Media Library: Version 12.x recommended. Conflicts may arise with older versions.
  • TailwindCSS: Tested with v3/v4. Customize via tailwind.config.js if using v2.
  • AlpineJS: No version constraints, but test with v3.x for compatibility.

Sequencing

  1. Core Integration:
    • Install package → Publish migrations → Run migrations → Add Livewire component.
    • Goal: Basic file management UI in <1 hour.
  2. Enhancements:
    • Configure Tailwind → Set up queues → Enable ACL (if needed).
    • Goal: Production-ready in <4 hours.
  3. Advanced:
    • Customize API → Add webhooks → Optimize for multi-tenancy.
    • Goal: Enterprise features in <1 day.

Operational Impact

Maintenance

  • Updates:
    • Follow UPGRADE.md for breaking changes (e.g., v1.0.0 naming fix).
    • Run composer update livewire-filemanager/filemanager and php artisan migrate as needed.
  • Dependencies:
    • Monitor Spatie Media Library for updates (critical for file storage).
    • Livewire updates may require testing (e.g., new AlpineJS versions).
  • Logs:
    • Spatie Media
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
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
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