Skip to content

lucasperovani/WebFS

Repository files navigation

🌐️ WebFS

Filesystem operations exposed over a HTTP server

💡️ Idea

The idea behind WebFS is to expose common filesystem operations to be accessible through HTTP requests. You can have 2 physical disks, in different parts of the world, sharing information and syncing. It can even implement RAID through software in this configuration, with slaves watching master's disks and copying their data to the disk or by simply receiving commands from a controller.

The current version of WebFS exposes a frontend that uses the API to access the disk as Google Drive would do, but simpler, way much simpler.

🛠️ How to Build/Install

You can use it with docker or bare metal.

Docker

  1. Install docker:
curl -fsSL https://get.docker.com | sudo sh
  1. Run it with the following command:
sudo docker run \
    -p 3000:3000 \
    --name webfs-jqv \
    -e DATA_DIR=/JQV \
    -e PORT=3000 \
    -v /mnt/data0/JQV:/JQV \
    lucasperovani/webfs

Explanation:

  • PORT: The port to access the HTTP server
  • DATA_DIR: The data directory to list/upload/download/delete files

Bare metal

  1. Download the source:
git clone https://github.com/lucasperovani/WebFS.git && cd WebFS
  1. Compile it:
cargo build --release
  1. Run it:
DATA_DIR=/your/file/folder; PORT=3000; ./target/webfs

Explanation:

  • PORT: The port to access the HTTP server
  • DATA_DIR: The data directory to list/upload/download/delete files

If you want a more detailed installation with explanation about mounting the disk right at linux boot or VPN to be able access it anywhere, go to INSTALLATION.md

🕹️ How to Use

Please, go to our Postman API documentation to check which endpoints to use: WebFS API Documentation

Frontend Usage

📝️ To Do

  • Split rust code in different files
  • Add tests
  • Add github CI to test before pull requests
  • Add github CI to export docker images on merges
  • Improve upload and download files
  • Implement disk information and usage routes
  • Only add assets and frontend routes with env var

About

Filesystem operations exposed over an HTTP server

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published