filestash README

The project's README from github.com/mickael-kerjean/filestash. As one markdown file: README.md.

screenshot

What is this?

Filestash started as a storage agnostic Dropbox-like file manager that speaks every storage protocol (FTP, SFTP, S3, SMB, WebDAV, IPFS, and about 20 more). It grew into what we want to be the world's best file management platform, centered around 3 separate products:

  1. Web client (the file manager available from your browser): documentation / screenshot / demo
  2. Native client (to sync your data on your device): repo / screenshots for mac, windows, linux, android & iphone
  3. Gateways (to expose your storages over any protocol): showcase

The philosophy that guides this project is: "anything that's not a fundamental truth of the universe lives in a plugin". That keeps the core lean and fast, and the opinions replaceable, so when your requirements get deep or weird, the answer is a plugin, not a fork. You only carry the bloat you really need.

storage + auth architecture

Key Features

Plugins

Malleability isn't an afterthought, it's the whole architecture:

anything that's not a fundamental truth of the universe lives in a plugin

Taken literally, the "truths of the universe" are a set of core interfaces, one for every key component of Filestash, and they're yours to implement (storage, authentication, authorisation, search, thumbnailing, apps, middleware, frontend changes, ...)

The oldest one is the storage interface, the one at work whenever you connect to a storage:

type IBackend interface {
	Ls(path string) ([]os.FileInfo, error)
	Stat(path string) (os.FileInfo, error)
	Cat(path string) (io.ReadCloser, error)
	Mkdir(path string) error
	Rm(path string) error
	Mv(from string, to string) error
	Save(path string, file io.Reader) error
	Touch(path string) error
}

Historically, plugins were made in Go and compiled in. Today there's a second path: runtime plugins, a zip you drop in the plugins folder. The zip can reshape the frontend and it can carry wasm implementing the very same core interfaces. That wasm runs in a VM with tight control on permissions: no declared network host, no way to phone home. Installing a plugin doesn't mean trusting it with everything.

For example:

use filestash::*;

#[derive(Default)]
pub struct Plugin;

impl Authorisation for Plugin {
    fn ls(&self, _ctx: &Context, path: &str) -> Decision {
        self.check(path)
    }
    fn cat(&self, _ctx: &Context, path: &str) -> Decision { ... }
    fn stat(&self, _ctx: &Context, path: &str) -> Decision { ... }
}

impl Plugin {
    fn check(&self, path: &str) -> Decision {
        if path.split("/").any(|segment| segment == "top_secret") {
            log::warn!("[TOPSECRET] access denied !!");
            return Decision::Deny;
        }
        Decision::Allow
    }
}

register!(Plugin: Authorisation);

These few lines give you a readonly view of your data where every folder named "top_secret" is off limits. For more examples, browse the plugin folder, the runtime plugin cookbook, and the plugin marketplace.

And to be clear, code is the power-user path, there are no code options

Getting Started

To install Filestash, head to the Getting started guide. If you want to leverage plugins, head over to the inventory, or learn about developing your own plugins.

Support

Why

Familiar with the infamous comment from Dropbox's launch on HN? In my memory it goes like this:

Credits

Filestash stands on the shoulder of: contributors, folks developing awesome libraries, BrandonM, a whole bunch of C stuff (the C standard library, libjpeg, libpng, libgif, libraw and many more), fontawesome, material, Browser stack to let us test on real devices, and the many guys from Nebraska and elsewhere who have been thanklessly maintaining the critical pieces that Filestash sits on top:

credit to the nebraska guy on xkcd

filestash (mickael-kerjean/filestash)

Searching Database…

14.8K ·GitHub
Что это такое?Filestash — файловый менеджер в стиле Dropbox, который не привязан к конкретному хранилищу и работает почти со всеми протоколами хранения (S3, FTP, SFTP, WebDAV, SMB, NFS, Git, IPFS, Dropbox, Azure, SharePoint и другими), так что все ваши хранилища доступны через один файловый браузер.
Это просто веб-менеджер файлов или что-то более масштабное?Это три продукта в одном: веб-клиент, которым вы пользуетесь в браузере, нативный клиент для синхронизации файлов на вашем устройстве и шлюзы, которые открывают ваше хранилище по другим протоколам.
Как его запустить?Вы разворачиваете его сами, как сервер для самостоятельного хостинга, следуя официальному руководству Getting Started; готовой облачной (SaaS) версии в описании не упоминается.
Нужно ли знать Go, чтобы расширять его плагинами?Не обязательно. Скомпилированные плагины на Go — исторически первый путь, но можно также подключать плагины времени выполнения в виде zip-архива с WASM, без перекомпиляции сервера.
Может ли установленный плагин делать с моим сервером всё, что захочет?Нет. Плагины времени выполнения работают внутри жёстко ограниченной виртуальной машины WASM без заявленного доступа к сети, поэтому установка такого плагина автоматически не даёт ему полного доверия.
К каким хранилищам можно подключиться?Среди официально перечисленных хранилищ есть S3, FTP, SFTP, WebDAV, SMB, NFS, Git, IPFS, Dropbox, Azure и SharePoint, поскольку слой хранения — это один из интерфейсов плагинов.
Зачем создавать новый файловый менеджер, если можно просто использовать Dropbox?Философия проекта такова: «всё, что не является фундаментальной истиной вселенной, живёт в плагине». Это позволяет держать ядро компактным и подключать любое хранилище, которое вы уже используете, а не быть привязанным к одному поставщику.
Что ещё он умеет, кроме просмотра файлов?Помимо просмотра файлов, он поддерживает версионирование, журналы аудита, антивирусную проверку, квоты, чат, трансляцию на Chromecast, транскодирование видео по требованию и подключение общих ссылок как сетевого диска.
Что такое маркетплейс плагинов?Это каталог готовых плагинов и приложений для файлов (просмотрщики форматов вроде SVG, темы оформления, функции ИИ и OCR и т. д.), которые можно установить, не написав ни строчки кода.
What are similar projects?sftpgo, alist, rclone, copyparty, ceph, OpenList, cloudreve, filebrowser
Size
73 MB
Stars
14.8K
Updated
CommitOct 16
Age
9y
Commits · 90 Days