dp0 / filament-sanchaya
A powerful file manager plugin for Filament PHP with media picker support.
Requires
- php: ^8.4
- ext-zip: *
This package is auto-updated.
Last update: 2026-08-12 15:36:09 UTC
README
A Filament-native file manager and media picker for Laravel.
Using this package? See the documentation website for installation, configuration, and usage guides.
This README is for contributors and maintainers working on the package itself.
Overview
In Nepali, Sanchaya (सञ्चय) represents the act of gathering or amassing something valuable over time. This package gathers your files in one place, indexes them in the database, and manages them with a familiar Filament experience.
The package is developed inside a Laravel host app (packages/dp0/filament-sanchaya) and consumed via a Composer path repository.
Getting Started
composer install
The package is symlinked into the host app's vendor/, so source changes are picked up immediately. Rebuild assets after changing views:
npm run dev # or npm run build
The Filament admin panel (/admin) at the repo root already registers SanchayaPlugin and the custom theme scans the package views via @source in resources/css/filament/admin/theme.css.
Package Structure
src/
├── Actions/ # File/folder operations (rename, move, copy, delete, download)
├── Commands/ # sanchaya:install installer
├── Forms/Components/ # SanchayaPicker form field
├── Livewire/ # FileManager, FileBrowser, FilePicker components
├── Models/ # SanchayaFile, SanchayaAttachment
├── Pages/ # SanchayaManager page
├── Policies/ # SanchayaFilePolicy
├── Traits/ # HasSanchayaFiles, NormalizesNumericIds
├── SanchayaPlugin.php # Filament plugin entry point
└── SanchayaServiceProvider.php
config/filament-sanchaya.php # Default configuration
database/migrations/ # sanchaya_files + sanchaya_attachments
resources/views/ # Blade views (small, overridable partials)
doc/ # Documentation website source
Views are published via sanchaya-views; config via sanchaya-config; migrations via sanchaya-migrations.
Testing
No test suite exists yet. When adding one:
- Unit-test the
Actions/classes (path cascading on rename/move, copy conflict resolution) - Feature-test the Livewire components and
SanchayaPickerpersistence (syncSanchayaFiles/saveInGroup) - Cover the
SanchayaFileModelaccessors, scopes, and URL resolution
Add a phpunit.xml and wire it into the root app's test setup.
Releasing / Docs
- Update the documentation site under
doc/(published to https://dp-0.github.io/filament-sanchaya/) for any user-facing change - Keep the README lean: user-facing detail lives in the docs
License
MIT