I've spent the last decade building a Dropbox alternative that works on top of any storage protocol (SFTP, S3, SMB, IFS, GIT WebDAV, local disk, and literally everything else [1]) and its on github [2]
[1] https://www.filestash.app/docs/plugin/#storage
[2] https://github.com/mickael-kerjean/filestash