dp0/filament-sanchaya

A powerful file manager plugin for Filament PHP with media picker support.

Maintainers

Package info

github.com/dp-0/filament-sanchaya

Homepage

pkg:composer/dp0/filament-sanchaya

Transparency log

Statistics

Installs: 7

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

dev-main 2026-08-12 15:36 UTC

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 SanchayaPicker persistence (syncSanchayaFiles / saveInGroup)
  • Cover the SanchayaFileModel accessors, scopes, and URL resolution

Add a phpunit.xml and wire it into the root app's test setup.

Releasing / Docs

License

MIT